⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unzip.c

📁 压缩解压,是unzip540的升级,这个外国网站摘来的源码,是evb编写.
💻 C
📖 第 1 页 / 共 5 页
字号:
#endif#ifdef TANDEM                        ++uO.bflag;#endif                        uO.aflag = 0;                    }                    break;#ifdef UNIXBACKUP                case ('B'): /* -B: back up existing files */                    if (negative)                        uO.B_flag = FALSE, negative = 0;                    else                        uO.B_flag = TRUE;                    break;#endif                case ('c'):                    if (negative) {                        uO.cflag = FALSE, negative = 0;#ifdef NATIVE                        uO.aflag = 0;#endif                    } else {                        uO.cflag = TRUE;#ifdef NATIVE                        uO.aflag = 2;   /* so you can read it on the screen */#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(ATH_BEO) || defined(MACOS))                case ('J'):    /* Junk AtheOS, BeOS or MacOS file attributes */                    if( negative ) {                        uO.J_flag = FALSE, negative = 0;                    } else {                        uO.J_flag = TRUE;                    }                    break;#endif /* ATH_BEO || MACOS */#ifdef ATH_BEO_UNX                case ('K'):                    if (negative) {                        uO.K_flag = FALSE, negative = 0;                    } else {                        uO.K_flag = TRUE;                    }                    break;#endif /* ATH_BEO_UNX */#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 TANDEM                case ('r'):    /* remove file extensions */                    if (negative)                        uO.rflag = FALSE, negative = 0;                    else                        uO.rflag = TRUE;                    break;#endif /* TANDEM */#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 */#ifdef WILD_STOP_AT_DIR                case ('W'):    /* Wildcard interpretation (stop at '/'?) */                    if (negative)                        uO.W_flag = FALSE, negative = 0;                    else                        uO.W_flag = TRUE;                    break;#endif /* WILD_STOP_AT_DIR */                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) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -