~bkerensa/ubuntu/raring/yasm/fix-for-1064341

« back to all changes in this revision

Viewing changes to libyasm/linemap.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar
  • Date: 2009-07-14 08:23:59 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090714082359-10x8mjty41gzkshs
Tags: 0.8.0-1
* New upstream release (Closes: #531047).
* Removed all tasm patches, they’ve been merged upstream.
* debian/control: set debhelper dependency to 5.0 and policy to 3.8.2.
* debian/control: mention TASM in the long description.
* debian/compat: set debhelper level to 5.
* debian/links: link tasm to ytasm and tasm.1.gz to ytasm.1.gz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * \brief YASM virtual line mapping interface.
4
4
 *
5
5
 * \rcs
6
 
 * $Id: linemap.h 1827 2007-04-22 05:09:49Z peter $
 
6
 * $Id: linemap.h 2101 2008-05-23 06:46:51Z peter $
7
7
 * \endrcs
8
8
 *
9
9
 * \license
34
34
#ifndef YASM_LINEMAP_H
35
35
#define YASM_LINEMAP_H
36
36
 
 
37
#ifndef YASM_LIB_DECL
 
38
#define YASM_LIB_DECL
 
39
#endif
 
40
 
37
41
/** Create a new line mapping repository.
38
42
 * \return New repository.
39
43
 */
 
44
YASM_LIB_DECL
40
45
yasm_linemap *yasm_linemap_create(void);
41
46
 
42
47
/** Clean up any memory allocated for a repository.
43
48
 * \param linemap       line mapping repository
44
49
 */
 
50
YASM_LIB_DECL
45
51
void yasm_linemap_destroy(yasm_linemap *linemap);
46
52
 
47
53
/** Get the current line position in a repository.
48
54
 * \param linemap       line mapping repository
49
55
 * \return Current virtual line.
50
56
 */
 
57
YASM_LIB_DECL
51
58
unsigned long yasm_linemap_get_current(yasm_linemap *linemap);
52
59
 
53
60
/** Get bytecode and source line information, if any, for a virtual line.
59
66
 * \note If source line information is not available, bcp and sourcep targets
60
67
 * are set to NULL.
61
68
 */
 
69
YASM_LIB_DECL
62
70
int yasm_linemap_get_source(yasm_linemap *linemap, unsigned long line,
63
71
                            /*@null@*/ yasm_bytecode **bcp,
64
72
                            const char **sourcep);
71
79
 * \param source        source code line
72
80
 * \note The source code line pointer is NOT kept, it is strdup'ed.
73
81
 */
 
82
YASM_LIB_DECL
74
83
void yasm_linemap_add_source(yasm_linemap *linemap,
75
84
                             /*@null@*/ yasm_bytecode *bc,
76
85
                             const char *source);
79
88
 * \param linemap       line mapping repository
80
89
 * \return The current (new) virtual line.
81
90
 */
 
91
YASM_LIB_DECL
82
92
unsigned long yasm_linemap_goto_next(yasm_linemap *linemap);
83
93
 
84
94
/** Set a new file/line physical association starting point at the current
89
99
 * \param file_line     physical line number
90
100
 * \param line_inc      line increment
91
101
 */
 
102
YASM_LIB_DECL
92
103
void yasm_linemap_set(yasm_linemap *linemap, /*@null@*/ const char *filename,
93
104
                      unsigned long file_line, unsigned long line_inc);
94
105
 
100
111
 * \param file_line     physical line number
101
112
 * \return The virtual line number of the poked association.
102
113
 */
 
114
YASM_LIB_DECL
103
115
unsigned long yasm_linemap_poke(yasm_linemap *linemap,
104
116
                                /*@null@*/ const char *filename,
105
117
                                unsigned long file_line);
110
122
 * \param filename      physical file name (output)
111
123
 * \param file_line     physical line number (output)
112
124
 */
 
125
YASM_LIB_DECL
113
126
void yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line,
114
127
                         /*@out@*/ const char **filename,
115
128
                         /*@out@*/ unsigned long *file_line);
122
135
 * \return Stops early (and returns func's return value) if func returns a
123
136
 *         nonzero value; otherwise 0.
124
137
 */
 
138
YASM_LIB_DECL
125
139
int yasm_linemap_traverse_filenames
126
140
    (yasm_linemap *linemap, /*@null@*/ void *d,
127
141
     int (*func) (const char *filename, void *d));