Remove command line parsing and usage help text
This commit is contained in:
parent
9525cc69bd
commit
de159615a3
1 changed files with 0 additions and 78 deletions
|
@ -228,7 +228,6 @@ LOCAL void parse_cl_dir __PR((struct iso_directory_record *idr,
|
|||
LOCAL BOOL parse_de __PR((struct iso_directory_record *idr));
|
||||
LOCAL void parse_dir __PR((struct todo *dp,
|
||||
char * rootname, int extent, int len));
|
||||
LOCAL void usage __PR((int excode));
|
||||
EXPORT int main __PR((int argc, char *argv[]));
|
||||
LOCAL void list_vd __PR((struct iso_primary_descriptor *vp, BOOL ucs));
|
||||
LOCAL void list_locales __PR((void));
|
||||
|
@ -1337,41 +1336,6 @@ static int nlen = 0;
|
|||
}
|
||||
}
|
||||
|
||||
LOCAL void
|
||||
usage(excode)
|
||||
int excode;
|
||||
{
|
||||
#ifdef USE_FIND
|
||||
errmsgno(EX_BAD, _("Usage: %s [options] -i filename [-find [[find expr.]]\n"), get_progname());
|
||||
#else
|
||||
errmsgno(EX_BAD, _("Usage: %s [options] -i filename\n"), get_progname());
|
||||
#endif
|
||||
|
||||
error(_("Options:\n"));
|
||||
error(_("\t-help,-h Print this help\n"));
|
||||
error(_("\t-version Print version info and exit\n"));
|
||||
error(_("\t-debug Print additional debug info\n"));
|
||||
error(_("\t-ignore-error Ignore errors\n"));
|
||||
error(_("\t-d Print information from the primary volume descriptor\n"));
|
||||
error(_("\t-f Generate output similar to 'find . -print'\n"));
|
||||
#ifdef USE_FIND
|
||||
error(_("\t-find [find expr.] Option separator: Use find command line to the right\n"));
|
||||
#endif
|
||||
error(_("\t-J Print information from Joliet extensions\n"));
|
||||
error(_("\t-j charset Use charset to display Joliet file names\n"));
|
||||
error(_("\t-l Generate output similar to 'ls -lR'\n"));
|
||||
error(_("\t-p Print Path Table\n"));
|
||||
error(_("\t-R Print information from Rock Ridge extensions\n"));
|
||||
error(_("\t-s Print file size infos in multiples of sector size (%ld bytes).\n"), (long)PAGE);
|
||||
error(_("\t-N sector Sector number where ISO image should start on CD\n"));
|
||||
error(_("\t-T sector Sector number where actual session starts on CD\n"));
|
||||
error(_("\t-i filename Filename to read ISO-9660 image from\n"));
|
||||
error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n"));
|
||||
error(_("\t-X Extract all matching files to the filesystem\n"));
|
||||
error(_("\t-x pathname Extract specified file to stdout\n"));
|
||||
exit(excode);
|
||||
}
|
||||
|
||||
EXPORT int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
|
@ -1400,17 +1364,11 @@ main(argc, argv)
|
|||
struct eltorito_boot_descriptor bpd;
|
||||
struct iso_directory_record * idr;
|
||||
char *charset = NULL;
|
||||
char *opts = "help,h,version,debug,ignore-error,d,p,i*,dev*,J,R,l,x*,X,find~,f,s,N#l,T#l,j*";
|
||||
BOOL help = FALSE;
|
||||
BOOL prvers = FALSE;
|
||||
BOOL found_eltorito = FALSE;
|
||||
int bootcat_offset = 0;
|
||||
int voldesc_sum = 0;
|
||||
char *cp;
|
||||
|
||||
|
||||
save_args(argc, argv);
|
||||
|
||||
#if defined(USE_NLS)
|
||||
setlocale(LC_ALL, "");
|
||||
#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
|
||||
|
@ -1429,32 +1387,6 @@ main(argc, argv)
|
|||
(void) textdomain(TEXT_DOMAIN);
|
||||
#endif
|
||||
|
||||
cac = argc - 1;
|
||||
cav = argv + 1;
|
||||
if (getallargs(&cac, &cav, opts,
|
||||
&help, &help, &prvers, &debug, &ignerr,
|
||||
&do_pvd, &do_pathtab,
|
||||
&filename, &sdevname,
|
||||
&use_joliet, &use_rock,
|
||||
&do_listing,
|
||||
&xtract, &Xtract,
|
||||
getfind, NULL,
|
||||
&do_f, &do_sectors,
|
||||
§or_offset, &toc_offset,
|
||||
&charset) < 0) {
|
||||
errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]);
|
||||
usage(EX_BAD);
|
||||
}
|
||||
if (help)
|
||||
usage(0);
|
||||
if (prvers) {
|
||||
printf(_("isoinfo %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2016 %s\n"),
|
||||
VERSION,
|
||||
HOST_CPU, HOST_VENDOR, HOST_OS,
|
||||
_("Eric Youngdale"),
|
||||
_("Joerg Schilling"));
|
||||
exit(0);
|
||||
}
|
||||
myuid = getuid();
|
||||
#ifdef USE_FIND
|
||||
if (do_find) {
|
||||
|
@ -1494,12 +1426,10 @@ main(argc, argv)
|
|||
}
|
||||
if (find_ac > find_pac) {
|
||||
errmsgno(EX_BAD, _("Unsupported pathspec for -find.\n"));
|
||||
usage(EX_BAD);
|
||||
}
|
||||
#ifdef __not_yet__
|
||||
if (find_ac <= 0 || find_ac == find_pac) {
|
||||
errmsgno(EX_BAD, _("Missing pathspec for -find.\n"));
|
||||
usage(EX_BAD);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1519,12 +1449,6 @@ main(argc, argv)
|
|||
walkstate.pflags = 0;
|
||||
}
|
||||
#endif
|
||||
cac = argc - 1;
|
||||
cav = argv + 1;
|
||||
if (!do_find && getfiles(&cac, &cav, opts) != 0) {
|
||||
errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]);
|
||||
usage(EX_BAD);
|
||||
}
|
||||
|
||||
#if defined(USE_NLS) && defined(HAVE_NL_LANGINFO) && defined(CODESET)
|
||||
/*
|
||||
|
@ -1605,7 +1529,6 @@ setcharset:
|
|||
|
||||
if (filename != NULL && sdevname != NULL) {
|
||||
errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n"));
|
||||
usage(EX_BAD);
|
||||
}
|
||||
#ifdef USE_SCG
|
||||
if (filename == NULL && sdevname == NULL)
|
||||
|
@ -1613,7 +1536,6 @@ setcharset:
|
|||
#endif
|
||||
if (filename == NULL && sdevname == NULL) {
|
||||
fprintf(stderr, _("ISO-9660 image not specified\n"));
|
||||
usage(EX_BAD);
|
||||
}
|
||||
|
||||
if (filename != NULL)
|
||||
|
|
Loading…
Reference in a new issue