diff options
author | Werner Koch <wk@gnupg.org> | 2013-07-15 13:48:38 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-07-15 13:48:38 +0200 |
commit | 659389fb01a924f1c2b24f59d2c2d6cccb17ce4e (patch) | |
tree | bfb8d72342967666a4cc371c6545ebe777fa1989 /src/w32-gettext.c | |
parent | 670dc6c4a7082370be29861e13310555f62f2b4b (diff) | |
download | libgpg-error-659389fb01a924f1c2b24f59d2c2d6cccb17ce4e.tar.gz |
Remove trailing spaces from w32-gettext.c.
--
Diffstat (limited to 'src/w32-gettext.c')
-rw-r--r-- | src/w32-gettext.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/w32-gettext.c b/src/w32-gettext.c index fbb256e..936cafe 100644 --- a/src/w32-gettext.c +++ b/src/w32-gettext.c @@ -3,17 +3,17 @@ 2008, 2010 Free Software Foundation, Inc. This file is part of libgpg-error. - + libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + libgpg-error is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ @@ -634,8 +634,8 @@ MyCreateFileA (LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSharedMode, #ifndef SUBLANG_UZBEK_CYRILLIC #define SUBLANG_UZBEK_CYRILLIC 0x02 #endif - -/* Return an XPG style locale name + +/* Return an XPG style locale name language[_territory[.codeset]][@modifier]. Don't even bother determining the codeset; it's not useful in this context, because message catalogs are not specific to a single @@ -1081,7 +1081,7 @@ hash_string (const char *str_param) { unsigned long int hval, g; const char *str = str_param; - + hval = 0; while (*str != '\0') { @@ -1225,7 +1225,7 @@ free_domain (struct loaded_domain *domain) jnlib_free (domain); } - + static struct loaded_domain * load_domain (const char *filename) { @@ -1293,7 +1293,7 @@ load_domain (const char *filename) domain->data = (char *) data; domain->data_native = (char *) data + size; domain->must_swap = data->magic != MAGIC; - + /* Fill in the information about the available tables. */ switch (SWAPIT (domain->must_swap, data->revision)) { @@ -1307,7 +1307,7 @@ load_domain (const char *filename) that many translations is very unlikely given that GnuPG with its very large number of strings has only about 1600 strings + variants. */ - nstrings = SWAPIT (domain->must_swap, data->nstrings); + nstrings = SWAPIT (domain->must_swap, data->nstrings); if (nstrings > 65534) goto bailout; domain->nstrings = nstrings; @@ -1353,7 +1353,7 @@ utf8_to_wchar (const char *string, size_t length, size_t *retlen) return NULL; nbytes = (size_t)(n+1) * sizeof(*result); - if (nbytes / sizeof(*result) != (n+1)) + if (nbytes / sizeof(*result) != (n+1)) { gpg_err_set_errno (ENOMEM); return NULL; @@ -1606,17 +1606,17 @@ get_string (struct loaded_domain *domain, uint32_t idx, + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); translen = SWAPIT(domain->must_swap, domain->trans_tab[idx].length); } - else if (!domain->mapped[idx]) + else if (!domain->mapped[idx]) { /* Not yet mapped. Map from utf-8 to native encoding now. */ const char *p_utf8; size_t plen_utf8, buflen; char *buf; - p_utf8 = (domain->data + p_utf8 = (domain->data + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); plen_utf8 = SWAPIT(domain->must_swap, domain->trans_tab[idx].length); - + buf = utf8_to_native (p_utf8, plen_utf8, &buflen); if (!buf) { @@ -1628,7 +1628,7 @@ get_string (struct loaded_domain *domain, uint32_t idx, /* Copy into the DATA_NATIVE area. */ char *p_tmp; - p_tmp = (domain->data_native + p_tmp = (domain->data_native + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); memcpy (p_tmp, buf, buflen); domain->mapped[idx] = buflen; @@ -1664,7 +1664,7 @@ get_string (struct loaded_domain *domain, uint32_t idx, } jnlib_free (buf); } - else if (domain->mapped[idx] == 1) + else if (domain->mapped[idx] == 1) { /* The translated string is in the overflow_space. */ for (os=domain->overflow_space; os; os = os->next) @@ -1681,8 +1681,8 @@ get_string (struct loaded_domain *domain, uint32_t idx, translen = 0; } } - else - { + else + { trans = (domain->data_native + SWAPIT(domain->must_swap, domain->trans_tab[idx].offset)); translen = domain->mapped[idx]; @@ -1696,7 +1696,7 @@ get_string (struct loaded_domain *domain, uint32_t idx, static const char * -do_gettext (const char *domainname, +do_gettext (const char *domainname, const char *msgid, const char *msgid2, unsigned long nplural) { struct domainlist_s *dl; @@ -1704,14 +1704,14 @@ do_gettext (const char *domainname, int load_failed; uint32_t top, bottom, nstr; char *filename; - + if (!domainname) domainname = current_domainname? current_domainname : ""; /* FIXME: The whole locking stuff is a bit questionable because gettext does not claim to be thread-safe. We need to investigate this further. */ - + load_failed = 0; domain = NULL; filename = NULL; @@ -1763,7 +1763,7 @@ do_gettext (const char *domainname, domain = NULL; } } - + if (!domain) goto not_found; /* No MO file. */ @@ -1780,7 +1780,7 @@ do_gettext (const char *domainname, { nstr--; if (nstr < domain->nstrings - && SWAPIT(domain->must_swap, + && SWAPIT(domain->must_swap, domain->orig_tab[nstr].length) >= len && !strcmp (msgid, (domain->data + SWAPIT(domain->must_swap, @@ -1803,7 +1803,7 @@ do_gettext (const char *domainname, while (bottom < top) { int cmp_val; - + nstr = (bottom + top) / 2; cmp_val = strcmp (msgid, (domain->data + SWAPIT(domain->must_swap, @@ -1909,10 +1909,10 @@ _gpg_w32_gettext_use_utf8 (int value) int main (int argc, char **argv) { - const char atext1[] = + const char atext1[] = "Warning: You have entered an insecure passphrase.%%0A" "A passphrase should be at least %u character long."; - const char atext2[] = + const char atext2[] = "Warning: You have entered an insecure passphrase.%%0A" "A passphrase should be at least %u characters long."; @@ -1921,7 +1921,7 @@ main (int argc, char **argv) argc--; argv++; } - + _gpg_err_w32_bindtextdomain ("gnupg2", "c:/programme/gnu/gnupg/share/locale"); printf ("locale is `%s'\n", _gpg_err_w32_gettext_localename ()); |