home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-02 | 23.4 KB | 1,013 lines |
- Newsgroups: comp.sources.misc
- From: leo@s514.ipmce.su (Leonid A. Broukhis)
- Subject: v28i011: freeze - Freeze/melt compression program, Patch02
- Message-ID: <1992Feb2.051701.29115@sparky.imd.sterling.com>
- X-Md4-Signature: cfc18df459d0b08eeab2739a010776e4
- Date: Sun, 2 Feb 1992 05:17:01 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: leo@s514.ipmce.su (Leonid A. Broukhis)
- Posting-number: Volume 28, Issue 11
- Archive-name: freeze/patch02
- Environment: ISC, Xenix, SunOS, MS-DOS
- Patch-To: freeze: Volume 25, Issue 12-13
-
- Here is the patchlevel 2 for Freeze. Modifications done:
-
- - UTIMES handling;
- - TOS support (I don't know what is this, maybe yet another MSDOS-like
- system), hence BIN_DEFAULT replaced with TEXT_DEFAULT;
- - unfreeze now means the same as melt (for non-English speakers and
- to make freeze's interface similar to compress' one).
- - melting progress indicator frequency changed.
-
- --- cut here ---
-
- *** ../distribution/README Fri Jan 31 21:07:17 1992
- --- README Fri Jan 31 21:22:02 1992
- ***************
- *** 5,12 ****
- The following preprocessor symbols control the compilation of Freeze
- package:
-
- ! o BITS The size of hash table (default is 18,
- ! reducing to 14 gives a 50% speeddown).
- o COMPAT Turns on backwards compatibility
- with Freeze 1.0
- o M_XENIX & M_I286 Makes arrays < 65536 bytes each
- --- 5,12 ----
- The following preprocessor symbols control the compilation of Freeze
- package:
-
- ! o BITS The size of hash table (default is 16,
- ! reducing to 14 gives some speeddown).
- o COMPAT Turns on backwards compatibility
- with Freeze 1.0
- o M_XENIX & M_I286 Makes arrays < 65536 bytes each
- ***************
- *** 28,36 ****
- o __i386__ When compiling under GNU C causes
- some fixed register allocations,
- which give better code.
- ! o BIN_DEFAULT (For MS-DOS only!) Define, if you
- ! forget to use -i option when freezing
- ! binary files.
-
- Please! If your computer supports the string operations, try to write
- "asm" instructions (GNU style) which realize the right-to-left memory
- --- 28,41 ----
- o __i386__ When compiling under GNU C causes
- some fixed register allocations,
- which give better code.
- ! o TEXT_DEFAULT (For MS-DOS only!) Define, if you
- ! freeze text files more often than binary
- ! ones. In this case don't forget to use "-i"
- ! to freeze binary files!!
- ! o UTIMES For using the utimes() function
- ! instead of utime(), which is obsolete
- ! on some systems (most notably BSD
- ! 4.3).
-
- Please! If your computer supports the string operations, try to write
- "asm" instructions (GNU style) which realize the right-to-left memory
- ***************
- *** 158,163 ****
- --- 163,169 ----
-
- When using 18 bits table (about 600K) and gcc, the speed of freeze is more
- than the same of ARJ 1.00, but is less than of LHA 2.05.
- + On SPARCs freeze works faster than ZIP 1.0.
-
- Note: the percents mean 'relatively to compressed size', if you want
- to have them relatively to original size, divide them to 2-2.5.
- ***************
- *** 168,174 ****
-
- Note: if you see Compress works nearly as Freeze (on some files), this
- means the maximum is gained, so LHA and ARJ won't better more than
- ! 1-1.5%.
-
- --------------- POSSIBLE IMPROVEMENTS ---------------
-
- --- 174,181 ----
-
- Note: if you see Compress works nearly as Freeze (on some files), this
- means the maximum is gained, so LHA and ARJ won't better more than
- ! 1-1.5%. There are some files (I have one) that freeze compresses better
- ! than ARJ 2.20.
-
- --------------- POSSIBLE IMPROVEMENTS ---------------
-
- *** ../distribution/freeze.1 Fri Jan 31 21:07:22 1992
- --- freeze.1 Fri Dec 6 00:30:51 1991
- ***************
- *** 1,7 ****
- .PU
- .TH FREEZE 1 local
- .SH NAME
- ! freeze, melt, fcat \- compress and uncompress files
- .SH SYNOPSIS
- .ll +8
- .B freeze
- --- 1,7 ----
- .PU
- .TH FREEZE 1 local
- .SH NAME
- ! freeze, unfreeze, melt, fcat \- compress and uncompress files
- .SH SYNOPSIS
- .ll +8
- .B freeze
- ***************
- *** 12,17 ****
- --- 12,24 ----
- ]
- .ll -8
- .br
- + .B unfreeze
- + [
- + .B \-cfvV
- + ] [
- + .I "filename \&..."
- + ]
- + .br
- .B melt
- [
- .B \-cfvV
- ***************
- *** 34,40 ****
- .B \-d
- option, or by running
- .I melt
- ! (linked to
- .IR freeze ),
- on the
- .B "\&.F"
- --- 41,49 ----
- .B \-d
- option, or by running
- .I melt
- ! or
- ! .I unfreeze
- ! (both linked to
- .IR freeze ),
- on the
- .B "\&.F"
- *** ../distribution/freeze.c Fri Jan 31 21:07:24 1992
- --- freeze.c Fri Jan 31 21:27:35 1992
- ***************
- *** 33,38 ****
- --- 33,40 ----
- * (pa@verano.sba.ca.us, clewis@ferret.ocunix.on.ca (Chris Lewis)),
- * "chain threshold" euristic used for speedup (in "greedy" mode) -
- * a la ZIP (Jean-Loup Gailly). Max. hash bits reduced to 16.
- + * Version 2.3.2: Adaptation to TOS 1.04 (fifi@hiss.han.de), UTIMES
- + * handling (jik@athena.mit.edu).
- */
-
- static char ident[] = "@(#) freeze.c 2.3.%d %s leo@s514.ipmce.su\n";
- ***************
- *** 42,60 ****
- void Usage() {
- #ifdef DEBUG
-
- ! # ifdef MSDOS
- fprintf(stderr,"Usage: freeze [-cdDfitvVg] [file | +type ...]\n");
- # else
- fprintf(stderr,"Usage: freeze [-cdDfvVg] [file | +type ...]\n");
- ! # endif /* MSDOS */
-
- #else
-
- ! # ifdef MSDOS
- fprintf(stderr,"Usage: freeze [-cdfitvVg] [file | +type ...]\n");
- # else
- fprintf(stderr,"Usage: freeze [-cdfvVg] [file | +type ...]\n");
- ! # endif /* MSDOS */
-
- #endif /* DEBUG */
- }
- --- 44,62 ----
- void Usage() {
- #ifdef DEBUG
-
- ! # ifdef DOS
- fprintf(stderr,"Usage: freeze [-cdDfitvVg] [file | +type ...]\n");
- # else
- fprintf(stderr,"Usage: freeze [-cdDfvVg] [file | +type ...]\n");
- ! # endif /* DOS */
-
- #else
-
- ! # ifdef DOS
- fprintf(stderr,"Usage: freeze [-cdfitvVg] [file | +type ...]\n");
- # else
- fprintf(stderr,"Usage: freeze [-cdfvVg] [file | +type ...]\n");
- ! # endif /* DOS */
-
- #endif /* DEBUG */
- }
- ***************
- *** 71,83 ****
- char ofname [MAXNAMLEN];
- struct stat statbuf; /* Used by 'main' and 'copystat' routines */
-
- ! #ifdef MSDOS
- char *last_sep(); /* last slash, backslash, or colon */
- char tail[2]; /* 2nd and 3rd chars of file extension */
- ! # ifdef BIN_DEFAULT
- ! short image = O_BINARY;
- ! # else
- short image = O_TEXT;
- # endif
- #else
- # define last_sep(s) strrchr((s), '/') /* Unix always uses slashes */
- --- 73,87 ----
- char ofname [MAXNAMLEN];
- struct stat statbuf; /* Used by 'main' and 'copystat' routines */
-
- ! char inbuf[BUFSIZ * 4], outbuf[BUFSIZ * 4];
- !
- ! #ifdef DOS
- char *last_sep(); /* last slash, backslash, or colon */
- char tail[2]; /* 2nd and 3rd chars of file extension */
- ! # ifdef TEXT_DEFAULT
- short image = O_TEXT;
- + # else
- + short image = O_BINARY;
- # endif
- #else
- # define last_sep(s) strrchr((s), '/') /* Unix always uses slashes */
- ***************
- *** 166,172 ****
- char **filelist, **fileptr;
- char *cp;
-
- ! #ifndef MSDOS
- char *malloc();
- #endif
-
- --- 170,182 ----
- char **filelist, **fileptr;
- char *cp;
-
- ! #ifdef TOS
- !
- ! char *argv0 = "freeze.ttp"; /* argv[0] is not defined :-( */
- !
- ! #endif
- !
- ! #ifndef DOS
- char *malloc();
- #endif
-
- ***************
- *** 176,182 ****
- extern onintr();
- #endif
-
- ! #ifdef MSDOS
- char *sufp;
- #else
- #ifdef INT_SIG
- --- 186,192 ----
- extern onintr();
- #endif
-
- ! #ifdef DOS
- char *sufp;
- #else
- #ifdef INT_SIG
- ***************
- *** 186,200 ****
- #endif
- #endif
-
- ! #ifndef MSDOS
- if ( (bgnd_flag = signal ( SIGINT, SIG_IGN )) != SIG_IGN )
- #endif
- {
- (void) signal ( SIGINT, onintr );
- #ifdef __TURBOC__
- setcbrk(1);
- #endif
- ! #ifndef MSDOS
- (void) signal ( SIGSEGV, oops );
- #endif
- }
- --- 196,214 ----
- #endif
- #endif
-
- ! #ifndef DOS
- if ( (bgnd_flag = signal ( SIGINT, SIG_IGN )) != SIG_IGN )
- #endif
- {
- (void) signal ( SIGINT, onintr );
- #ifdef __TURBOC__
- +
- + #ifndef TOS
- setcbrk(1);
- +
- + #endif
- #endif
- ! #ifndef DOS
- (void) signal ( SIGSEGV, oops );
- #endif
- }
- ***************
- *** 205,225 ****
- if((cp = last_sep(argv[0])) != 0) {
- cp++;
- } else {
- cp = argv[0];
- - }
-
- ! #ifdef MSDOS
-
- /* use case-insensitive match: parent may not be command.com */
- ! if(stricmp(cp, "melt.exe") == 0) {
- #else
- ! if(strcmp(cp, "melt") == 0) {
- #endif
-
- do_melt = 1;
- !
- #ifdef MSDOS
- } else if(stricmp(cp, "fcat.exe") == 0) {
- #else
- } else if(strcmp(cp, "fcat") == 0) {
- #endif
- --- 219,254 ----
- if((cp = last_sep(argv[0])) != 0) {
- cp++;
- } else {
- +
- + #ifdef TOS
- +
- + cp = argv0;
- +
- + #else
- cp = argv[0];
-
- ! #endif
- ! }
-
- + #ifdef DOS
- /* use case-insensitive match: parent may not be command.com */
- ! #ifdef MSDOS
- ! if (!stricmp(cp, "unfreeze.exe") || !stricmp(cp, "melt.exe")) {
- ! #else /* TOS */
- ! if (!stricmp(cp, "unfreeze.ttp") || !stricmp(cp, "melt.ttp")) {
- ! #endif
- #else
- ! if (!strcmp(cp, "unfreeze") || !strcmp(cp, "melt")) {
- #endif
-
- do_melt = 1;
- !
- ! #ifdef DOS
- #ifdef MSDOS
- } else if(stricmp(cp, "fcat.exe") == 0) {
- + #else /* TOS */
- + } else if(stricmp(cp, "fcat.ttp") == 0) {
- + #endif
- #else
- } else if(strcmp(cp, "fcat") == 0) {
- #endif
- ***************
- *** 229,235 ****
-
- } else {
- /* Freezing */
- ! #ifndef MSDOS
- (void) defopen(deffile);
- #else
- cp = strrchr(cp, '.');
- --- 258,265 ----
-
- } else {
- /* Freezing */
- !
- ! #ifndef DOS
- (void) defopen(deffile);
- #else
- cp = strrchr(cp, '.');
- ***************
- *** 237,244 ****
- *++cp = 'N';
- *++cp = 'F';
- *++cp = '\0';
- (void) defopen(argv[0]);
- ! #endif
- }
- #ifdef BSD4_2
- /* 4.2BSD dependent - take it out if not */
- --- 267,280 ----
- *++cp = 'N';
- *++cp = 'F';
- *++cp = '\0';
- +
- + #ifdef TOS
- + (void) defopen(argv0);
- + #else
- (void) defopen(argv[0]);
- ! #endif /* TOS */
- ! #endif /* DOS */
- !
- }
- #ifdef BSD4_2
- /* 4.2BSD dependent - take it out if not */
- ***************
- *** 271,277 ****
- version();
- #endif /* DEBUG */
- break;
- ! #ifdef MSDOS
- case 'i':
- case 'b':
- image = O_BINARY; /* binary (aka image) mode */
- --- 307,313 ----
- version();
- #endif /* DEBUG */
- break;
- ! #ifdef DOS
- case 'i':
- case 'b':
- image = O_BINARY; /* binary (aka image) mode */
- ***************
- *** 331,337 ****
- exit_stat = 0;
- if (do_melt != 0) { /* MELTING */
-
- ! #ifdef MSDOS
- /* Check for .F or XF suffix; add one if necessary */
- cp = *fileptr + strlen(*fileptr) - 2;
- if ((*cp != '.' && *cp != 'X' && *cp != 'x') ||
- --- 367,373 ----
- exit_stat = 0;
- if (do_melt != 0) { /* MELTING */
-
- ! #ifdef DOS
- /* Check for .F or XF suffix; add one if necessary */
- cp = *fileptr + strlen(*fileptr) - 2;
- if ((*cp != '.' && *cp != 'X' && *cp != 'x') ||
- ***************
- *** 360,366 ****
- (void) strcat(tempname, ".F");
- *fileptr = tempname;
- }
- ! #endif /*MSDOS */
-
- /* Open input file for melting */
-
- --- 396,402 ----
- (void) strcat(tempname, ".F");
- *fileptr = tempname;
- }
- ! #endif /*DOS */
-
- /* Open input file for melting */
-
- ***************
- *** 367,373 ****
- if (checkstat(*fileptr))
- continue;
-
- ! #ifdef MSDOS
- if ((freopen(*fileptr, "rb", stdin)) == NULL)
- #else
- if ((freopen(*fileptr, "r", stdin)) == NULL)
- --- 403,409 ----
- if (checkstat(*fileptr))
- continue;
-
- ! #ifdef DOS
- if ((freopen(*fileptr, "rb", stdin)) == NULL)
- #else
- if ((freopen(*fileptr, "r", stdin)) == NULL)
- ***************
- *** 398,410 ****
- precious = 1;
- (void) strcpy(ofname, *fileptr);
- ofname[strlen(*fileptr) - 2] = '\0'; /* Strip off .F */
- ! #ifdef MSDOS
- (void) strcat(ofname, tail);
- #endif
- } else {
-
- /* FREEZING */
- ! #ifdef MSDOS
- cp = *fileptr + strlen(*fileptr) - 2;
- if ((*cp == '.' || *cp == 'X' || *cp == 'x') &&
- (*(++cp) == 'F' || *cp == 'f')) {
- --- 434,446 ----
- precious = 1;
- (void) strcpy(ofname, *fileptr);
- ofname[strlen(*fileptr) - 2] = '\0'; /* Strip off .F */
- ! #ifdef DOS
- (void) strcat(ofname, tail);
- #endif
- } else {
-
- /* FREEZING */
- ! #ifdef DOS
- cp = *fileptr + strlen(*fileptr) - 2;
- if ((*cp == '.' || *cp == 'X' || *cp == 'x') &&
- (*(++cp) == 'F' || *cp == 'f')) {
- ***************
- *** 414,420 ****
- if (strcmp(*fileptr + strlen(*fileptr) - 2, ".F") == 0) {
- fprintf(stderr, "%s: already has .F suffix -- no change\n",
- *fileptr);
- ! #endif /* MSDOS */
-
- continue;
- }
- --- 450,456 ----
- if (strcmp(*fileptr + strlen(*fileptr) - 2, ".F") == 0) {
- fprintf(stderr, "%s: already has .F suffix -- no change\n",
- *fileptr);
- ! #endif /* DOS */
-
- continue;
- }
- ***************
- *** 423,429 ****
- if (checkstat(*fileptr))
- continue;
-
- ! #ifdef MSDOS
- if ((freopen(*fileptr, image == O_TEXT ? "rt" : "rb", stdin))
- == NULL)
- #else
- --- 459,465 ----
- if (checkstat(*fileptr))
- continue;
-
- ! #ifdef DOS
- if ((freopen(*fileptr, image == O_TEXT ? "rt" : "rb", stdin))
- == NULL)
- #else
- ***************
- *** 438,444 ****
- #ifndef BSD4_2 /* Short filenames */
- if ((cp = last_sep(ofname)) != NULL) cp++;
- else cp = ofname;
- ! # ifdef MSDOS
- if (topipe == 0 && (sufp = strrchr(cp, '.')) != NULL &&
- strlen(sufp) > 2) fprintf(stderr,
- "%s: part of filename extension will be replaced by XF\n",
- --- 474,480 ----
- #ifndef BSD4_2 /* Short filenames */
- if ((cp = last_sep(ofname)) != NULL) cp++;
- else cp = ofname;
- ! # ifdef DOS
- if (topipe == 0 && (sufp = strrchr(cp, '.')) != NULL &&
- strlen(sufp) > 2) fprintf(stderr,
- "%s: part of filename extension will be replaced by XF\n",
- ***************
- *** 448,457 ****
- fprintf(stderr,"%s: filename too long to tack on .F\n",cp);
- continue;
- }
- ! # endif /* MSDOS */
- #endif /* BSD4_2 Long filenames allowed */
-
- ! #ifdef MSDOS
- /* There is no difference between FOOBAR and FOOBAR. names */
- if ((cp = strrchr(ofname, '.')) == NULL)
- (void) strcat(ofname, ".F");
- --- 484,493 ----
- fprintf(stderr,"%s: filename too long to tack on .F\n",cp);
- continue;
- }
- ! # endif /* DOS */
- #endif /* BSD4_2 Long filenames allowed */
-
- ! #ifdef DOS
- /* There is no difference between FOOBAR and FOOBAR. names */
- if ((cp = strrchr(ofname, '.')) == NULL)
- (void) strcat(ofname, ".F");
- ***************
- *** 464,470 ****
- }
- #else
- (void) strcat(ofname, ".F");
- ! #endif /* MSDOS */
-
- }
- /* Check for overwrite of existing file */
- --- 500,506 ----
- }
- #else
- (void) strcat(ofname, ".F");
- ! #endif /* DOS */
-
- }
- /* Check for overwrite of existing file */
- ***************
- *** 473,479 ****
- char response[2];
- response[0] = 'n';
- fprintf(stderr, "%s already exists;", ofname);
- ! #ifndef MSDOS
- if (foreground()) {
- #endif
- fprintf(stderr,
- --- 509,515 ----
- char response[2];
- response[0] = 'n';
- fprintf(stderr, "%s already exists;", ofname);
- ! #ifndef DOS
- if (foreground()) {
- #endif
- fprintf(stderr,
- ***************
- *** 485,491 ****
- perror("stderr"); break;
- }
- }
- ! #ifndef MSDOS
- }
- #endif
- if (response[0] != 'y') {
- --- 521,527 ----
- perror("stderr"); break;
- }
- }
- ! #ifndef DOS
- }
- #endif
- if (response[0] != 'y') {
- ***************
- *** 499,505 ****
- #ifdef DEBUG
- if (do_melt == 0 || debug == 0) {
- #endif
- ! #ifdef MSDOS
- if (freopen(ofname, do_melt && image == O_TEXT ? "wt" : "wb",
- stdout) == NULL)
- #else
- --- 535,541 ----
- #ifdef DEBUG
- if (do_melt == 0 || debug == 0) {
- #endif
- ! #ifdef DOS
- if (freopen(ofname, do_melt && image == O_TEXT ? "wt" : "wb",
- stdout) == NULL)
- #else
- ***************
- *** 558,563 ****
- --- 594,601 ----
- indc_threshold = file_length / 100;
- if (indc_threshold < 4096)
- indc_threshold = 4096;
- + if (do_melt)
- + indc_threshold *= 3;
-
- topipe = 1;
- if (do_melt == 0) {
- ***************
- *** 671,678 ****
- --- 709,720 ----
- #ifdef __TURBOC__
- struct ftime utimbuf;
- #else
- + #ifdef UTIMES
- + struct timeval timep[2];
- + #else
- struct utimbuf timep;
- #endif
- + #endif
-
- int mode;
-
- ***************
- *** 696,706 ****
- }
-
- exit_stat = 0;
- mode = statbuf.st_mode & 07777;
- if (chmod(ofname, mode)) /* Copy modes */
- perror(ofname);
- !
- ! #ifndef MSDOS
- /* Copy ownership */
- (void) chown(ofname, (int) statbuf.st_uid, (int) statbuf.st_gid);
- #endif
- --- 738,754 ----
- }
-
- exit_stat = 0;
- +
- + #ifdef TOS
- +
- + Fattrib(ofname,1,Fattrib(ifname,0,0));
- +
- + #else
- mode = statbuf.st_mode & 07777;
- if (chmod(ofname, mode)) /* Copy modes */
- perror(ofname);
- ! #endif
- ! #ifndef DOS
- /* Copy ownership */
- (void) chown(ofname, (int) statbuf.st_uid, (int) statbuf.st_gid);
- #endif
- ***************
- *** 711,716 ****
- --- 759,770 ----
- setftime(fileno(stdout),&utimbuf);
- (void) fclose(stdout);
- #else
- + #ifdef UTIMES
- + timep[0].tv_sec = statbuf.st_atime;
- + timep[1].tv_sec = statbuf.st_mtime;
- + timep[0].tv_usec = timep[1].tv_usec = 0;
- + (void) utimes(ofname, timep);
- + #else
- timep.actime = statbuf.st_atime;
- timep.modtime = statbuf.st_mtime;
-
- ***************
- *** 721,727 ****
-
- /* Update last accessed and modified times */
- (void) utime(ofname, &timep);
- ! #endif
- if (unlink(ifname)) /* Remove input file */
- perror(ifname);
- if(quiet != 1)
- --- 775,782 ----
-
- /* Update last accessed and modified times */
- (void) utime(ofname, &timep);
- ! #endif /* UTIMES */
- ! #endif /* __TURBOC__ */
- if (unlink(ifname)) /* Remove input file */
- perror(ifname);
- if(quiet != 1)
- ***************
- *** 745,763 ****
- return exit_stat = 1;
- }
-
- ! /* Do NOT try to freeze /dev/null or /dev/tty ... */
- !
- ! #ifndef MSDOS
- ! if ((statbuf.st_mode & S_IFMT) != S_IFREG) {
- ! fprintf(stderr, "%s: ", ifname);
- ! fprintf(stderr, " not a regular file -- unchanged\n");
- ! return exit_stat = 1;
-
- ! } else if (statbuf.st_nlink > 1) {
- ! fprintf(stderr, "%s: ", ifname);
- ! fprintf(stderr, " has %d other links -- unchanged\n",
- ! statbuf.st_nlink - 1);
- ! return exit_stat = 1;
- }
- #endif /* MSDOS */
-
- --- 800,821 ----
- return exit_stat = 1;
- }
-
- ! /* Do NOT try to freeze /dev/null or /dev/tty... */
- ! /* but you may freeze or melt everything to stdout */
-
- ! #ifndef DOS
- ! if (!topipe) {
- ! if ((statbuf.st_mode & S_IFMT) != S_IFREG) {
- ! fprintf(stderr, "%s: ", ifname);
- ! fprintf(stderr, " not a regular file -- unchanged\n");
- ! return exit_stat = 1;
- !
- ! } else if (statbuf.st_nlink > 1) {
- ! fprintf(stderr, "%s: ", ifname);
- ! fprintf(stderr, " has %d other links -- unchanged\n",
- ! statbuf.st_nlink - 1);
- ! return exit_stat = 1;
- ! }
- }
- #endif /* MSDOS */
-
- ***************
- *** 766,776 ****
- indc_threshold = file_length / 100;
- if (indc_threshold < 4096)
- indc_threshold = 4096;
-
- return exit_stat = 0;
- }
-
- ! #ifndef MSDOS
- /*
- * This routine returns 1 if we are running in the foreground and stderr
- * is a tty. (as in compress(1))
- --- 824,836 ----
- indc_threshold = file_length / 100;
- if (indc_threshold < 4096)
- indc_threshold = 4096;
- + if (do_melt)
- + indc_threshold *= 3;
-
- return exit_stat = 0;
- }
-
- ! #ifndef DOS
- /*
- * This routine returns 1 if we are running in the foreground and stderr
- * is a tty. (as in compress(1))
- ***************
- *** 844,850 ****
- fprintf(stderr, "Static Huffman table: %d %d %d %d %d %d %d %d\n",
- Table2[1], Table2[2], Table2[3], Table2[4],
- Table2[5], Table2[6], Table2[7], Table2[8]);
- ! #ifdef MSDOS
- fprintf(stderr, "Default melted mode: %s\n",
- image == O_BINARY ? "binary" : "text");
- #endif
- --- 904,910 ----
- fprintf(stderr, "Static Huffman table: %d %d %d %d %d %d %d %d\n",
- Table2[1], Table2[2], Table2[3], Table2[4],
- Table2[5], Table2[6], Table2[7], Table2[8]);
- ! #ifdef DOS
- fprintf(stderr, "Default melted mode: %s\n",
- image == O_BINARY ? "binary" : "text");
- #endif
- ***************
- *** 898,904 ****
- }
- }
-
- ! #ifdef MSDOS
-
- /* MSDOS typically has ':' and '\\' separators, but some command
- processors (and the int 21h function handler) support '/' too.
- --- 958,964 ----
- }
- }
-
- ! #ifdef DOS
-
- /* MSDOS typically has ':' and '\\' separators, but some command
- processors (and the int 21h function handler) support '/' too.
- ***************
- *** 915,918 ****
- return(p);
- }
-
- ! #endif /* MSDOS */
- --- 975,978 ----
- return(p);
- }
-
- ! #endif /* DOS */
- *** ../distribution/freeze.h Fri Jan 31 21:07:24 1992
- --- freeze.h Fri Dec 6 15:21:23 1991
- ***************
- *** 11,23 ****
- --- 11,48 ----
- # endif
- #endif /* SUN4 */
-
- + #if !defined(MSDOS) && defined(__MSDOS__)
- + #define MSDOS
- + #endif
- +
- + #ifdef MSDOS
- + #define DOS
- + # include <fcntl.h>
- + #endif /* MSDOS */
- +
- + #ifdef TOS
- + #define DOS
- + #define O_TEXT 0x01
- + #define O_BINARY 0x02
- + #endif
- +
- #include <ctype.h>
- #include <signal.h>
- +
- + #ifndef TOS
- #include <sys/types.h>
- #include <sys/stat.h>
- + #else
- + #include <tos.h>
- + #include <types.h>
- + #endif
-
- #ifndef __TURBOC__
- + #ifdef UTIMES
- + #include <sys/time.h>
- + #else
- #include <utime.h> /* Some systems have sys/utime.h instead of this */
- + #endif /* UTIMES */
- #endif
-
- #if defined(BSD42) && !defined(BSD4_2)
- ***************
- *** 46,61 ****
- #include <assert.h>
- #endif /* DEBUG */
-
- ! #ifdef __TURBOC__
- ! #define MSDOS
- ! #include <io.h>
- ! #include <alloc.h>
- ! #endif /* __TURBOC__ */
-
- ! #ifdef MSDOS
- ! #include <stdlib.h>
- ! #include <fcntl.h>
- ! #endif /* MSDOS */
-
- typedef unsigned short us_t;
- typedef unsigned char uc_t;
- --- 71,88 ----
- #include <assert.h>
- #endif /* DEBUG */
-
- ! #ifdef DOS
- ! # include <stdlib.h>
- ! #endif /* DOS */
-
- ! #ifdef __TURBOC__
- ! # ifdef MSDOS
- ! # include <io.h>
- ! # include <alloc.h>
- ! # else /* TOS */
- ! # include <ext.h>
- ! # endif /* MSDOS */
- ! #endif /* __TURBOC__ */
-
- typedef unsigned short us_t;
- typedef unsigned char uc_t;
- *** ../distribution/makefile Fri Jan 31 21:07:27 1992
- --- makefile Thu Jan 30 19:50:51 1992
- ***************
- *** 9,19 ****
- lz.h\
- patchlevel.h
- LDFLAGS =
- ! LIBS = -lc_s # shared library
-
- ! CC = gcc
-
- ! CFLAGS = -DBITS=16 -O -DCOMPAT -DFAST -fstrength-reduce #-DBSD42 -DSUN4
-
- LINTFLAGS = -DBITS=15 -DCOMPAT -DDEBUG -DGATHER_STAT -x -DFAST
-
- --- 9,20 ----
- lz.h\
- patchlevel.h
- LDFLAGS =
- ! LIBS = -lc_s # shared library, if it's SysV
-
- ! CC = gcc -fstrength-reduce
- ! # or proprietary compiler, if it's better than that
-
- ! CFLAGS = -DBITS=16 -O -DCOMPAT -DFAST # -DBSD42 -DSUN4
-
- LINTFLAGS = -DBITS=15 -DCOMPAT -DDEBUG -DGATHER_STAT -x -DFAST
-
- *** ../distribution/patchlevel.h Fri Jan 31 21:07:28 1992
- --- patchlevel.h Thu Jan 30 19:29:53 1992
- ***************
- *** 1,2 ****
- ! #define PATCHLEVEL 1
- ! #define PATCHDATE "11/20/91"
- --- 1,2 ----
- ! #define PATCHLEVEL 2
- ! #define PATCHDATE "1/30/92"
- *** ../distribution/statist.c Fri Jan 31 21:07:30 1992
- --- statist.c Fri Dec 6 00:30:53 1991
- ***************
- *** 51,59 ****
- }
- signal(SIGINT, giveres);
-
- ! #ifdef MSDOS
- setmode(fileno(stdin), O_BINARY); /* Oh this MS-DOS ... */
- ! #endif /* MSDOS */
-
- freeze();
- giveres();
- --- 51,59 ----
- }
- signal(SIGINT, giveres);
-
- ! #ifdef DOS
- setmode(fileno(stdin), O_BINARY); /* Oh this MS-DOS ... */
- ! #endif /* DOS */
-
- freeze();
- giveres();
-
- --- cut here ---
- --
- Leonid A. Broukhis | 89-1-95 Liberty St. | "BROUKHIS" is Hebrew for
- +7 095 494 6241 (h)| Moscow 123481 Russia| "BENEDICTAE"
- +7 095 132 9475 (o)| (leo@s514.ipmce.su) | { Age: 9025 days }
-
- exit 0 # Just in case...
-