+2008-05-26 Bruno Haible <bruno@clisp.org>
+
+ * gettext-po.c (po_header_field, po_header_set_field): Recognize a
+ field also if there is no space after the ':'.
+ Reported by Nacho <nacho.resa@gmail.com>.
+
2007-11-07 Bruno Haible <bruno@clisp.org>
* gettext-0.17 released.
/* Public API for GNU gettext PO files.
- Copyright (C) 2003-2007 Free Software Foundation, Inc.
+ Copyright (C) 2003-2008 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
for (line = header;;)
{
- if (strncmp (line, field, field_len) == 0
- && line[field_len] == ':' && line[field_len + 1] == ' ')
+ if (strncmp (line, field, field_len) == 0 && line[field_len] == ':')
{
const char *value_start;
const char *value_end;
char *value;
- value_start = line + field_len + 2;
+ value_start = line + field_len + 1;
+ if (*value_start == ' ')
+ value_start++;
value_end = strchr (value_start, '\n');
if (value_end == NULL)
value_end = value_start + strlen (value_start);
for (line = header;;)
{
- if (strncmp (line, field, field_len) == 0
- && line[field_len] == ':' && line[field_len + 1] == ' ')
+ if (strncmp (line, field, field_len) == 0 && line[field_len] == ':')
{
const char *oldvalue_start;
const char *oldvalue_end;
size_t result_len;
char *result;
- oldvalue_start = line + field_len + 2;
+ oldvalue_start = line + field_len + 1;
+ if (*oldvalue_start == ' ')
+ oldvalue_start++;
oldvalue_end = strchr (oldvalue_start, '\n');
if (oldvalue_end == NULL)
oldvalue_end = oldvalue_start + strlen (oldvalue_start);
+2008-05-26 Bruno Haible <bruno@clisp.org>
+
+ * msginit.c (get_field, put_field): Recognize a field also if there is
+ no space after the ':'.
+ Reported by Nacho <nacho.resa@gmail.com>.
+
2008-05-16 Bruno Haible <bruno@clisp.org>
- * gettext-tools/src/msgl-iconv.c (iconvable_prev_msgid): Fix typo.
+ * msgl-iconv.c (iconvable_prev_msgid): Fix typo.
Reported by Karl Eichwalder <ke@novell.com>
via Philipp Thomas <pth@novell.com>
at <https://bugzilla.novell.com/show_bug.cgi?id=391372>.
for (line = header;;)
{
- if (strncmp (line, field, len) == 0
- && line[len] == ':' && line[len + 1] == ' ')
+ if (strncmp (line, field, len) == 0 && line[len] == ':')
{
const char *value_start;
const char *value_end;
char *value;
- value_start = line + len + 2;
+ value_start = line + len + 1;
+ if (*value_start == ' ')
+ value_start++;
value_end = strchr (value_start, '\n');
if (value_end == NULL)
value_end = value_start + strlen (value_start);
for (line = old_header;;)
{
- if (strncmp (line, field, len) == 0
- && line[len] == ':' && line[len + 1] == ' ')
+ if (strncmp (line, field, len) == 0 && line[len] == ':')
{
const char *value_start;
const char *value_end;
- value_start = line + len + 2;
+ value_start = line + len + 1;
+ if (*value_start == ' ')
+ value_start++;
value_end = strchr (value_start, '\n');
if (value_end == NULL)
value_end = value_start + strlen (value_start);