diff options
author | rlar <rlar> | 2016-02-28 16:49:53 +0100 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-03-08 13:19:20 -0500 |
commit | 1d5b34b52a77767763168175972aef3ebabbdf54 (patch) | |
tree | ce534c2081bf55cb181e3c6acbcf498a44494f42 /src | |
parent | 609af5775f7277679dc3bd966b36f04cf7ccf2a8 (diff) | |
download | flex-git-1d5b34b52a77767763168175972aef3ebabbdf54.tar.gz |
change return type and rename int htoi()/otoi() --> unsigned int htoui()/otoui()
Diffstat (limited to 'src')
-rw-r--r-- | src/flexdef.h | 4 | ||||
-rw-r--r-- | src/misc.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/flexdef.h b/src/flexdef.h index 27ad610..83e8888 100644 --- a/src/flexdef.h +++ b/src/flexdef.h @@ -844,7 +844,7 @@ extern void flexfatal(const char *); #endif /* ! HAVE_DECL___func__ */ /* Convert a hexadecimal digit string to an integer value. */ -extern int htoi(unsigned char[]); +extern unsigned int htoui(unsigned char[]); /* Report an error message formatted */ extern void lerr(const char *, ...) @@ -883,7 +883,7 @@ extern int myctoi(const char *); extern unsigned char myesc(unsigned char[]); /* Convert an octal digit string to an integer value. */ -extern int otoi(unsigned char[]); +extern unsigned int otoui(unsigned char[]); /* Output a (possibly-formatted) string to the generated scanner. */ extern void out(const char *); @@ -326,9 +326,9 @@ void flexfatal (const char *msg) } -/* htoi - convert a hexadecimal digit string to an integer value */ +/* htoui - convert a hexadecimal digit string to an unsigned integer value */ -int htoi (unsigned char str[]) +unsigned int htoui (unsigned char str[]) { unsigned int result; @@ -547,7 +547,7 @@ unsigned char myesc (unsigned char array[]) c = array[sptr]; array[sptr] = '\0'; - esc_char = otoi (array + 1); + esc_char = (unsigned char) otoui (array + 1); array[sptr] = c; @@ -569,7 +569,7 @@ unsigned char myesc (unsigned char array[]) c = array[sptr]; array[sptr] = '\0'; - esc_char = htoi (array + 2); + esc_char = (unsigned char) htoui (array + 2); array[sptr] = c; @@ -582,9 +582,9 @@ unsigned char myesc (unsigned char array[]) } -/* otoi - convert an octal digit string to an integer value */ +/* otoui - convert an octal digit string to an unsigned integer value */ -int otoi (unsigned char str[]) +unsigned int otoui (unsigned char str[]) { unsigned int result; |