#include <parametrized.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.222 2016/06/11 23:20:55 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.224 2016/10/01 12:46:54 tom Exp $")
#define STDIN_NAME "<stdin>"
#endif
DATA(" -U suppress post-processing of entries")
DATA(" -V print version")
+ DATA(" -W wrap long strings according to -w[n] option")
DATA(" -v[n] set verbosity level")
DATA(" -w[n] set format width for translation output")
#if NCURSES_XNAMES
bool suppress_untranslatable = FALSE;
int quickdump = 0;
bool quiet = FALSE;
+ bool wrap_strings = FALSE;
log_fp = stderr;
* be optional.
*/
while ((this_opt = getopt(argc, argv,
- "0123456789CDIKLNQR:TUVace:fGgo:qrstvwx")) != -1) {
+ "0123456789CDIKLNQR:TUVWace:fGgo:qrstvwx")) != -1) {
if (isdigit(this_opt)) {
switch (last_opt) {
case 'Q':
case 'V':
puts(curses_version());
ExitProgram(EXIT_SUCCESS);
+ case 'W':
+ wrap_strings = TRUE;
+ break;
case 'c':
check_only = TRUE;
break;
if (infodump || check_only) {
dump_init(tversion,
- smart_defaults
- ? outform
- : F_LITERAL,
- sortmode, width, height, debug_level, formatted ||
- check_only, check_only, quickdump);
+ (smart_defaults
+ ? outform
+ : F_LITERAL),
+ sortmode,
+ wrap_strings, width, height,
+ debug_level, formatted || check_only, check_only, quickdump);
} else if (capdump) {
dump_init(tversion,
outform,
- sortmode, width, height, debug_level, FALSE, FALSE, FALSE);
+ sortmode,
+ wrap_strings, width, height,
+ debug_level, FALSE, FALSE, FALSE);
}
/* parse entries out of the source file */
*next++ = '\0';
for (k = 1; k <= NUM_PARM; k++) {
numbers[k] = count;
- sprintf(next, "XYZ%d", count);
+ _nc_SPRINTF(next,
+ _nc_SLIMIT(sizeof(blob) - (next - blob))
+ "XYZ%d", count);
strings[k] = next;
next += strlen(next) + 1;
}