unsigned pos = 0;
if (loc)
- pos += location_print (stderr, *loc);
+ pos += location_print (*loc, stderr);
else
pos += fprintf (stderr, "%s", current_file ? current_file : program_name);
pos += fprintf (stderr, ": ");
putc ('\n', stderr);
fflush (stderr);
if (loc && feature_flag & feature_caret && !(flags & no_caret))
- location_caret (stderr, *loc);
+ location_caret (*loc, stderr);
}
}
fflush (stderr);
/* Output to OUT the location LOC.
Warning: it uses quotearg's slot 3. */
unsigned
-location_print (FILE *out, location loc)
+location_print (location loc, FILE *out)
{
unsigned res = 0;
int end_col = 0 != loc.end.column ? loc.end.column - 1 : 0;
}
void
-location_caret (FILE *out, location loc)
+location_caret (location loc, FILE *out)
{
/* FIXME: find a way to support multifile locations, and only open once each
file. That would make the procedure future-proof. */
/* Print location to file. Return number of actually printed
characters. */
-unsigned location_print (FILE *out, location loc);
+unsigned location_print (location loc, FILE *out);
/* Free any allocated ressources and close any open file handles that are
left-over by the usage of location_caret. */
void cleanup_caret (void);
/* Output to OUT the line and caret corresponding to location LOC. */
-void location_caret (FILE *out, location loc);
+void location_caret (location loc, FILE *out);
/* Return -1, 0, 1, depending whether a is before, equal, or
after b. */
static YYLTYPE lloc_default (YYLTYPE const *, int);
#define YY_LOCATION_PRINT(File, Loc) \
- location_print (File, Loc)
+ location_print (Loc, File)
static void version_check (location const *loc, char const *version);