Lines Matching defs:pos
214 void srcpos_update(struct srcpos *pos, const char *text, int len)
218 pos->file = current_srcfile;
220 pos->first_line = current_srcfile->lineno;
221 pos->first_column = current_srcfile->colno;
234 pos->last_line = current_srcfile->lineno;
235 pos->last_column = current_srcfile->colno;
239 srcpos_copy(struct srcpos *pos)
244 memcpy(pos_new, pos, sizeof(struct srcpos));
252 srcpos_dump(struct srcpos *pos)
255 pos->file ? (char *) pos->file : "<no file>");
256 printf("first_line : %d\n", pos->first_line);
257 printf("first_column: %d\n", pos->first_column);
258 printf("last_line : %d\n", pos->last_line);
259 printf("last_column : %d\n", pos->last_column);
260 printf("file : %s\n", pos->file->name);
265 srcpos_string(struct srcpos *pos)
271 if (pos)
272 fname = pos->file->name;
275 if (pos->first_line != pos->last_line)
277 pos->first_line, pos->first_column,
278 pos->last_line, pos->last_column);
279 else if (pos->first_column != pos->last_column)
281 pos->first_line, pos->first_column,
282 pos->last_column);
285 pos->first_line, pos->first_column);
293 void srcpos_verror(struct srcpos *pos, const char *prefix,
298 srcstr = srcpos_string(pos);
307 void srcpos_error(struct srcpos *pos, const char *prefix,
313 srcpos_verror(pos, prefix, fmt, va);