123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- #define __GLOBALS_C
- #define GLOBALS
- #ifndef UTIL
- #define UTIL
- #endif
- #include "zip.h"
- char errbuf[FNMAX+4081];
- int recurse = 0;
- int dispose = 0;
- int pathput = 1;
- #ifdef RISCOS
- int scanimage = 1;
- #endif
- int method = BEST;
- int dosify = 0;
- int verbose = 0;
- int fix = 0;
- int filesync = 0;
- int adjust = 0;
- int level = 6;
- int translate_eol = 0;
- #ifdef VMS
- int vmsver = 0;
- int vms_native = 0;
- int vms_case_2 = 0;
- int vms_case_5 = 0;
- #endif
- #if defined(OS2) || defined(WIN32)
- int use_longname_ea = 0;
- #endif
- int no_wild = 0;
- int allow_regex = 0;
- #ifdef WILD_STOP_AT_DIR
- int wild_stop_at_dir = 1;
- #else
- int wild_stop_at_dir = 0;
- #endif
- #ifdef UNICODE_SUPPORT
- int using_utf8 = 0;
- # ifdef WIN32
- int no_win32_wide = -1;
- # endif
- #endif
- ulg skip_this_disk = 0;
- int des_good = 0;
- ulg des_crc = 0;
- uzoff_t des_csize = 0;
- uzoff_t des_usize = 0;
- zoff_t dot_size = 0;
- zoff_t dot_count = 0;
- int display_counts = 0;
- int display_bytes = 0;
- int display_globaldots = 0;
- int display_volume = 0;
- int display_usize = 0;
- ulg files_so_far = 0;
- ulg bad_files_so_far = 0;
- ulg files_total = 0;
- uzoff_t bytes_so_far = 0;
- uzoff_t good_bytes_so_far = 0;
- uzoff_t bad_bytes_so_far = 0;
- uzoff_t bytes_total = 0;
- int logall = 0;
- FILE *logfile = NULL;
- int logfile_append = 0;
- char *logfile_path = NULL;
- int hidden_files = 0;
- int volume_label = 0;
- int dirnames = 1;
- int filter_match_case = 1;
- int diff_mode = 0;
- #if defined(WIN32)
- int only_archive_set = 0;
- int clear_archive_bits = 0;
- #endif
- int linkput = 0;
- int noisy = 1;
- int extra_fields = 1;
- int use_descriptors = 0;
- int zip_to_stdout = 0;
- int allow_empty_archive = 0;
- int copy_only = 0;
- int allow_fifo = 0;
- int show_files = 0;
- int output_seekable = 1;
- #ifdef ZIP64_SUPPORT
- int force_zip64 = -1;
-
- int zip64_entry = 0;
- int zip64_archive = 0;
- #endif
- #ifdef NTSD_EAS
- int use_privileges = 0;
- #endif
- #ifndef RISCOS
- #ifndef QDOS
- #ifndef TANDEM
- char *special = ".Z:.zip:.zoo:.arc:.lzh:.arj";
- #else
- char *special = " Z: zip: zoo: arc: lzh: arj";
- #endif
- #else
- char *special = "_Z:_zip:_zoo:_arc:_lzh:_arj";
- #endif
- #else
- char *special = "DDC:D96:68E";
- #endif
- char *key = NULL;
- char *tempath = NULL;
- FILE *mesg;
- #ifdef UNICODE_SUPPORT
- int utf8_force = 0;
- #endif
- int unicode_escape_all = 0;
- int unicode_mismatch = 1;
- time_t scan_delay = 5;
- time_t scan_dot_time = 2;
- time_t scan_start = 0;
- time_t scan_last = 0;
- int scan_started = 0;
- uzoff_t scan_count = 0;
- ulg before = 0;
- ulg after = 0;
- char *zipfile;
- uzoff_t zipbeg;
- uzoff_t cenbeg;
- uzoff_t tempzn;
- char *tempzip = NULL;
- FILE *y = NULL;
- FILE *in_file = NULL;
- char *in_path = NULL;
- char *in_split_path = NULL;
- char *out_path = NULL;
- int zip_attributes = 0;
- ulg total_disks = 0;
- ulg current_in_disk = 0;
- uzoff_t current_in_offset = 0;
- ulg skip_current_disk = 0;
- ulg current_local_disk = 0;
- ulg current_disk = 0;
- ulg cd_start_disk = (ulg)-1;
- uzoff_t cd_start_offset = 0;
- uzoff_t cd_entries_this_disk = 0;
- uzoff_t total_cd_entries = 0;
- ulg zip64_eocd_disk = 0;
- uzoff_t zip64_eocd_offset = 0;
- char *current_local_tempname = NULL;
- FILE *current_local_file = NULL;
- uzoff_t current_local_offset = 0;
- uzoff_t bytes_this_split = 0;
- int read_split_archive = 0;
- int split_method = 0;
- uzoff_t split_size = 0;
- int split_bell = 0;
- uzoff_t bytes_prev_splits = 0;
- uzoff_t bytes_this_entry = 0;
- int noisy_splits = 0;
- int mesg_line_started = 0;
- int logfile_line_started = 0;
- #ifdef WIN32
- int nonlocal_name = 0;
- int nonlocal_path = 0;
- #endif
- #ifdef UNICODE_SUPPORT
- int use_wide_to_mb_default = 0;
- #endif
- struct zlist far *zfiles = NULL;
- extent zcount;
- int zipfile_exists = 0;
- ush zcomlen;
- char *zcomment = NULL;
- struct zlist far **zsort;
- #ifdef UNICODE_SUPPORT
- struct zlist far **zusort;
- #endif
- struct flist far *found = NULL;
- struct flist far * far *fnxt = &found;
-
- extent fcount;
- struct plist *patterns = NULL;
- unsigned pcount = 0;
- unsigned icount = 0;
- unsigned Rcount = 0;
- #ifdef IZ_CHECK_TZ
- int zp_tz_is_valid;
- #endif
|