projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Yesterday's changes.
[gnulib.git]
/
lib
/
readtokens.c
diff --git
a/lib/readtokens.c
b/lib/readtokens.c
index
438441c
..
c352552
100644
(file)
--- a/
lib/readtokens.c
+++ b/
lib/readtokens.c
@@
-13,7
+13,7
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 5
9 Temple Place - Suite 330, Boston, MA 02111-1307
, USA.
+ Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
, USA.
Written by Jim Meyering. */
Written by Jim Meyering. */
@@
-32,9
+32,12
@@
#include <string.h>
#include <stdbool.h>
#include <string.h>
#include <stdbool.h>
-#include "unlocked-io.h"
#include "xalloc.h"
#include "xalloc.h"
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
#define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \
&& strcmp(a, b) == 0))
#define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \
&& strcmp(a, b) == 0))
@@
-96,7
+99,10
@@
readtoken (FILE *stream,
saved_delim = delim;
memset (isdelim, 0, sizeof isdelim);
for (j = 0; j < n_delim; j++)
saved_delim = delim;
memset (isdelim, 0, sizeof isdelim);
for (j = 0; j < n_delim; j++)
- isdelim[(unsigned char) delim[j]] = 1;
+ {
+ unsigned char ch = delim[j];
+ isdelim[ch] = 1;
+ }
}
/* FIXME: don't fool with this caching. Use strchr instead. */
}
/* FIXME: don't fool with this caching. Use strchr instead. */