X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Freadtokens.c;h=c3525524fdd60d26ef33a8450cbbfd0d8cc18466;hb=ef40bd4ace778faa7f6201a9a60a0300894e7f68;hp=438441c4e535c930571f677b2b53b17fa437570e;hpb=5838d4303c49ad4fe32f9e01a7b30c89ecddac5a;p=gnulib.git diff --git a/lib/readtokens.c b/lib/readtokens.c index 438441c4e..c3525524f 100644 --- 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, - 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. */ @@ -32,9 +32,12 @@ #include #include -#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. */