}while(0)
#endif /* ! HAVE_DECL___func__ */
-/* Convert a hexadecimal digit string to an integer value. */
-extern unsigned int htoui(unsigned char[]);
-
/* Report an error message formatted */
extern void lerr(const char *, ...)
#if defined(__GNUC__) && __GNUC__ >= 3
/* Return character corresponding to escape sequence. */
extern unsigned char myesc(unsigned char[]);
-/* Convert an octal digit string to an integer value. */
-extern unsigned int otoui(unsigned char[]);
-
/* Output a (possibly-formatted) string to the generated scanner. */
extern void out(const char *);
extern void out_dec(const char *, int);
}
-/* htoui - convert a hexadecimal digit string to an unsigned integer value */
-
-unsigned int htoui (unsigned char str[])
-{
- unsigned int result;
-
- (void) sscanf ((char *) str, "%x", &result);
-
- return result;
-}
-
-
/* lerr - report an error message */
void lerr (const char *msg, ...)
c = array[sptr];
array[sptr] = '\0';
- esc_char = (unsigned char) otoui (array + 1);
+ esc_char = (unsigned char) strtoul (array + 1, NULL, 8);
array[sptr] = c;
c = array[sptr];
array[sptr] = '\0';
- esc_char = (unsigned char) htoui (array + 2);
+ esc_char = (unsigned char) strtoul (array + 2, NULL, 16);
array[sptr] = c;
}
-/* otoui - convert an octal digit string to an unsigned integer value */
-
-unsigned int otoui (unsigned char str[])
-{
- unsigned int result;
-
- (void) sscanf ((char *) str, "%o", &result);
- return result;
-}
-
-
/* out - various flavors of outputing a (possibly formatted) string for the
* generated scanner, keeping track of the line count.
*/