+2000-02-08 Andreas Jaeger <aj@suse.de>
+
+ * locale/programs/locale.c (write_locales): Fix handling of
+ whitespace lines.
+ Fixes PR libc/1588, reported by Miroslav Holcak
+ <miroslav.holcak@vitkovice.cz>.
+
2000-02-07 Thorsten Kukuk <kukuk@suse.de>
* config.make.in: Add infodir.
/* Implementation of the locale program according to POSIX 9945-2.
- Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
cp = buf;
/* Ignore leading white space. */
- while (isspace (cp[0]))
+ while (isspace (cp[0]) && cp[0] != '\n')
++cp;
/* A leading '#' signals a comment line. */
- if (cp[0] != '\0' && cp[0] != '#')
+ if (cp[0] != '\0' && cp[0] != '#' && cp[0] != '\n')
{
alias = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))