/* Locations for Bison
- Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#ifndef LOCATION_H_
# define LOCATION_H_
+# include <stdbool.h>
+# include <stdio.h>
+# include <string.h> /* strcmp */
+
# include "uniqstr.h"
/* A boundary between two characters. */
void location_compute (location *loc,
boundary *cur, char const *token, size_t size);
-/* Print location to file. Return number of actually printed
- characters. */
+/* Print location to file.
+ Return number of actually printed characters.
+ Warning: uses quotearg's slot 3. */
unsigned location_print (location loc, FILE *out);
/* Free any allocated ressources and close any open file handles that are
return res;
}
-/* LOC_STR must be formatted as `file:line.column', it will be modified. */
+/* LOC_STR must be formatted as 'file:line.column', it will be modified. */
void boundary_set_from_string (boundary *bound, char *loc_str);
#endif /* ! defined LOCATION_H_ */