version 1.6, 1999/02/24 06:38:23 |
version 1.7, 1999/03/02 06:23:55 |
|
|
/* $OpenBSD$ */ |
/* $OpenBSD$ */ |
|
|
/**************************************************************************** |
/**************************************************************************** |
* Copyright (c) 1998 Free Software Foundation, Inc. * |
* Copyright (c) 1998,1999 Free Software Foundation, Inc. * |
* * |
* * |
* Permission is hereby granted, free of charge, to any person obtaining a * |
* Permission is hereby granted, free of charge, to any person obtaining a * |
* copy of this software and associated documentation files (the * |
* copy of this software and associated documentation files (the * |
|
|
#include <dump_entry.h> |
#include <dump_entry.h> |
#include <term_entry.h> |
#include <term_entry.h> |
|
|
MODULE_ID("$From: tic.c,v 1.45 1999/02/19 10:40:00 tom Exp $") |
MODULE_ID("$From: tic.c,v 1.48 1999/03/01 00:26:51 tom Exp $") |
|
|
const char *_nc_progname = "tic"; |
const char *_nc_progname = "tic"; |
|
|
|
|
static void (*save_check_termtype)(TERMTYPE *); |
static void (*save_check_termtype)(TERMTYPE *); |
static void check_termtype(TERMTYPE *tt); |
static void check_termtype(TERMTYPE *tt); |
|
|
static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrsw1] source-file\n"; |
static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n"; |
|
|
static void cleanup(void) |
static void cleanup(void) |
{ |
{ |
|
|
" -s print summary statistics", |
" -s print summary statistics", |
" -v[n] set verbosity level", |
" -v[n] set verbosity level", |
" -w[n] set format width for translation output", |
" -w[n] set format width for translation output", |
|
#if NCURSES_XNAMES |
|
" -x treat unknown capabilities as user-defined", |
|
#endif |
"", |
"", |
"Parameters:", |
"Parameters:", |
" <file> file to translate or compile" |
" <file> file to translate or compile" |
|
|
free(ep->tterm.str_table); |
free(ep->tterm.str_table); |
return(TRUE); |
return(TRUE); |
} |
} |
else |
|
#endif /* HAVE_BIG_CORE */ |
#endif /* HAVE_BIG_CORE */ |
return(FALSE); |
return(FALSE); |
} |
} |
|
|
static void put_translate(int c) |
static void put_translate(int c) |
|
|
|
|
infodump = (strcmp(_nc_progname, "captoinfo") == 0); |
infodump = (strcmp(_nc_progname, "captoinfo") == 0); |
capdump = (strcmp(_nc_progname, "infotocap") == 0); |
capdump = (strcmp(_nc_progname, "infotocap") == 0); |
|
#if NCURSES_XNAMES |
|
use_extended_names(FALSE); |
|
#endif |
|
|
/* |
/* |
* Processing arguments is a little complicated, since someone made a |
* Processing arguments is a little complicated, since someone made a |
* design decision to allow the numeric values for -w, -v options to |
* design decision to allow the numeric values for -w, -v options to |
* be optional. |
* be optional. |
*/ |
*/ |
while ((this_opt = getopt(argc, argv, "0123456789CILNR:TVce:fgo:rsvw")) != EOF) { |
while ((this_opt = getopt(argc, argv, "0123456789CILNR:TVce:fgo:rsvwx")) != EOF) { |
if (isdigit(this_opt)) { |
if (isdigit(this_opt)) { |
switch (last_opt) { |
switch (last_opt) { |
case 'v': |
case 'v': |
|
|
case 'w': |
case 'w': |
width = 0; |
width = 0; |
break; |
break; |
|
#if NCURSES_XNAMES |
|
case 'x': |
|
use_extended_names(TRUE); |
|
break; |
|
#endif |
default: |
default: |
usage(); |
usage(); |
} |
} |