chiark
/
gitweb
/
~mdw
/
checkpath
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chkpath.c, tmpdir.c, chpath.1, tmpdir.1: Sort lists of options.
[checkpath]
/
tmpdir.c
diff --git
a/tmpdir.c
b/tmpdir.c
index 764f9bdf8dffbd7f328f58948238e174cc64a0e7..574e16f8ecdb07f27c563d90098c51792f40e4b1 100644
(file)
--- a/
tmpdir.c
+++ b/
tmpdir.c
@@
-258,7
+258,7
@@
static void report(unsigned what, int verbose,
/* --- @usage@ --- */
static void usage(FILE *fp)
/* --- @usage@ --- */
static void usage(FILE *fp)
- { fprintf(fp, "Usage: %s [-bcv] [-
g NAME] [-C PATH
]\n", QUIS); }
+ { fprintf(fp, "Usage: %s [-bcv] [-
C PATH] [-g NAME
]\n", QUIS); }
/* --- @version@ --- */
/* --- @version@ --- */
@@
-285,11
+285,11
@@
Options supported:\n\
-V, --version Display the program's version number.\n\
-u, --usage Display a terse usage summary.\n\
\n\
-V, --version Display the program's version number.\n\
-u, --usage Display a terse usage summary.\n\
\n\
+-C, --check PATH Check whether PATH is good, setting exit status.\n\
-b, --bourne Output a `TMPDIR' setting for Bourne shell users.\n\
-c, --cshell Output a `TMPDIR' setting for C shell users.\n\
-b, --bourne Output a `TMPDIR' setting for Bourne shell users.\n\
-c, --cshell Output a `TMPDIR' setting for C shell users.\n\
--v, --verbose Report problems to standard error.\n\
-g, --group NAME Trust group NAME to be honest and true.\n\
-g, --group NAME Trust group NAME to be honest and true.\n\
--
C, --check PATH Check whether PATH is good, setting exit status
.\n\
+-
v, --verbose Report problems to standard error
.\n\
\n\
The default action is to examine the caller's shell and output a suitable\n\
setting for that shell type.\n\
\n\
The default action is to examine the caller's shell and output a suitable\n\
setting for that shell type.\n\
@@
-339,15
+339,15
@@
int main(int argc, char *argv[])
{ "help", 0, 0, 'h' },
{ "version", 0, 0, 'V' },
{ "usage", 0, 0, 'u' },
{ "help", 0, 0, 'h' },
{ "version", 0, 0, 'V' },
{ "usage", 0, 0, 'u' },
- { "bourne", 0, 0, 'b' },
- { "cshell", 0, 0, 'c' },
{ "check", OPTF_ARGREQ, 0, 'C' },
{ "verify", OPTF_ARGREQ, 0, 'C' },
{ "check", OPTF_ARGREQ, 0, 'C' },
{ "verify", OPTF_ARGREQ, 0, 'C' },
- { "verbose", 0, 0, 'v' },
+ { "bourne", 0, 0, 'b' },
+ { "cshell", 0, 0, 'c' },
{ "group", OPTF_ARGREQ, 0, 'g' },
{ "group", OPTF_ARGREQ, 0, 'g' },
+ { "verbose", 0, 0, 'v' },
{ 0, 0, 0, 0 }
};
{ 0, 0, 0, 0 }
};
- int i = mdwopt(argc, argv, "hVu" "
bcvg:C:
", opts, 0, 0, 0);
+ int i = mdwopt(argc, argv, "hVu" "
C:bcg:v
", opts, 0, 0, 0);
if (i < 0)
break;
if (i < 0)
break;
@@
-361,15
+361,15
@@
int main(int argc, char *argv[])
case 'u':
usage(stdout);
exit(0);
case 'u':
usage(stdout);
exit(0);
+ case 'C':
+ return (!fullcheck(optarg));
+ break;
case 'b':
shell = sh_bourne;
break;
case 'c':
shell = sh_csh;
break;
case 'b':
shell = sh_bourne;
break;
case 'c':
shell = sh_csh;
break;
- case 'C':
- return (!fullcheck(optarg));
- break;
case 'g':
allowgroup(&cp, optarg);
break;
case 'g':
allowgroup(&cp, optarg);
break;