+2014-04-16 Daiki Ueno <ueno@gnu.org>
+
+ * msgfmt.c (get_languages): Allow any whitespace character as a
+ list separator in LINGUAS.
+
2014-04-15 Daiki Ueno <ueno@gnu.org>
msgfilter: Add 'quot' and 'boldquot' built-in filters
while (!feof (fp))
{
+ char *start;
+
/* Read next line from file. */
int len = getline (&line_buf, &line_len, fp);
if (*line_buf == '\0' || *line_buf == '#')
continue;
- string_list_append_unique (languages, line_buf);
+ /* Split the line by whitespace and build the languages list. */
+ start = line_buf;
+ while (*start != '\0')
+ {
+ char *end = start;
+ int c;
+
+ while (*end != '\0' && *end != ' ' && *end != '\t')
+ end++;
+
+ c = *end;
+ *end = '\0';
+ string_list_append_unique (languages, start);
+
+ if (c == '\0')
+ break;
+
+ start = end + 1;
+ while (*start == ' ' || *start == '\t')
+ start++;
+ }
}
free (line_buf);