/* readtokens.c -- Functions for reading tokens from an input stream.
- Copyright (C) 1990-1991, 1999 Jim Meyering.
+ Copyright (C) 1990-1991, 1999, 2001, 2003 Jim Meyering.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
#include "readtokens.h"
-void *xmalloc ();
-void *xrealloc ();
+#include "unlocked-io.h"
+#include "xalloc.h"
#define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \
&& strcmp(a, b) == 0))
if (!same_delimiters)
{
const char *t;
+ unsigned int j;
saved_delim = delim;
- for (i = 0; i < sizeof (isdelim); i++)
- isdelim[i] = 0;
+ for (j = 0; j < sizeof (isdelim); j++)
+ isdelim[j] = 0;
for (t = delim; *t; t++)
- isdelim[(unsigned int) *t] = 1;
+ isdelim[(unsigned char) *t] = 1;
}
p = tokenbuffer->buffer;