Yesterday's changes.
[gnulib.git] / lib / readtokens.c
index 438441c..c352552 100644 (file)
@@ -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,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
    Written by Jim Meyering. */
 
 #include <string.h>
 #include <stdbool.h>
 
-#include "unlocked-io.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))
 
@@ -96,7 +99,10 @@ readtoken (FILE *stream,
       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.  */