?? unzip.c
字號:
#endif#ifdef DLL if (G.redirect_text) G.redirect_data = 2;#endif } break;#ifndef CMS_MVS case ('C'): /* -C: match filenames case-insensitively */ if (negative) uO.C_flag = FALSE, negative = 0; else uO.C_flag = TRUE; break;#endif /* !CMS_MVS */#if (!defined(SFX) || defined(SFX_EXDIR)) case ('d'): if (negative) { /* negative not allowed with -d exdir */ Info(slide, 0x401, ((char *)slide, LoadFarString(MustGiveExdir))); return(PK_PARAM); /* don't extract here by accident */ } if (uO.exdir != (char *)NULL) { Info(slide, 0x401, ((char *)slide, LoadFarString(OnlyOneExdir))); return(PK_PARAM); /* GRR: stupid restriction? */ } else { /* first check for "-dexdir", then for "-d exdir" */ uO.exdir = s; if (*uO.exdir == '\0') { if (argc > 1) { --argc; uO.exdir = *++argv; if (*uO.exdir == '-') { Info(slide, 0x401, ((char *)slide, LoadFarString(MustGiveExdir))); return(PK_PARAM); } /* else uO.exdir points at extraction dir */ } else { Info(slide, 0x401, ((char *)slide, LoadFarString(MustGiveExdir))); return(PK_PARAM); } } /* uO.exdir now points at extraction dir (-dexdir or * -d exdir); point s at end of exdir to avoid mis- * interpretation of exdir characters as more options */ if (*s != 0) while (*++s != 0) ; } break;#endif /* !SFX || SFX_EXDIR */ case ('e'): /* just ignore -e, -x options (extract) */ break;#ifdef MACOS case ('E'): /* -E [MacOS] display Mac e.f. when restoring */ if( negative ) { uO.E_flag = FALSE, negative = 0; } else { uO.E_flag = TRUE; } break;#endif /* MACOS */ case ('f'): /* "freshen" (extract only newer files) */ if (negative) uO.fflag = uO.uflag = FALSE, negative = 0; else uO.fflag = uO.uflag = TRUE; break;#if (defined(RISCOS) || defined(ACORN_FTYPE_NFS)) case ('F'): /* Acorn filetype & NFS extension handling */ if (negative) uO.acorn_nfs_ext = FALSE, negative = 0; else uO.acorn_nfs_ext = TRUE; break;#endif /* RISCOS || ACORN_FTYPE_NFS */ case ('h'): /* just print help message and quit */ *pargc = -1; return USAGE(PK_OK);#ifdef MACOS case ('i'): /* -i [MacOS] ignore filenames stored in Mac ef */ if( negative ) { uO.i_flag = FALSE, negative = 0; } else { uO.i_flag = TRUE; } break;#endif /* MACOS */ case ('j'): /* junk pathnames/directory structure */ if (negative) uO.jflag = FALSE, negative = 0; else uO.jflag = TRUE; break;#if (defined(__BEOS__) || defined(MACOS)) case ('J'): /* Junk BeOS or MacOS file attributes */ if( negative ) { uO.J_flag = FALSE, negative = 0; } else { uO.J_flag = TRUE; } break;#endif /* __BEOS__ || MACOS */#ifndef SFX case ('l'): if (negative) { uO.vflag = MAX(uO.vflag-negative,0); negative = 0; } else ++uO.vflag; break;#endif /* !SFX */#ifndef CMS_MVS case ('L'): /* convert (some) filenames to lowercase */ if (negative) { uO.L_flag = MAX(uO.L_flag-negative,0); negative = 0; } else ++uO.L_flag; break;#endif /* !CMS_MVS */#ifdef MORE#ifdef CMS_MVS case ('m'):#endif case ('M'): /* send all screen output through "more" fn. *//* GRR: eventually check for numerical argument => height */ if (negative) G.M_flag = FALSE, negative = 0; else G.M_flag = TRUE; break;#endif /* MORE */ case ('n'): /* don't overwrite any files */ if (negative) uO.overwrite_none = FALSE, negative = 0; else uO.overwrite_none = TRUE; break;#ifdef AMIGA case ('N'): /* restore comments as filenotes */ if (negative) uO.N_flag = FALSE, negative = 0; else uO.N_flag = TRUE; break;#endif /* AMIGA */ case ('o'): /* OK to overwrite files without prompting */ if (negative) { uO.overwrite_all = MAX(uO.overwrite_all-negative,0); negative = 0; } else ++uO.overwrite_all; break; case ('p'): /* pipes: extract to stdout, no messages */ if (negative) { uO.cflag = FALSE; uO.qflag = MAX(uO.qflag-999,0); negative = 0; } else { uO.cflag = TRUE; uO.qflag += 999; } break;#if CRYPT /* GRR: yes, this is highly insecure, but dozens of people * have pestered us for this, so here we go... */ case ('P'): if (negative) { /* negative not allowed with -P passwd */ Info(slide, 0x401, ((char *)slide, LoadFarString(MustGivePasswd))); return(PK_PARAM); /* don't extract here by accident */ } if (uO.pwdarg != (char *)NULL) {/* GRR: eventually support multiple passwords? Info(slide, 0x401, ((char *)slide, LoadFarString(OnlyOnePasswd))); return(PK_PARAM); */ } else { /* first check for "-Ppasswd", then for "-P passwd" */ uO.pwdarg = s; if (*uO.pwdarg == '\0') { if (argc > 1) { --argc; uO.pwdarg = *++argv; if (*uO.pwdarg == '-') { Info(slide, 0x401, ((char *)slide, LoadFarString(MustGivePasswd))); return(PK_PARAM); } /* else pwdarg points at decryption password */ } else { Info(slide, 0x401, ((char *)slide, LoadFarString(MustGivePasswd))); return(PK_PARAM); } } /* pwdarg now points at decryption password (-Ppasswd or * -P passwd); point s at end of passwd to avoid mis- * interpretation of passwd characters as more options */ if (*s != 0) while (*++s != 0) ; } break;#endif /* CRYPT */ case ('q'): /* quiet: fewer comments/messages */ if (negative) { uO.qflag = MAX(uO.qflag-negative,0); negative = 0; } else ++uO.qflag; break;#ifdef QDOS case ('Q'): /* QDOS flags */ qlflag ^= strtol(s, &s, 10); break; /* we XOR this as we can config qlflags */#endif#ifdef DOS_FLX_NLM_OS2_W32 case ('s'): /* spaces in filenames: allow by default */ if (negative) uO.sflag = FALSE, negative = 0; else uO.sflag = TRUE; break;#endif /* DOS_FLX_NLM_OS2_W32 */ case ('t'): if (negative) uO.tflag = FALSE, negative = 0; else uO.tflag = TRUE; break;#ifdef TIMESTAMP case ('T'): if (negative) uO.T_flag = FALSE, negative = 0; else uO.T_flag = TRUE; break;#endif case ('u'): /* update (extract only new and newer files) */ if (negative) uO.uflag = FALSE, negative = 0; else uO.uflag = TRUE; break;#ifndef CMS_MVS case ('U'): /* obsolete; to be removed in version 6.0 */ if (negative) uO.L_flag = TRUE, negative = 0; else uO.L_flag = FALSE; break;#endif /* !CMS_MVS */#ifndef SFX case ('v'): /* verbose */ if (negative) { uO.vflag = MAX(uO.vflag-negative,0); negative = 0; } else if (uO.vflag) ++uO.vflag; else uO.vflag = 2; break;#endif /* !SFX */#ifndef CMS_MVS case ('V'): /* Version (retain VMS/DEC-20 file versions) */ if (negative) uO.V_flag = FALSE, negative = 0; else uO.V_flag = TRUE; break;#endif /* !CMS_MVS */ case ('x'): /* extract: default */#ifdef SFX /* when 'x' is the only option in this argument, and the * next arg is not an option, assume this initiates an * exclusion list (-x xlist): terminate option-scanning * and leave uz_opts with argv still pointing to "-x"; * the xlist is processed later */ if (s - argv[0] == 2 && *s == '\0' && argc > 1 && argv[1][0] != '-') { /* break out of nested loops without "++argv;--argc" */ goto opts_done; }#endif /* SFX */ break;#if (defined(RESTORE_UIDGID) || defined(RESTORE_ACL)) case ('X'): /* restore owner/protection info (need privs?) */ if (negative) { uO.X_flag = MAX(uO.X_flag-negative,0); negative = 0; } else ++uO.X_flag; break;#endif /* RESTORE_UIDGID || RESTORE_ACL */ case ('z'): /* display only the archive comment */ if (negative) { uO.zflag = MAX(uO.zflag-negative,0); negative = 0; } else ++uO.zflag; break;#ifndef SFX case ('Z'): /* should have been first option (ZipInfo) */ Info(slide, 0x401, ((char *)slide, LoadFarString(Zfirst))); error = TRUE; break;#endif /* !SFX */#ifdef DOS_H68_OS2_W32 case ('$'): if (negative) { uO.volflag = MAX(uO.volflag-negative,0); negative = 0; } else ++uO.volflag; break;#endif /* DOS_H68_OS2_W32 */#if (!defined(RISCOS) && !defined(CMS_MVS) && !defined(TANDEM)) case (':'): if (negative) { uO.ddotflag = MAX(uO.ddotflag-negative,0); negative = 0; } else ++uO.ddotflag; break;#endif /* !RISCOS && !CMS_MVS && !TANDEM */ default: error = TRUE; break; } /* end switch */ } /* end while (not end of argument string) */ } /* end while (not done with switches) *//*--------------------------------------------------------------------------- Check for nonsensical combinations of options. ---------------------------------------------------------------------------*/#ifdef SFXopts_done: /* yes, very ugly...but only used by UnZipSFX with -x xlist */#endif if ((uO.cflag && uO.tflag) || (uO.cflag && uO.uflag) || (uO.tflag && uO.uflag) || (uO.fflag && uO.overwrite_none)) { Info(slide, 0x401, ((char *)slide, LoadFarString(InvalidOptionsMsg))); error = TRUE; } if (uO.aflag > 2) uO.aflag = 2;#ifdef VMS if (uO.bflag > 2) uO.bflag = 2;#endif if (uO.overwrite_all && uO.overwrite_none) { Info(slide, 0x401, ((char *)slide, LoadFarString(IgnoreOOptionMsg))); uO.overwrite_all = FALSE; }#ifdef MORE if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func. useless */ G.M_flag = 0;#endif#ifdef SFX if (error)#else if ((argc-- == 0) || error)#endif { *pargc = argc; *pargv = argv;#ifndef SFX
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -