Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: third_party/yasm/patched-yasm/libyasm/file.h

Issue 6170009: Update our yasm copy to yasm 1.1.0 (Part 1: yasm side)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * \file libyasm/file.h 2 * \file libyasm/file.h
3 * \brief YASM file helpers. 3 * \brief YASM file helpers.
4 * 4 *
5 * \rcs 5 * \rcs
6 * $Id: file.h 2157 2008-10-19 07:29:15Z peter $ 6 * $Id: file.h 2287 2010-02-13 08:42:27Z peter $
7 * \endrcs 7 * \endrcs
8 * 8 *
9 * \license 9 * \license
10 * Copyright (C) 2001-2007 Peter Johnson 10 * Copyright (C) 2001-2007 Peter Johnson
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
15 * - Redistributions of source code must retain the above copyright 15 * - Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer. 16 * notice, this list of conditions and the following disclaimer.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 */ 172 */
173 #ifndef yasm__combpath 173 #ifndef yasm__combpath
174 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \ 174 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
175 defined (__DJGPP__) || defined (__OS2__) 175 defined (__DJGPP__) || defined (__OS2__)
176 # define yasm__combpath(from, to) yasm__combpath_win(from, to) 176 # define yasm__combpath(from, to) yasm__combpath_win(from, to)
177 # else 177 # else
178 # define yasm__combpath(from, to) yasm__combpath_unix(from, to) 178 # define yasm__combpath(from, to) yasm__combpath_unix(from, to)
179 # endif 179 # endif
180 #endif 180 #endif
181 181
182 /** Recursively create tree of directories needed for pathname.
183 * \internal
184 * \param path pathname
185 * \param win handle windows paths
186 * \return Length of directory portion of pathname.
187 */
188 YASM_LIB_DECL
189 size_t yasm__createpath_common(const char *path, int win);
190
191 /** Recursively create tree of directories needed for pathname.
192 * Unless otherwise defined, defaults to yasm__createpath_unix().
193 * \internal
194 * \param path pathname
195 * \return Length of directory portion of pathname.
196 */
197 #ifndef yasm__createpath
198 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
199 defined (__DJGPP__) || defined (__OS2__)
200 # define yasm__createpath(path) yasm__createpath_common(path, 1)
201 # else
202 # define yasm__createpath(path) yasm__createpath_common(path, 0)
203 # endif
204 #endif
205
182 /** Try to find and open an include file, searching through include paths. 206 /** Try to find and open an include file, searching through include paths.
183 * First iname is looked for relative to the directory containing "from", then 207 * First iname is looked for relative to the directory containing "from", then
184 * it's looked for relative to each of the include paths. 208 * it's looked for relative to each of the include paths.
185 * 209 *
186 * All pathnames may be either absolute or relative; from, oname, and 210 * All pathnames may be either absolute or relative; from, oname, and
187 * include paths, if relative, are relative from the current working directory. 211 * include paths, if relative, are relative from the current working directory.
188 * 212 *
189 * First match wins; the full pathname (newly allocated) to the opened file 213 * First match wins; the full pathname (newly allocated) to the opened file
190 * is saved into oname, and the fopen'ed FILE * is returned. If not found, 214 * is saved into oname, and the fopen'ed FILE * is returned. If not found,
191 * NULL is returned. 215 * NULL is returned.
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 */ 520 */
497 #define YASM_LOAD_32_B(val, ptr) \ 521 #define YASM_LOAD_32_B(val, ptr) \
498 do { \ 522 do { \
499 (val) = (unsigned long)((*(ptr) & 0xFF) << 24); \ 523 (val) = (unsigned long)((*(ptr) & 0xFF) << 24); \
500 (val) |= (unsigned long)((*((ptr)+1) & 0xFF) << 16); \ 524 (val) |= (unsigned long)((*((ptr)+1) & 0xFF) << 16); \
501 (val) |= (unsigned long)((*((ptr)+2) & 0xFF) << 8); \ 525 (val) |= (unsigned long)((*((ptr)+2) & 0xFF) << 8); \
502 (val) |= (unsigned long)(*((ptr)+3) & 0xFF); \ 526 (val) |= (unsigned long)(*((ptr)+3) & 0xFF); \
503 } while (0) 527 } while (0)
504 528
505 #endif 529 #endif
OLDNEW
« no previous file with comments | « third_party/yasm/patched-yasm/libyasm/errwarn.c ('k') | third_party/yasm/patched-yasm/libyasm/file.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698