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
00103 YASM_LIB_DECL
00104 void yasm_linemap_set(yasm_linemap *linemap, const char *filename,
00105 unsigned long virtual_line, unsigned long file_line,
00106 unsigned long line_inc);
00107
00116 YASM_LIB_DECL
00117 unsigned long yasm_linemap_poke(yasm_linemap *linemap,
00118 const char *filename,
00119 unsigned long file_line);
00120
00127 YASM_LIB_DECL
00128 void yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line,
00129 const char **filename,
00130 unsigned long *file_line);
00131
00140 YASM_LIB_DECL
00141 int yasm_linemap_traverse_filenames
00142 (yasm_linemap *linemap, void *d,
00143 int (*func) (const char *filename, void *d));
00144
00145 #endif