msgstr ""
"Project-Id-Version: cdecl99 0.1\n"
"Report-Msgid-Bugs-To: nbowler@draconx.ca\n"
-"POT-Creation-Date: 2011-10-06 14:48-0400\n"
+"POT-Creation-Date: 2020-06-29 22:52-0400\n"
"PO-Revision-Date: 2011-09-13 21:54-0400\n"
"Last-Translator: Nick Bowler <nbowler@draconx.ca>\n"
"Language-Team: English\n"
msgid "%s: invalid option -- '%c'\n"
msgstr ""
-#: lib/getopt.c:858 lib/getopt.c:875 lib/getopt.c:1083 lib/getopt.c:1101
+#: lib/getopt.c:861 lib/getopt.c:878 lib/getopt.c:1088 lib/getopt.c:1106
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr ""
-#: lib/getopt.c:931 lib/getopt.c:947
+#: lib/getopt.c:934 lib/getopt.c:950
#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
msgstr ""
-#: lib/getopt.c:971 lib/getopt.c:989
+#: lib/getopt.c:974 lib/getopt.c:992
#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr ""
-#: lib/getopt.c:1010 lib/getopt.c:1028
+#: lib/getopt.c:1013 lib/getopt.c:1031
#, c-format
msgid "%s: option '-W %s' requires an argument\n"
msgstr ""
-#: src/cdecl99.c:38
+#: src/cdecl99.c:43
msgctxt "longopt"
msgid "quiet"
msgstr ""
-#: src/cdecl99.c:39
+#: src/cdecl99.c:44
msgctxt "longopt"
msgid "batch"
msgstr ""
-#: src/cdecl99.c:40
+#: src/cdecl99.c:45
msgctxt "longopt"
msgid "interactive"
msgstr ""
-#: src/cdecl99.c:41
+#: src/cdecl99.c:46
msgctxt "longopt"
msgid "file"
msgstr ""
-#: src/cdecl99.c:42
+#: src/cdecl99.c:47
msgctxt "longopt"
msgid "execute"
msgstr ""
-#: src/cdecl99.c:43
+#: src/cdecl99.c:48
msgctxt "longopt"
msgid "version"
msgstr ""
-#: src/cdecl99.c:44
+#: src/cdecl99.c:49
msgctxt "longopt"
msgid "help"
msgstr ""
-#: src/cdecl99.c:62
+#. TRANSLATORS: Help messages are indented 20 spaces and thus should
+#. not have lines longer than 60 columns.
+#.
+#: src/cdecl99.c:67
msgid "Suppress the welcome message.\n"
msgstr ""
-#: src/cdecl99.c:63
+#: src/cdecl99.c:68
msgid "Execute commands as normal, but do not print any prompts.\n"
msgstr ""
-#: src/cdecl99.c:64
+#: src/cdecl99.c:69
msgid "Run in interactive mode. This is the default.\n"
msgstr ""
-#: src/cdecl99.c:65
+#: src/cdecl99.c:70
msgid "Read commands from FILE instead of standard input.\n"
msgstr ""
-#: src/cdecl99.c:66
+#: src/cdecl99.c:71
msgctxt "longopt|file"
msgid "FILE"
msgstr ""
-#: src/cdecl99.c:67
+#: src/cdecl99.c:72
msgid ""
"Execute COMMAND as if it were entered at the prompt.\n"
"This can be specified multiple times.\n"
msgstr ""
-#: src/cdecl99.c:69
+#: src/cdecl99.c:74
msgctxt "longopt|execute"
msgid "COMMAND"
msgstr ""
-#: src/cdecl99.c:70
+#: src/cdecl99.c:75
msgid "Print a version message and then exit.\n"
msgstr ""
-#: src/cdecl99.c:71
+#: src/cdecl99.c:76
msgid "Print this message.\n"
msgstr ""
#. TRANSLATORS: ARG is only used for options without help text.
-#: src/cdecl99.c:74
+#: src/cdecl99.c:79
msgctxt "longopt"
msgid "ARG"
msgstr ""
-#. TRANSLATORS: (C) must *always* be translated as ©.
-#: src/cdecl99.c:81
-msgid "(C)"
-msgstr "©"
-
-#: src/cdecl99.c:132
+#: src/cdecl99.c:147
#, c-format
msgid " -%c"
msgstr ""
-#: src/cdecl99.c:135
+#: src/cdecl99.c:150
#, c-format
msgid " -%c, --%s=%s"
msgstr ""
-#: src/cdecl99.c:136
+#: src/cdecl99.c:151
#, c-format
msgid " -%c, --%s"
msgstr ""
-#: src/cdecl99.c:141
+#: src/cdecl99.c:156
#, c-format
msgid " -%c, --%s=%s, --%s=%s"
msgstr ""
-#: src/cdecl99.c:145
+#: src/cdecl99.c:160
#, c-format
msgid " -%c, --%s, --%s"
msgstr ""
-#: src/cdecl99.c:181
+#: src/cdecl99.c:196
msgid ""
"This is \"cdecl99\": a command-line tool for parsing and constructing\n"
"complicated C declarations.\n"
"This is “cdecl99”: a command-line tool for parsing and constructing\n"
"complicated C declarations.\n"
-#: src/cdecl99.c:184
+#: src/cdecl99.c:199
msgid "Options:"
msgstr ""
-#: src/cdecl99.c:193
+#: src/cdecl99.c:208
msgid "For more information, see the cdecl99(1) man page.\n"
msgstr ""
-#: src/cdecl99.c:199
+#. TRANSLATORS: Please add *another line* indicating where users should
+#. report translation bugs.
+#.
+#: src/cdecl99.c:214
#, c-format
msgid "Report bugs to <%s>.\n"
msgstr ""
/*
* Command line utility for making sense of C declarations.
- * Copyright © 2011-2012 Nick Bowler
+ * Copyright © 2011-2012, 2020 Nick Bowler
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <locale.h>
-#include <getopt.h>
-#include <gettext.h>
#include <assert.h>
-#include "readline.h"
#include "history.h"
#include "cdecl.h"
+#include <getopt.h>
+#include <gettext.h>
+#include <readline.h>
+#include <striconv.h>
+#include <localcharset.h>
+
#define _(x) gettext(x)
#define N_(x) x
#define PN_(c, x) x
static void print_version(void)
{
+ const char *copysign = "(C)";
+ void *convsign = NULL;
+
+ if (ENABLE_NLS) {
+ convsign = str_iconv("\xc2\xa9", "UTF-8", locale_charset());
+ if (convsign)
+ copysign = convsign;
+ }
+
puts(PACKAGE_STRING);
- /* TRANSLATORS: (C) must *always* be translated as ©. */
- printf("Copyright %s 2011 Nick Bowler.\n", gettext("(C)"));
- puts("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.");
+ printf("Copyright %s 2020 Nick Bowler.\n", copysign);
+ puts("License GPLv3+: GNU GPL version 3 or any later version.");
puts("This is free software: you are free to change and redistribute it.");
puts("There is NO WARRANTY, to the extent permitted by law.");
+
+ free(convsign);
}
static void print_usage(FILE *f)
/* Initialize gettext and setup translated long options. */
static void init_i18n(void)
{
+ if (!ENABLE_NLS)
+ return;
+
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- if (!ENABLE_NLS)
- return;
-
for (int i = 0, j = NOPTS; i < NOPTS; i++) {
const char *tname = pgettext_expr("longopt", lopts[i].name);