24 |
#include "strftime.h" |
#include "strftime.h" |
25 |
#include "xgethostname.h" |
#include "xgethostname.h" |
26 |
|
|
27 |
|
#include "sign.h" |
28 |
|
|
29 |
|
|
30 |
|
|
31 |
const char *program_name; |
const char *program_name; |
32 |
const char *program_path; |
const char *program_path; |
33 |
const char *cvs_cmd_name; |
const char *cvs_cmd_name; |
523 |
{"help-commands", 0, NULL, 1}, |
{"help-commands", 0, NULL, 1}, |
524 |
{"help-synonyms", 0, NULL, 2}, |
{"help-synonyms", 0, NULL, 2}, |
525 |
{"help-options", 0, NULL, 4}, |
{"help-options", 0, NULL, 4}, |
526 |
|
{"sign-textmode", required_argument, NULL, 5}, |
527 |
#ifdef SERVER_SUPPORT |
#ifdef SERVER_SUPPORT |
528 |
{"allow-root", required_argument, NULL, 3}, |
{"allow-root", required_argument, NULL, 3}, |
529 |
#endif /* SERVER_SUPPORT */ |
#endif /* SERVER_SUPPORT */ |
552 |
#endif |
#endif |
553 |
|
|
554 |
/* |
/* |
555 |
* Just save the last component of the path for error messages |
* Initialize globals. |
556 |
*/ |
*/ |
557 |
|
/* Just save the last component of the path for error messages. */ |
558 |
program_path = xstrdup (argv[0]); |
program_path = xstrdup (argv[0]); |
559 |
#ifdef ARGV0_NOT_PROGRAM_NAME |
#ifdef ARGV0_NOT_PROGRAM_NAME |
560 |
/* On some systems, e.g. VMS, argv[0] is not the name of the command |
/* On some systems, e.g. VMS, argv[0] is not the name of the command |
564 |
program_name = last_component (argv[0]); |
program_name = last_component (argv[0]); |
565 |
#endif |
#endif |
566 |
|
|
567 |
|
|
568 |
/* |
/* |
569 |
* Query the environment variables up-front, so that |
* Query the environment variables up-front, so that |
570 |
* they can be overridden by command line arguments |
* they can be overridden by command line arguments |
647 |
/* --help-options */ |
/* --help-options */ |
648 |
usage (opt_usage); |
usage (opt_usage); |
649 |
break; |
break; |
650 |
|
case 5: |
651 |
|
/* --sign-textmode */ |
652 |
|
if (sign_textmode) free (&sign_textmode); |
653 |
|
sign_textmode = xstrdup (optarg); |
654 |
|
break; |
655 |
#ifdef SERVER_SUPPORT |
#ifdef SERVER_SUPPORT |
656 |
case 3: |
case 3: |
657 |
/* --allow-root */ |
/* --allow-root */ |