liberte@uiucdcs.Uiuc.ARPA (08/02/85)
You won't need this mod from Jim Budler unless you have a 16-bit int. But you might want it just to keep up. Dave Johnson, the creator of xbin (and macget/macput), informed me of this update and basically approved of the updates done by myself and Ephraim Vishniac. There may be a few more mods of macget/macput coming. Part of the reason for all this confusion is that Dave's uucp neighbors aren't on the best speaking terms. Dan LaLiberte liberte@uiucdcs.Uiuc.ARPA ihnp4!uiucdcs!liberte *** /tmp/,RCSt1003338 Thu Aug 1 23:32:07 1985 << Vishniac's posting --- xbin.c Thu Aug 1 23:31:16 1985 *************** *** 99,104 * revised ddj 03/17/85 -- extend new features to older formats: -l, stdin * revised ddj 03/24/85 -- check for filename truncation, allow multiple files * revised ddj 03/26/85 -- fixed USG botches, many problems w/multiple files */ char usage[] = "usage: \"xbin [-v] [-l] [-o] [-n name] [-] filename\"\n"; --- 99,107 ----- * revised ddj 03/17/85 -- extend new features to older formats: -l, stdin * revised ddj 03/24/85 -- check for filename truncation, allow multiple files * revised ddj 03/26/85 -- fixed USG botches, many problems w/multiple files + * revised jcb 03/30/85 -- revised for compatibility with 16-bit int + * revised liberte 07/12/85 -- added trlookup for indexed translation + * revised vishniac 07/23/85 -- picked out some more lint */ char usage[] = "usage: \"xbin [-v] [-l] [-o] [-n name] [-] filename\"\n"; *************** *** 255,262 printf("author: %.4s, ", mh.m_author); printf("flags: 0x%x\n", mh.m_flags); if (qformat) { ! printf("data length: %d, ", mh.m_datalen); ! printf("rsrc length: %d\n", mh.m_rsrclen); } if (!pre_beta) { printf("create time: %s", ctime(&mh.m_createtime)); --- 258,265 ----- printf("author: %.4s, ", mh.m_author); printf("flags: 0x%x\n", mh.m_flags); if (qformat) { ! printf("data length: %ld, ", mh.m_datalen); ! printf("rsrc length: %ld\n", mh.m_rsrclen); } if (!pre_beta) { printf("create time: %s", ctime(&mh.m_createtime)); *************** *** 490,496 get4q() { register int c, i; ! long value = 0; for (i = 0; i < 4; i++) { c = getq(); --- 493,499 ----- get4q() { register int c, i; ! long value = 0L; for (i = 0; i < 4; i++) { c = getq(); *************** *** 642,648 register unsigned int c; { register int i; ! register unsigned int temp = crc; for (i=0; i<8; i++) { c <<= 1; --- 645,651 ----- register unsigned int c; { register int i; ! register long temp = crc; for (i=0; i<8; i++) { c <<= 1; *************** *** 708,713 char ibuf[BUFSIZ]; int forks = 0, found_crc = 0; unsigned int calc_crc, file_crc; crc = 0; /* calculate a crc for both forks */ --- 711,717 ----- char ibuf[BUFSIZ]; int forks = 0, found_crc = 0; unsigned int calc_crc, file_crc; + long make_file(); crc = 0; /* calculate a crc for both forks */ *************** *** 709,715 int forks = 0, found_crc = 0; unsigned int calc_crc, file_crc; - crc = 0; /* calculate a crc for both forks */ /* create empty files ahead of time */ --- 713,718 ----- unsigned int calc_crc, file_crc; long make_file(); crc = 0; /* calculate a crc for both forks */ /* create empty files ahead of time */ *************** *** 754,759 } } make_file(fname, compressed) char *fname; int compressed; --- 757,763 ----- } } + long make_file(fname, compressed) char *fname; int compressed; *************** *** 760,766 { char ibuf[BUFSIZ]; FILE *outf; ! int nbytes = 0; outf = fopen(fname, "w"); if (outf == NULL) { --- 764,770 ----- { char ibuf[BUFSIZ]; FILE *outf; ! long nbytes = 0L; outf = fopen(fname, "w"); if (outf == NULL) {