summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-04-23 11:37:42 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:07:53 +0200
commitf5afb1e3000c298f23eedffe38e85dcdc977c7df (patch)
tree3dc1b5cf01c2562f4220b7043b8a6e3f93f1a9ea
parentbd4e6e4c87c23d518056ee4e418ddcc70a7b9d00 (diff)
downloadexternal_gettext-f5afb1e3000c298f23eedffe38e85dcdc977c7df.zip
external_gettext-f5afb1e3000c298f23eedffe38e85dcdc977c7df.tar.gz
external_gettext-f5afb1e3000c298f23eedffe38e85dcdc977c7df.tar.bz2
New option --no-wrap.
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/msgattrib.texi6
-rw-r--r--doc/msgcat.texi6
-rw-r--r--doc/msgcomm.texi6
-rw-r--r--doc/msgconv.texi6
-rw-r--r--doc/msgen.texi6
-rw-r--r--doc/msgfilter.texi6
-rw-r--r--doc/msggrep.texi6
-rw-r--r--doc/msginit.texi6
-rw-r--r--doc/msgmerge.texi6
-rw-r--r--doc/msgunfmt.texi6
-rw-r--r--doc/msguniq.texi6
-rw-r--r--doc/xgettext.texi6
-rw-r--r--src/ChangeLog21
-rw-r--r--src/msgattrib.c7
-rw-r--r--src/msgcat.c7
-rw-r--r--src/msgcomm.c7
-rw-r--r--src/msgconv.c8
-rw-r--r--src/msgen.c8
-rw-r--r--src/msgfilter.c7
-rw-r--r--src/msggrep.c7
-rw-r--r--src/msginit.c7
-rw-r--r--src/msgmerge.c7
-rw-r--r--src/msgunfmt.c7
-rw-r--r--src/msguniq.c7
-rw-r--r--src/write-po.c14
-rw-r--r--src/write-po.h5
-rw-r--r--src/xgettext.c6
28 files changed, 198 insertions, 3 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 0f6d74f..c9df294 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-23 Bruno Haible <bruno@clisp.org>
+
+ * msg*.texi, xgettext.texi: Document option --no-wrap.
+
2002-04-22 Bruno Haible <bruno@clisp.org>
* gettext.texi (Preparing Strings): New section.
diff --git a/doc/msgattrib.texi b/doc/msgattrib.texi
index 49eb4fd..ce89de4 100644
--- a/doc/msgattrib.texi
+++ b/doc/msgattrib.texi
@@ -144,6 +144,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgattrib} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgattrib} option}
diff --git a/doc/msgcat.texi b/doc/msgcat.texi
index 23d78b2..795ced5 100644
--- a/doc/msgcat.texi
+++ b/doc/msgcat.texi
@@ -132,6 +132,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgcat} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgcat} option}
diff --git a/doc/msgcomm.texi b/doc/msgcomm.texi
index e65bd07..7978619 100644
--- a/doc/msgcomm.texi
+++ b/doc/msgcomm.texi
@@ -119,6 +119,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgcomm} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgcomm} option}
diff --git a/doc/msgconv.texi b/doc/msgconv.texi
index 5a9c227..c850263 100644
--- a/doc/msgconv.texi
+++ b/doc/msgconv.texi
@@ -90,6 +90,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgconv} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgconv} option}
diff --git a/doc/msgen.texi b/doc/msgen.texi
index 770e055..429407c 100644
--- a/doc/msgen.texi
+++ b/doc/msgen.texi
@@ -83,6 +83,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgen} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgen} option}
diff --git a/doc/msgfilter.texi b/doc/msgfilter.texi
index 42bbd43..1431c15 100644
--- a/doc/msgfilter.texi
+++ b/doc/msgfilter.texi
@@ -135,6 +135,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgfilter} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgfilter} option}
diff --git a/doc/msggrep.texi b/doc/msggrep.texi
index 85a71d3..e66391a 100644
--- a/doc/msggrep.texi
+++ b/doc/msggrep.texi
@@ -162,6 +162,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msggrep} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item --sort-output
@opindex --sort-output@r{, @code{msggrep} option}
Generate sorted output. Note that using this option makes it much harder
diff --git a/doc/msginit.texi b/doc/msginit.texi
index 9eb9806..96aa34a 100644
--- a/doc/msginit.texi
+++ b/doc/msginit.texi
@@ -62,6 +62,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msginit} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@end table
@subsection Informative output
diff --git a/doc/msgmerge.texi b/doc/msgmerge.texi
index a670255..e073655 100644
--- a/doc/msgmerge.texi
+++ b/doc/msgmerge.texi
@@ -159,6 +159,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgmerge} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgmerge} option}
diff --git a/doc/msgunfmt.texi b/doc/msgunfmt.texi
index 353f839..a0051bb 100644
--- a/doc/msgunfmt.texi
+++ b/doc/msgunfmt.texi
@@ -118,6 +118,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msgunfmt} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msgunfmt} option}
diff --git a/doc/msguniq.texi b/doc/msguniq.texi
index 9d30730..eb3707f 100644
--- a/doc/msguniq.texi
+++ b/doc/msguniq.texi
@@ -116,6 +116,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{msguniq} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{msguniq} option}
diff --git a/doc/xgettext.texi b/doc/xgettext.texi
index 2ec9280..9143679 100644
--- a/doc/xgettext.texi
+++ b/doc/xgettext.texi
@@ -204,6 +204,12 @@ Set the output page width. Long strings in the output files will be
split across multiple lines in order to ensure that each line's width
(= number of screen columns) is less or equal to the given @var{number}.
+@item --no-wrap
+@opindex --no-wrap@r{, @code{xgettext} option}
+Do not break long message lines. Message lines whose width exceeds the
+output page width will not be split into several lines. Only file reference
+lines which are wider than the output page width will be split.
+
@item -s
@itemx --sort-output
@opindex -s@r{, @code{xgettext} option}
diff --git a/src/ChangeLog b/src/ChangeLog
index 8e9a7d0..70a52ad 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,24 @@
+2002-04-23 Bruno Haible <bruno@clisp.org>
+
+ * write-po.h (message_page_width_ignore): New declaration.
+ * write-po.c (wrap_strings): New variable.
+ (message_page_width_ignore): New function.
+ (wrap): Ignore the do_wrap argument if wrap_strings is false.
+ * msgattrib.c (long_options): Add --no-wrap option.
+ (main): Handle option --no-wrap.
+ (usage): Document option --no-wrap.
+ * msgcat.c: Likewise.
+ * msgcomm.c: Likewise.
+ * msgconv.c: Likewise.
+ * msgen.c: Likewise.
+ * msgfilter.c: Likewise.
+ * msggrep.c: Likewise.
+ * msginit.c: Likewise.
+ * msgmerge.c: Likewise.
+ * msgunfmt.c: Likewise.
+ * msguniq.c: Likewise.
+ * xgettext.c: Likewise.
+
2002-04-19 Bruno Haible <bruno@clisp.org>
* msginit.c (catalogname_for_locale): Add wa_BE. Change Javanese from
diff --git a/src/msgattrib.c b/src/msgattrib.c
index cb319ce..05622a3 100644
--- a/src/msgattrib.c
+++ b/src/msgattrib.c
@@ -81,6 +81,7 @@ static const struct option long_options[] =
{ "no-fuzzy", no_argument, NULL, CHAR_MAX + 3 },
{ "no-location", no_argument, &line_comment, 0 },
{ "no-obsolete", no_argument, NULL, CHAR_MAX + 5 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 13 },
{ "obsolete", no_argument, NULL, CHAR_MAX + 12 },
{ "only-fuzzy", no_argument, NULL, CHAR_MAX + 4 },
{ "only-obsolete", no_argument, NULL, CHAR_MAX + 6 },
@@ -251,6 +252,10 @@ main (argc, argv)
to_change |= RESET_OBSOLETE;
break;
+ case CHAR_MAX + 13: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -388,6 +393,8 @@ Output details:\n\
-n, --add-location generate '#: filename:line' lines (default)\n\
--strict write out strict Uniforum conforming .po file\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msgcat.c b/src/msgcat.c
index e0d403e..35b94e0 100644
--- a/src/msgcat.c
+++ b/src/msgcat.c
@@ -61,6 +61,7 @@ static const struct option long_options[] =
{ "indent", no_argument, NULL, 'i' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 2 },
{ "output-file", required_argument, NULL, 'o' },
{ "sort-by-file", no_argument, NULL, 'F' },
{ "sort-output", no_argument, NULL, 's' },
@@ -216,6 +217,10 @@ main (argc, argv)
use_first = true;
break;
+ case CHAR_MAX + 2: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -357,6 +362,8 @@ Output details:\n\
-n, --add-location generate '#: filename:line' lines (default)\n\
--strict write out strict Uniforum conforming .po file\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msgcomm.c b/src/msgcomm.c
index 84e20e0..92542c0 100644
--- a/src/msgcomm.c
+++ b/src/msgcomm.c
@@ -63,6 +63,7 @@ static const struct option long_options[] =
{ "indent", no_argument, NULL, 'i' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 2 },
{ "omit-header", no_argument, NULL, CHAR_MAX + 1 },
{ "output", required_argument, NULL, 'o' }, /* for backward compatibility */
{ "output-file", required_argument, NULL, 'o' },
@@ -219,6 +220,10 @@ main (argc, argv)
omit_header = true;
break;
+ case CHAR_MAX + 2: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -369,6 +374,8 @@ Output details:\n\
-n, --add-location generate '#: filename:line' lines (default)\n\
--strict write out strict Uniforum conforming .po file\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
--omit-header don't write header with `msgid \"\"' entry\n\
diff --git a/src/msgconv.c b/src/msgconv.c
index 8fb98cd..49c2ccc 100644
--- a/src/msgconv.c
+++ b/src/msgconv.c
@@ -22,6 +22,7 @@
#endif
#include <getopt.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
@@ -59,6 +60,7 @@ static const struct option long_options[] =
{ "indent", no_argument, NULL, 'i' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 1 },
{ "output-file", required_argument, NULL, 'o' },
{ "sort-by-file", no_argument, NULL, 'F' },
{ "sort-output", no_argument, NULL, 's' },
@@ -169,6 +171,10 @@ main (argc, argv)
}
break;
+ case CHAR_MAX + 1: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -291,6 +297,8 @@ Output details:\n\
--add-location preserve '#: filename:line' lines (default)\n\
--strict strict Uniforum output style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msgen.c b/src/msgen.c
index ce5e7ef..be800b4 100644
--- a/src/msgen.c
+++ b/src/msgen.c
@@ -22,6 +22,7 @@
#endif
#include <getopt.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
@@ -54,6 +55,7 @@ static const struct option long_options[] =
{ "indent", no_argument, NULL, 'i' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 1 },
{ "output-file", required_argument, NULL, 'o' },
{ "sort-by-file", no_argument, NULL, 'F' },
{ "sort-output", no_argument, NULL, 's' },
@@ -157,6 +159,10 @@ main (argc, argv)
}
break;
+ case CHAR_MAX + 1: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -272,6 +278,8 @@ Output details:\n\
--add-location preserve '#: filename:line' lines (default)\n\
--strict strict Uniforum output style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msgfilter.c b/src/msgfilter.c
index fdca4bd..7391b69 100644
--- a/src/msgfilter.c
+++ b/src/msgfilter.c
@@ -101,6 +101,7 @@ static const struct option long_options[] =
{ "keep-header", no_argument, &keep_header, 1 },
{ "no-escape", no_argument, NULL, CHAR_MAX + 2 },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 3 },
{ "output-file", required_argument, NULL, 'o' },
{ "sort-by-file", no_argument, NULL, 'F' },
{ "sort-output", no_argument, NULL, 's' },
@@ -235,6 +236,10 @@ main (argc, argv)
message_print_style_escape (false);
break;
+ case CHAR_MAX + 3: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -405,6 +410,8 @@ Output details:\n\
--add-location preserve '#: filename:line' lines (default)\n\
--strict strict Uniforum output style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msggrep.c b/src/msggrep.c
index 014f583..0b8fbdb 100644
--- a/src/msggrep.c
+++ b/src/msggrep.c
@@ -94,6 +94,7 @@ static const struct option long_options[] =
{ "msgstr", no_argument, NULL, 'T' },
{ "no-escape", no_argument, NULL, CHAR_MAX + 3 },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 6 },
{ "output-file", required_argument, NULL, 'o' },
{ "regexp", required_argument, NULL, 'e' },
{ "sort-by-file", no_argument, NULL, CHAR_MAX + 4 },
@@ -273,6 +274,10 @@ main (argc, argv)
sort_by_msgid = true;
break;
+ case CHAR_MAX + 6: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -471,6 +476,8 @@ Output details:\n\
--add-location preserve '#: filename:line' lines (default)\n\
--strict strict Uniforum output style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
--sort-output generate sorted output\n\
--sort-by-file sort output by file location\n\
"));
diff --git a/src/msginit.c b/src/msginit.c
index 277d060..d1c4536 100644
--- a/src/msginit.c
+++ b/src/msginit.c
@@ -116,6 +116,7 @@ static const struct option long_options[] =
{ "input", required_argument, NULL, 'i' },
{ "locale", required_argument, NULL, 'l' },
{ "no-translator", no_argument, NULL, CHAR_MAX + 1 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 2 },
{ "output-file", required_argument, NULL, 'o' },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w' },
@@ -238,6 +239,10 @@ main (argc, argv)
no_translator = true;
break;
+ case CHAR_MAX + 2: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -381,6 +386,8 @@ Output details:\n\
-l, --locale=LL_CC set target locale\n\
--no-translator assume the PO file is automatically generated\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
"));
printf ("\n");
/* xgettext: no-wrap */
diff --git a/src/msgmerge.c b/src/msgmerge.c
index 30716bb..bf45a2b 100644
--- a/src/msgmerge.c
+++ b/src/msgmerge.c
@@ -87,6 +87,7 @@ static const struct option long_options[] =
{ "multi-domain", no_argument, NULL, 'm' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 4 },
{ "output-file", required_argument, NULL, 'o' },
{ "quiet", no_argument, NULL, 'q' },
{ "sort-by-file", no_argument, NULL, 'F' },
@@ -252,6 +253,10 @@ main (argc, argv)
backup_suffix_string = optarg;
break;
+ case CHAR_MAX + 4: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -462,6 +467,8 @@ Output details:\n\
--add-location preserve '#: filename:line' lines (default)\n\
--strict strict Uniforum output style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/msgunfmt.c b/src/msgunfmt.c
index 0dbce68..fcfbabd 100644
--- a/src/msgunfmt.c
+++ b/src/msgunfmt.c
@@ -68,6 +68,7 @@ static const struct option long_options[] =
{ "java", no_argument, NULL, 'j' },
{ "locale", required_argument, NULL, 'l' },
{ "no-escape", no_argument, NULL, 'e' },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 2 },
{ "output-file", required_argument, NULL, 'o' },
{ "resource", required_argument, NULL, 'r' },
{ "sort-output", no_argument, NULL, 's' },
@@ -186,6 +187,10 @@ main (argc, argv)
tcl_mode = true;
break;
+ case CHAR_MAX + 2: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
break;
@@ -374,6 +379,8 @@ Output details:\n\
-i, --indent write indented output style\n\
--strict write strict uniforum style\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
"));
printf ("\n");
diff --git a/src/msguniq.c b/src/msguniq.c
index f17e008..bc88e7e 100644
--- a/src/msguniq.c
+++ b/src/msguniq.c
@@ -59,6 +59,7 @@ static const struct option long_options[] =
{ "indent", no_argument, NULL, 'i' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 2 },
{ "output-file", required_argument, NULL, 'o' },
{ "repeated", no_argument, NULL, 'd' },
{ "sort-by-file", no_argument, NULL, 'F' },
@@ -194,6 +195,10 @@ main (argc, argv)
use_first = true;
break;
+ case CHAR_MAX + 2: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -329,6 +334,8 @@ Output details:\n\
-n, --add-location generate '#: filename:line' lines (default)\n\
--strict write out strict Uniforum conforming .po file\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
"));
diff --git a/src/write-po.c b/src/write-po.c
index 43a32ae..521b741 100644
--- a/src/write-po.c
+++ b/src/write-po.c
@@ -103,6 +103,18 @@ message_page_width_set (n)
}
+/* This variable controls the extent to which the page width applies.
+ True means it applies to message strings and file reference lines.
+ False means it applies to file reference lines only. */
+static bool wrap_strings = true;
+
+void
+message_page_width_ignore ()
+{
+ wrap_strings = false;
+}
+
+
/* These three variables control the output style of the message_print
function. Interface functions for them are to be used. */
static bool indent = false;
@@ -487,7 +499,7 @@ internationalized messages should not contain the `\\%c' escape sequence"),
startcol_after_break++;
/* The line width. Allow room for the closing quote character. */
- width = (do_wrap == no ? INT_MAX : page_width) - 1;
+ width = (wrap_strings && do_wrap != no ? page_width : INT_MAX) - 1;
/* Adjust for indentation of subsequent lines. */
width -= startcol_after_break;
diff --git a/src/write-po.h b/src/write-po.h
index 1a65527..3896c97 100644
--- a/src/write-po.h
+++ b/src/write-po.h
@@ -1,5 +1,5 @@
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
@@ -26,7 +26,8 @@
extern void
message_page_width_set PARAMS ((size_t width));
-
+extern void
+ message_page_width_ignore PARAMS ((void));
extern void
message_print_style_indent PARAMS ((void));
extern void
diff --git a/src/xgettext.c b/src/xgettext.c
index 07bd3e9..eed8f62 100644
--- a/src/xgettext.c
+++ b/src/xgettext.c
@@ -135,6 +135,7 @@ static const struct option long_options[] =
{ "msgstr-suffix", optional_argument, NULL, 'M' },
{ "no-escape", no_argument, NULL, 'e' },
{ "no-location", no_argument, &line_comment, 0 },
+ { "no-wrap", no_argument, NULL, CHAR_MAX + 3 },
{ "omit-header", no_argument, &xgettext_omit_header, 1 },
{ "output", required_argument, NULL, 'o' },
{ "output-dir", required_argument, NULL, 'p' },
@@ -361,6 +362,9 @@ main (argc, argv)
case CHAR_MAX + 2: /* --foreign-user */
copyright_holder = "";
break;
+ case CHAR_MAX + 3: /* --no-wrap */
+ message_page_width_ignore ();
+ break;
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -601,6 +605,8 @@ Output details:\n\
-n, --add-location generate '#: filename:line' lines (default)\n\
--strict write out strict Uniforum conforming .po file\n\
-w, --width=NUMBER set output page width\n\
+ --no-wrap do not break long message lines, longer than\n\
+ the output page width, into several lines\n\
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
--omit-header don't write header with `msgid \"\"' entry\n\