From: Bruno Haible Date: Tue, 23 Apr 2002 11:37:42 +0000 (+0000) Subject: New option --no-wrap. X-Git-Tag: 0.11.2-branchpoint~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5afb1e3000c298f23eedffe38e85dcdc977c7df;p=thirdparty%2Fgettext.git New option --no-wrap. --- diff --git a/doc/ChangeLog b/doc/ChangeLog index 0f6d74fb2..c9df294e8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-04-23 Bruno Haible + + * msg*.texi, xgettext.texi: Document option --no-wrap. + 2002-04-22 Bruno Haible * gettext.texi (Preparing Strings): New section. diff --git a/doc/msgattrib.texi b/doc/msgattrib.texi index 49eb4fdfd..ce89de4ac 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 23d78b299..795ced53f 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 e65bd0731..79786193e 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 5a9c227ec..c850263ef 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 770e055f7..429407c67 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 42bbd43b6..1431c15b7 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 85a71d3cd..e66391a7f 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 9eb980603..96aa34a87 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 a670255f0..e07365581 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 353f839a5..a0051bbb4 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 9d3073096..eb3707f01 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 2ec9280e5..9143679f8 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 8e9a7d0ee..70a52ad9a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,24 @@ +2002-04-23 Bruno Haible + + * 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 * msginit.c (catalogname_for_locale): Add wa_BE. Change Javanese from diff --git a/src/msgattrib.c b/src/msgattrib.c index cb319ce86..05622a328 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 e0d403e18..35b94e0aa 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 84e20e0da..92542c0be 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 8fb98cd1f..49c2ccc08 100644 --- a/src/msgconv.c +++ b/src/msgconv.c @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -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 ce5e7ef63..be800b4d7 100644 --- a/src/msgen.c +++ b/src/msgen.c @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -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 fdca4bdbf..7391b69f1 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 014f58388..0b8fbdbd7 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 277d060c4..d1c4536fd 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 30716bb04..bf45a2b2c 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 0dbce68ae..fcfbabd9a 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 f17e00898..bc88e7eeb 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 43a32ae30..521b741b0 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 1a6552739..3896c97b5 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 @@ -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 07bd3e90b..eed8f628f 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\