1 /* Message translation initialization for English.
2 Copyright (C) 2001-2003 Free Software Foundation, Inc.
3 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 #include "msgl-english.h"
33 msgdomain_list_english (msgdomain_list_ty
*mdlp
)
37 for (k
= 0; k
< mdlp
->nitems
; k
++)
39 message_list_ty
*mlp
= mdlp
->item
[k
]->messages
;
41 for (j
= 0; j
< mlp
->nitems
; j
++)
43 message_ty
*mp
= mlp
->item
[j
];
45 if (mp
->msgid_plural
== NULL
)
47 if (mp
->msgstr_len
== 1 && mp
->msgstr
[0] == '\0')
49 mp
->msgstr
= mp
->msgid
; /* no need for xstrdup */
50 mp
->msgstr_len
= strlen (mp
->msgid
) + 1;
55 if (mp
->msgstr_len
== 2
56 && mp
->msgstr
[0] == '\0' && mp
->msgstr
[1] == '\0')
58 size_t len0
= strlen (mp
->msgid
) + 1;
59 size_t len1
= strlen (mp
->msgid_plural
) + 1;
60 char *cp
= (char *) xmalloc (len0
+ len1
);
61 memcpy (cp
, mp
->msgid
, len0
);
62 memcpy (cp
+ len0
, mp
->msgid_plural
, len1
);
64 mp
->msgstr_len
= len0
+ len1
;