+2001-05-05 Karl Eichwalder <ke@suse.de>
+
+ * xgettext.c (read_name_from_file): Remove trailing space from line.
+ * msgcomm.c (read_name_from_file): Likewise.
+
2001-05-02 Bruno Haible <haible@clisp.cons.org>
* po-charset.c: Don't include stdio.h, stdlib.h, mbswidth.h. Include
if (len < 0)
break;
- /* Remove trailing '\n'. */
+ /* Remove trailing '\n' and trailing whitespace. */
if (len > 0 && line_buf[len - 1] == '\n')
line_buf[--len] = '\0';
+ while (len > 0
+ && (line_buf[len - 1] == ' '
+ || line_buf[len - 1] == '\t'
+ || line_buf[len - 1] == '\r'))
+ line_buf[--len] = '\0';
/* Test if we have to ignore the line. */
if (*line_buf == '\0' || *line_buf == '#')
if (len < 0)
break;
- /* Remove trailing '\n'. */
+ /* Remove trailing '\n' and trailing whitespace. */
if (len > 0 && line_buf[len - 1] == '\n')
line_buf[--len] = '\0';
+ while (len > 0
+ && (line_buf[len - 1] == ' '
+ || line_buf[len - 1] == '\t'
+ || line_buf[len - 1] == '\r'))
+ line_buf[--len] = '\0';
/* Test if we have to ignore the line. */
if (*line_buf == '\0' || *line_buf == '#')