|
libyasm
|
YASM preprocessor module interface. More...
Go to the source code of this file.
Data Structures | |
| struct | yasm_preproc_module |
| YASM preprocesor module interface. More... | |
Typedefs | |
| typedef struct yasm_preproc_module | yasm_preproc_module |
| YASM preprocesor module interface. More... | |
Functions | |
| yasm_preproc * | yasm_preproc_create (yasm_preproc_module *module, const char *in_filename, yasm_symtab *symtab, yasm_linemap *lm, yasm_errwarns *errwarns) |
| Initialize preprocessor. More... | |
| void | yasm_preproc_destroy (yasm_preproc *preproc) |
| Cleans up any allocated preproc memory. More... | |
| char * | yasm_preproc_get_line (yasm_preproc *preproc) |
| Gets a single line of preprocessed source code. More... | |
| size_t | yasm_preproc_get_included_file (yasm_preproc *preproc, char *buf, size_t max_size) |
| Get the next filename included by the source code. More... | |
| void | yasm_preproc_add_include_file (yasm_preproc *preproc, const char *filename) |
| Pre-include a file. More... | |
| void | yasm_preproc_predefine_macro (yasm_preproc *preproc, const char *macronameval) |
| Pre-define a macro. More... | |
| void | yasm_preproc_undefine_macro (yasm_preproc *preproc, const char *macroname) |
| Un-define a macro. More... | |
| void | yasm_preproc_define_builtin (yasm_preproc *preproc, const char *macronameval) |
| Define a builtin macro, preprocessed before the "standard" macros. More... | |
| void | yasm_preproc_add_standard (yasm_preproc *preproc, const char **macros) |
| Define additional standard macros, preprocessed after the builtins but prior to any user-defined macros. More... | |
YASM preprocessor module interface.
Definition in file preproc.h.
| typedef struct yasm_preproc_module yasm_preproc_module |
YASM preprocesor module interface.
| void yasm_preproc_add_include_file | ( | yasm_preproc * | preproc, |
| const char * | filename | ||
| ) |
Pre-include a file.
| preproc | preprocessor |
| filename | filename |
| void yasm_preproc_add_standard | ( | yasm_preproc * | preproc, |
| const char ** | macros | ||
| ) |
Define additional standard macros, preprocessed after the builtins but prior to any user-defined macros.
| preproc | preprocessor |
| macros | NULL-terminated array of macro strings |
| yasm_preproc* yasm_preproc_create | ( | yasm_preproc_module * | module, |
| const char * | in_filename, | ||
| yasm_symtab * | symtab, | ||
| yasm_linemap * | lm, | ||
| yasm_errwarns * | errwarns | ||
| ) |
Initialize preprocessor.
The preprocessor needs access to the object format module to find out any output format specific macros.
| module | preprocessor module |
| in_filename | initial starting filename, or "-" to read from stdin |
| symtab | symbol table (may be NULL if none) |
| lm | line mapping repository |
| errwarns | error/warning set |
| void yasm_preproc_define_builtin | ( | yasm_preproc * | preproc, |
| const char * | macronameval | ||
| ) |
Define a builtin macro, preprocessed before the "standard" macros.
| preproc | preprocessor |
| macronameval | "name=value" string |
| void yasm_preproc_destroy | ( | yasm_preproc * | preproc | ) |
Cleans up any allocated preproc memory.
| preproc | preprocessor |
| size_t yasm_preproc_get_included_file | ( | yasm_preproc * | preproc, |
| char * | buf, | ||
| size_t | max_size | ||
| ) |
Get the next filename included by the source code.
| preproc | preprocessor |
| buf | destination buffer for filename |
| max_size | maximum number of bytes that can be returned in buf |
| char* yasm_preproc_get_line | ( | yasm_preproc * | preproc | ) |
Gets a single line of preprocessed source code.
| preproc | preprocessor |
| void yasm_preproc_predefine_macro | ( | yasm_preproc * | preproc, |
| const char * | macronameval | ||
| ) |
Pre-define a macro.
| preproc | preprocessor |
| macronameval | "name=value" string |
| void yasm_preproc_undefine_macro | ( | yasm_preproc * | preproc, |
| const char * | macroname | ||
| ) |
Un-define a macro.
| preproc | preprocessor |
| macroname | macro name |
1.8.3.1