+2005-02-10 Bruno Haible <bruno@clisp.org>
+
+ * windows/gettextpo.def: Add po_message_set_extracted_comments.
+
2005-02-07 Bruno Haible <bruno@clisp.org>
* windows/gettextlib.def: Add c_strcasecmp, c_strncasecmp.
+2005-02-10 Bruno Haible <bruno@clisp.org>
+
+ * gettext-po.h (po_message_set_extracted_comments): New declaration.
+ * gettext-po.c (po_message_set_extracted_comments): New function.
+ Suggested by Asgeir Frimannsson <asgeirf@redhat.com>.
+
2005-02-08 Bruno Haible <bruno@clisp.org>
* msginit.c (get_user_email): Cast _() to 'char *', to avoid compiler
}
+/* Change the extracted comments for a message.
+ comments should be a multiline string, ending in a newline, or empty. */
+
+void
+po_message_set_extracted_comments (po_message_t message, const char *comments)
+{
+ message_ty *mp = (message_ty *) message;
+ string_list_ty *slp = string_list_alloc ();
+
+ {
+ char *copy = xstrdup (comments);
+ char *rest;
+
+ rest = copy;
+ while (*rest != '\0')
+ {
+ char *newline = strchr (rest, '\n');
+
+ if (newline != NULL)
+ {
+ *newline = '\0';
+ string_list_append (slp, rest);
+ rest = newline + 1;
+ }
+ else
+ {
+ string_list_append (slp, rest);
+ break;
+ }
+ }
+ free (copy);
+ }
+
+ if (mp->comment_dot != NULL)
+ string_list_free (mp->comment_dot);
+
+ mp->comment_dot = slp;
+}
+
+
/* Return the i-th file position for a message, or NULL if i is out of
range. */
/* Public API for GNU gettext PO files - contained in libgettextpo.
- Copyright (C) 2003-2004 Free Software Foundation, Inc.
+ Copyright (C) 2003-2005 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
/* Return the extracted comments for a message. */
extern const char * po_message_extracted_comments (po_message_t message);
+/* Change the extracted comments for a message.
+ comments should be a multiline string, ending in a newline, or empty. */
+extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
+
/* Return the i-th file position for a message, or NULL if i is out of
range. */
extern po_filepos_t po_message_filepos (po_message_t message, int i);
po_message_msgstr
po_message_msgstr_plural
po_message_set_comments
+po_message_set_extracted_comments
po_message_set_format
po_message_set_fuzzy
po_message_set_msgid