Go to the documentation of this file.
72 size_t (*input_func) (
void *d,
unsigned char *buf,
size_t max),
73 void *input_func_data);
114 #ifndef yasm__splitpath
115 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
116 defined (__DJGPP__) || defined (__OS2__)
117 # define yasm__splitpath(path, tail) yasm__splitpath_win(path, tail)
119 # define yasm__splitpath(path, tail) yasm__splitpath_unix(path, tail)
169 #ifndef yasm__combpath
170 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
171 defined (__DJGPP__) || defined (__OS2__)
172 # define yasm__combpath(from, to) yasm__combpath_win(from, to)
174 # define yasm__combpath(from, to) yasm__combpath_unix(from, to)
193 #ifndef yasm__createpath
194 # if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
195 defined (__DJGPP__) || defined (__OS2__)
196 # define yasm__createpath(path) yasm__createpath_common(path, 1)
198 # define yasm__createpath(path) yasm__createpath_common(path, 0)
222 (
const char *iname,
const char *from,
const char *mode,
249 #define YASM_WRITE_8(ptr, val) \
250 *((ptr)++) = (unsigned char)((val) & 0xFF)
258 #define YASM_WRITE_16_L(ptr, val) \
260 *((ptr)++) = (unsigned char)((val) & 0xFF); \
261 *((ptr)++) = (unsigned char)(((val) >> 8) & 0xFF); \
270 #define YASM_WRITE_32_L(ptr, val) \
272 *((ptr)++) = (unsigned char)((val) & 0xFF); \
273 *((ptr)++) = (unsigned char)(((val) >> 8) & 0xFF); \
274 *((ptr)++) = (unsigned char)(((val) >> 16) & 0xFF); \
275 *((ptr)++) = (unsigned char)(((val) >> 24) & 0xFF); \
284 #define YASM_WRITE_16_B(ptr, val) \
286 *((ptr)++) = (unsigned char)(((val) >> 8) & 0xFF); \
287 *((ptr)++) = (unsigned char)((val) & 0xFF); \
296 #define YASM_WRITE_32_B(ptr, val) \
298 *((ptr)++) = (unsigned char)(((val) >> 24) & 0xFF); \
299 *((ptr)++) = (unsigned char)(((val) >> 16) & 0xFF); \
300 *((ptr)++) = (unsigned char)(((val) >> 8) & 0xFF); \
301 *((ptr)++) = (unsigned char)((val) & 0xFF); \
310 #define YASM_SAVE_8(ptr, val) \
311 *(ptr) = (unsigned char)((val) & 0xFF)
319 #define YASM_SAVE_16_L(ptr, val) \
321 *(ptr) = (unsigned char)((val) & 0xFF); \
322 *((ptr)+1) = (unsigned char)(((val) >> 8) & 0xFF); \
331 #define YASM_SAVE_32_L(ptr, val) \
333 *(ptr) = (unsigned char)((val) & 0xFF); \
334 *((ptr)+1) = (unsigned char)(((val) >> 8) & 0xFF); \
335 *((ptr)+2) = (unsigned char)(((val) >> 16) & 0xFF); \
336 *((ptr)+3) = (unsigned char)(((val) >> 24) & 0xFF); \
345 #define YASM_SAVE_16_B(ptr, val) \
347 *(ptr) = (unsigned char)(((val) >> 8) & 0xFF); \
348 *((ptr)+1) = (unsigned char)((val) & 0xFF); \
357 #define YASM_SAVE_32_B(ptr, val) \
359 *(ptr) = (unsigned char)(((val) >> 24) & 0xFF); \
360 *((ptr)+1) = (unsigned char)(((val) >> 16) & 0xFF); \
361 *((ptr)+2) = (unsigned char)(((val) >> 8) & 0xFF); \
362 *((ptr)+3) = (unsigned char)((val) & 0xFF); \
410 #define YASM_READ_8(val, ptr) \
411 (val) = *((ptr)++) & 0xFF
419 #define YASM_READ_16_L(val, ptr) \
421 (val) = *((ptr)++) & 0xFF; \
422 (val) |= (*((ptr)++) & 0xFF) << 8; \
431 #define YASM_READ_32_L(val, ptr) \
433 (val) = *((ptr)++) & 0xFF; \
434 (val) |= (*((ptr)++) & 0xFF) << 8; \
435 (val) |= (*((ptr)++) & 0xFF) << 16; \
436 (val) |= (*((ptr)++) & 0xFF) << 24; \
445 #define YASM_READ_16_B(val, ptr) \
447 (val) = (*((ptr)++) & 0xFF) << 8; \
448 (val) |= *((ptr)++) & 0xFF; \
457 #define YASM_READ_32_B(val, ptr) \
459 (val) = (*((ptr)++) & 0xFF) << 24; \
460 (val) |= (*((ptr)++) & 0xFF) << 16; \
461 (val) |= (*((ptr)++) & 0xFF) << 8; \
462 (val) |= *((ptr)++) & 0xFF; \
470 #define YASM_LOAD_8(val, ptr) \
471 (val) = *(ptr) & 0xFF
479 #define YASM_LOAD_16_L(val, ptr) \
481 (val) = *(ptr) & 0xFF; \
482 (val) |= (*((ptr)+1) & 0xFF) << 8; \
491 #define YASM_LOAD_32_L(val, ptr) \
493 (val) = (unsigned long)(*(ptr) & 0xFF); \
494 (val) |= (unsigned long)((*((ptr)+1) & 0xFF) << 8); \
495 (val) |= (unsigned long)((*((ptr)+2) & 0xFF) << 16); \
496 (val) |= (unsigned long)((*((ptr)+3) & 0xFF) << 24); \
505 #define YASM_LOAD_16_B(val, ptr) \
507 (val) = (*(ptr) & 0xFF) << 8; \
508 (val) |= *((ptr)+1) & 0xFF; \
517 #define YASM_LOAD_32_B(val, ptr) \
519 (val) = (unsigned long)((*(ptr) & 0xFF) << 24); \
520 (val) |= (unsigned long)((*((ptr)+1) & 0xFF) << 16); \
521 (val) |= (unsigned long)((*((ptr)+2) & 0xFF) << 8); \
522 (val) |= (unsigned long)(*((ptr)+3) & 0xFF); \