Lines Matching refs:loc
58 location_compute (location *loc, boundary *cur, char const *token, size_t size) in location_compute() argument
66 loc->start = *cur; in location_compute()
90 loc->end = *cur; in location_compute()
92 if (line == INT_MAX && loc->start.line != INT_MAX) in location_compute()
93 warn_at (*loc, _("line number overflow")); in location_compute()
94 if (column == INT_MAX && loc->start.column != INT_MAX) in location_compute()
95 warn_at (*loc, _("column number overflow")); in location_compute()
102 location_print (FILE *out, location loc) in location_print() argument
105 int end_col = 0 != loc.end.column ? loc.end.column - 1 : 0; in location_print()
107 quotearg_n_style (3, escape_quoting_style, loc.start.file)); in location_print()
108 if (0 <= loc.start.line) in location_print()
110 res += fprintf (out, ":%d", loc.start.line); in location_print()
111 if (0 <= loc.start.column) in location_print()
112 res += fprintf (out, ".%d", loc.start.column); in location_print()
114 if (loc.start.file != loc.end.file) in location_print()
118 loc.end.file)); in location_print()
119 if (0 <= loc.end.line) in location_print()
121 res += fprintf (out, ":%d", loc.end.line); in location_print()
126 else if (0 <= loc.end.line) in location_print()
128 if (loc.start.line < loc.end.line) in location_print()
130 res += fprintf (out, "-%d", loc.end.line); in location_print()
134 else if (0 <= end_col && loc.start.column < end_col) in location_print()
161 location_caret (FILE *out, location loc) in location_caret() argument
166 || (caret_info.source = fopen (loc.start.file, "r"))) in location_caret()
167 || loc.start.column == -1 || loc.start.line == -1) in location_caret()
173 if (caret_info.line <= loc.start.line) in location_caret()
183 while (caret_info.line < loc.start.line) in location_caret()
196 int end = loc.start.line != loc.end.line ? len : loc.end.column; in location_caret()
203 fprintf (out, " %*s", loc.start.column - 1, ""); in location_caret()
205 int i = loc.start.column; in location_caret()