-int gzip_main(int argc, char **argv);
-int gzip_main(int argc, char **argv)
-{
- enum {
- OPT_tostdout = 0x1,
- OPT_force = 0x2,
- };
-
- unsigned opt;
- int inFileNum;
- int outFileNum;
- int i;
- struct stat statBuf;
-
- opt = getopt32(argc, argv, "cf123456789qv" USE_GUNZIP("d"));
- //if (opt & 0x1) // -c
- //if (opt & 0x2) // -f
- /* Ignore 1-9 (compression level) options */
- //if (opt & 0x4) // -1
- //if (opt & 0x8) // -2
- //if (opt & 0x10) // -3
- //if (opt & 0x20) // -4
- //if (opt & 0x40) // -5
- //if (opt & 0x80) // -6
- //if (opt & 0x100) // -7
- //if (opt & 0x200) // -8
- //if (opt & 0x400) // -9
- //if (opt & 0x800) // -q
- //if (opt & 0x1000) // -v
-#if ENABLE_GUNZIP /* gunzip_main may not be visible... */
- if (opt & 0x2000) { // -d
- /* FIXME: getopt32 should not depend on optind */
- optind = 1;
- return gunzip_main(argc, argv);
- }
-#endif
-
- /* Comment?? */
- if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
- signal(SIGINT, abort_gzip);
- }
-#ifdef SIGTERM
- if (signal(SIGTERM, SIG_IGN) != SIG_IGN) {
- signal(SIGTERM, abort_gzip);
- }
-#endif
-#ifdef SIGHUP
- if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {
- signal(SIGHUP, abort_gzip);
- }