00001
00034 #ifndef YASM_LINEMAP_H
00035 #define YASM_LINEMAP_H
00036
00037 #ifndef YASM_LIB_DECL
00038 #define YASM_LIB_DECL
00039 #endif
00040
00044 YASM_LIB_DECL
00045 yasm_linemap *yasm_linemap_create(void);
00046
00050 YASM_LIB_DECL
00051 void yasm_linemap_destroy(yasm_linemap *linemap);
00052
00057 YASM_LIB_DECL
00058 unsigned long yasm_linemap_get_current(yasm_linemap *linemap);
00059
00069 YASM_LIB_DECL
00070 int yasm_linemap_get_source(yasm_linemap *linemap, unsigned long line,
00071 yasm_bytecode **bcp,
00072 const char **sourcep);
00073
00082 YASM_LIB_DECL
00083 void yasm_linemap_add_source(yasm_linemap *linemap,
00084 yasm_bytecode *bc,
00085 const char *source);
00086
00091 YASM_LIB_DECL
00092 unsigned long yasm_linemap_goto_next(yasm_linemap *linemap);
00093
00102 YASM_LIB_DECL
00103 void yasm_linemap_set(yasm_linemap *linemap, const char *filename,
00104 unsigned long file_line, unsigned long line_inc);
00105
00114 YASM_LIB_DECL
00115 unsigned long yasm_linemap_poke(yasm_linemap *linemap,
00116 const char *filename,
00117 unsigned long file_line);
00118
00125 YASM_LIB_DECL
00126 void yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line,
00127 const char **filename,
00128 unsigned long *file_line);
00129
00138 YASM_LIB_DECL
00139 int yasm_linemap_traverse_filenames
00140 (yasm_linemap *linemap, void *d,
00141 int (*func) (const char *filename, void *d));
00142
00143 #endif