X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/checkpath/blobdiff_plain/fbe14754f1019110742e18b107d4bff5d2598603..3230bee80a97e186f44eaf40b1403091ab76dbaa:/tmpdir.c?ds=inline diff --git a/tmpdir.c b/tmpdir.c index 764f9bd..574e16f 100644 --- a/tmpdir.c +++ b/tmpdir.c @@ -258,7 +258,7 @@ static void report(unsigned what, int verbose, /* --- @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@ --- */ @@ -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\ +-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\ --v, --verbose Report problems to standard error.\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\ @@ -339,15 +339,15 @@ int main(int argc, char *argv[]) { "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' }, - { "verbose", 0, 0, 'v' }, + { "bourne", 0, 0, 'b' }, + { "cshell", 0, 0, 'c' }, { "group", OPTF_ARGREQ, 0, 'g' }, + { "verbose", 0, 0, 'v' }, { 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; @@ -361,15 +361,15 @@ int main(int argc, char *argv[]) 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 'C': - return (!fullcheck(optarg)); - break; case 'g': allowgroup(&cp, optarg); break;