summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flexdef.h4
-rw-r--r--src/misc.c12
-rw-r--r--to.do/unicode/flexdef.h6
-rw-r--r--to.do/unicode/misc.c12
4 files changed, 17 insertions, 17 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 *);
diff --git a/src/misc.c b/src/misc.c
index a2f67fc..62a29d9 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -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;
diff --git a/to.do/unicode/flexdef.h b/to.do/unicode/flexdef.h
index 8e44c26..7c5da64 100644
--- a/to.do/unicode/flexdef.h
+++ b/to.do/unicode/flexdef.h
@@ -853,7 +853,7 @@ extern void flexerror PROTO((const char[]));
extern void flexfatal PROTO((const char[]));
/* Convert a hexadecimal digit string to an integer value. */
-extern int htoi PROTO((Char[]));
+extern unsigned int htoui PROTO((Char[]));
/* Report an error message formatted with one integer argument. */
extern void lerrif PROTO((const char[], int));
@@ -883,8 +883,8 @@ extern int myctoi PROTO((char []));
/* Return character corresponding to escape sequence. */
extern int myesc PROTO((Char[]));
-/* Convert an octal digit string to an integer value. */
-extern int otoi PROTO((Char [] ));
+/* Convert an octal digit string to an unsigned integer value. */
+extern unsigned int otoui PROTO((Char [] ));
/* Output a (possibly-formatted) string to the generated scanner. */
extern void out PROTO((const char []));
diff --git a/to.do/unicode/misc.c b/to.do/unicode/misc.c
index f107415..87f3f74 100644
--- a/to.do/unicode/misc.c
+++ b/to.do/unicode/misc.c
@@ -299,9 +299,9 @@ 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( str )
+unsigned int htoui( str )
Char str[];
{
unsigned int result;
@@ -526,7 +526,7 @@ Char array[];
c = array[sptr];
array[sptr] = '\0';
- esc_char = otoi( array + 1 );
+ esc_char = otoui( array + 1 );
array[sptr] = c;
@@ -548,7 +548,7 @@ Char array[];
c = array[sptr];
array[sptr] = '\0';
- esc_char = htoi( array + 2 );
+ esc_char = htoui( array + 2 );
array[sptr] = c;
@@ -561,9 +561,9 @@ 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( str )
+unsigned int otoui( str )
Char str[];
{
unsigned int result;