aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 370f4ff..90933eb 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -32,7 +32,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
struct if_stack
{
struct if_stack *next;
- unsigned int line; /* Line where condition started. */
+ linenum_type line; /* Line where condition started. */
const cpp_hashnode *mi_cmacro;/* macro name for #ifndef around entire file */
bool skip_elses; /* Can future #else / #elif be skipped? */
bool was_skipping; /* If were skipping on entry. */
@@ -102,7 +102,7 @@ static char *glue_header_name (cpp_reader *);
static const char *parse_include (cpp_reader *, int *, const cpp_token ***);
static void push_conditional (cpp_reader *, int, int, const cpp_hashnode *);
static unsigned int read_flag (cpp_reader *, unsigned int);
-static int strtoul_for_line (const uchar *, unsigned int, unsigned long *);
+static int strtolinenum (const uchar *, unsigned int, linenum_type *);
static void do_diagnostic (cpp_reader *, int, int);
static cpp_hashnode *lex_macro_node (cpp_reader *, bool);
static int undefine_macros (cpp_reader *, cpp_hashnode *, void *);
@@ -840,9 +840,9 @@ read_flag (cpp_reader *pfile, unsigned int last)
of length LEN, to binary; store it in NUMP, and return 0 if the
number was well-formed, 1 if not. Temporary, hopefully. */
static int
-strtoul_for_line (const uchar *str, unsigned int len, long unsigned int *nump)
+strtolinenum (const uchar *str, unsigned int len, linenum_type *nump)
{
- unsigned long reg = 0;
+ linenum_type reg = 0;
uchar c;
while (len--)
{
@@ -871,16 +871,16 @@ do_line (cpp_reader *pfile)
unsigned char map_sysp = map->sysp;
const cpp_token *token;
const char *new_file = map->to_file;
- unsigned long new_lineno;
+ linenum_type new_lineno;
/* C99 raised the minimum limit on #line numbers. */
- unsigned int cap = CPP_OPTION (pfile, c99) ? 2147483647 : 32767;
+ linenum_type cap = CPP_OPTION (pfile, c99) ? 2147483647 : 32767;
/* #line commands expand macros. */
token = cpp_get_token (pfile);
if (token->type != CPP_NUMBER
- || strtoul_for_line (token->val.str.text, token->val.str.len,
- &new_lineno))
+ || strtolinenum (token->val.str.text, token->val.str.len,
+ &new_lineno))
{
if (token->type == CPP_EOF)
cpp_error (pfile, CPP_DL_ERROR, "unexpected end of file after #line");
@@ -925,7 +925,7 @@ do_linemarker (cpp_reader *pfile)
const struct line_map *map = &line_table->maps[line_table->used - 1];
const cpp_token *token;
const char *new_file = map->to_file;
- unsigned long new_lineno;
+ linenum_type new_lineno;
unsigned int new_sysp = map->sysp;
enum lc_reason reason = LC_RENAME;
int flag;
@@ -938,8 +938,8 @@ do_linemarker (cpp_reader *pfile)
/* #line commands expand macros. */
token = cpp_get_token (pfile);
if (token->type != CPP_NUMBER
- || strtoul_for_line (token->val.str.text, token->val.str.len,
- &new_lineno))
+ || strtolinenum (token->val.str.text, token->val.str.len,
+ &new_lineno))
{
/* Unlike #line, there does not seem to be a way to get an EOF
here. So, it should be safe to always spell the token. */
@@ -999,7 +999,7 @@ do_linemarker (cpp_reader *pfile)
and zero otherwise. */
void
_cpp_do_file_change (cpp_reader *pfile, enum lc_reason reason,
- const char *to_file, unsigned int file_line,
+ const char *to_file, linenum_type file_line,
unsigned int sysp)
{
const struct line_map *map = linemap_add (pfile->line_table, reason, sysp,