Lines Matching refs:pos

232 void srcpos_update(struct srcpos *pos, const char *text, int len)  in srcpos_update()  argument
236 pos->file = current_srcfile; in srcpos_update()
238 pos->first_line = current_srcfile->lineno; in srcpos_update()
239 pos->first_column = current_srcfile->colno; in srcpos_update()
249 pos->last_line = current_srcfile->lineno; in srcpos_update()
250 pos->last_column = current_srcfile->colno; in srcpos_update()
254 srcpos_copy(struct srcpos *pos) in srcpos_copy() argument
259 if (!pos) in srcpos_copy()
263 assert(pos->next == NULL); in srcpos_copy()
264 memcpy(pos_new, pos, sizeof(struct srcpos)); in srcpos_copy()
268 memcpy(srcfile_state, pos->file, sizeof(struct srcfile_state)); in srcpos_copy()
274 struct srcpos *srcpos_extend(struct srcpos *pos, struct srcpos *newtail) in srcpos_extend() argument
278 if (!pos) in srcpos_extend()
281 for (p = pos; p->next != NULL; p = p->next); in srcpos_extend()
283 return pos; in srcpos_extend()
287 srcpos_string(struct srcpos *pos) in srcpos_string() argument
292 if (pos->file && pos->file->name) in srcpos_string()
293 fname = pos->file->name; in srcpos_string()
296 if (pos->first_line != pos->last_line) in srcpos_string()
298 pos->first_line, pos->first_column, in srcpos_string()
299 pos->last_line, pos->last_column); in srcpos_string()
300 else if (pos->first_column != pos->last_column) in srcpos_string()
302 pos->first_line, pos->first_column, in srcpos_string()
303 pos->last_column); in srcpos_string()
306 pos->first_line, pos->first_column); in srcpos_string()
312 srcpos_string_comment(struct srcpos *pos, bool first_line, int level) in srcpos_string_comment() argument
317 if (!pos) { in srcpos_string_comment()
326 if (!pos->file) in srcpos_string_comment()
328 else if (!pos->file->name) in srcpos_string_comment()
331 fname = pos->file->name; in srcpos_string_comment()
333 fname = shorten_to_initial_path(pos->file->name); in srcpos_string_comment()
337 fname = pos->file->name; in srcpos_string_comment()
342 pos->first_line, pos->first_column, in srcpos_string_comment()
343 pos->last_line, pos->last_column); in srcpos_string_comment()
346 first_line ? pos->first_line : pos->last_line); in srcpos_string_comment()
351 if (pos->next != NULL) { in srcpos_string_comment()
352 rest = srcpos_string_comment(pos->next, first_line, level); in srcpos_string_comment()
363 char *srcpos_string_first(struct srcpos *pos, int level) in srcpos_string_first() argument
365 return srcpos_string_comment(pos, true, level); in srcpos_string_first()
368 char *srcpos_string_last(struct srcpos *pos, int level) in srcpos_string_last() argument
370 return srcpos_string_comment(pos, false, level); in srcpos_string_last()
373 void srcpos_verror(struct srcpos *pos, const char *prefix, in srcpos_verror() argument
378 srcstr = srcpos_string(pos); in srcpos_verror()
387 void srcpos_error(struct srcpos *pos, const char *prefix, in srcpos_error() argument
393 srcpos_verror(pos, prefix, fmt, va); in srcpos_error()