From: Hans-Bernhard B. <br...@us...> - 2005-11-22 11:29:04
|
Update of /cvsroot/cscope/cscope/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8544/src Modified Files: dir.c invlib.c Log Message: Find C++ with three-letter filename extensions. Fix a bug in inverted index handling on 64-bit platforms. Index: dir.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/dir.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** dir.c 8 Dec 2004 21:23:03 -0000 1.22 --- dir.c 22 Nov 2005 11:28:55 -0000 1.23 *************** *** 533,536 **** --- 533,537 ---- char *file = mybasename(path); char *s = strrchr(file, '.'); + BOOL looks_like_source = NO; /* ensure there is some file suffix */ *************** *** 557,561 **** case 'H': case 'L': ! return(YES); } } else if ((s[2] == '\0') /* 2 char suffix */ --- 558,562 ---- case 'H': case 'L': ! looks_like_source = YES; } } else if ((s[2] == '\0') /* 2 char suffix */ *************** *** 566,585 **** || (s[0] == 'c' && s[1] == 'c') /* C++ source */ || (s[0] == 'h' && s[1] == 'h'))) { /* C++ header */ - /* some directories have 2 character - suffixes so make sure it is a file */ - if (lstat(path, &statstruct) == 0 && - S_ISREG(statstruct.st_mode)) { - return(YES); - } } else if((s[3] == '\0') /* 3 char suffix */ /* C++ template source */ ! && (s[0] == 't' && s[1] == 'c' && s[2] == 'c' ) ! ) { ! /* make sure it is a file */ ! if (lstat(path, &statstruct) == 0 && ! S_ISREG(statstruct.st_mode)) { ! return(YES); ! } } return NO; --- 567,589 ---- || (s[0] == 'c' && s[1] == 'c') /* C++ source */ || (s[0] == 'h' && s[1] == 'h'))) { /* C++ header */ + looks_like_source = YES; } else if((s[3] == '\0') /* 3 char suffix */ /* C++ template source */ ! && ((s[0] == 't' && s[1] == 'c' && s[2] == 'c' ) ! /* C++ source: */ ! || (s[0] == 'c' && s[1] == 'p' && s[2] == 'p' ) ! || (s[0] == 'c' && s[1] == 'x' && s[2] == 'x' )) ! ) { ! looks_like_source = YES; ! } ! ! if (looks_like_source != YES) ! return NO; ! ! /* make sure it is a file */ ! if (lstat(path, &statstruct) == 0 && ! S_ISREG(statstruct.st_mode)) { ! return(YES); } return NO; Index: invlib.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/invlib.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** invlib.c 13 Aug 2001 15:31:22 -0000 1.15 --- invlib.c 22 Nov 2005 11:28:55 -0000 1.16 *************** *** 128,132 **** } indexfile = invname; ! (void) fseek(outfile, (long) BUFSIZ, 0); /* posting file */ --- 128,132 ---- } indexfile = invname; ! fseek(outfile, BUFSIZ, SEEK_SET); /* posting file */ *************** *** 159,163 **** supint++; /* leave first term open for a count */ /* initialize using an empty term */ ! (void) strcpy(thisterm, ""); *supint++ = 0; *supfing++ = ' '; --- 159,163 ---- supint++; /* leave first term open for a count */ /* initialize using an empty term */ ! strcpy(thisterm, ""); *supint++ = 0; *supfing++ = ' '; *************** *** 195,200 **** #endif #if DEBUG ! (void) printf("%ld: %s ", totpost, line); ! (void) fflush(stdout); #endif if (strcmp(thisterm, line) == 0) { --- 195,200 ---- #endif #if DEBUG ! printf("%ld: %s ", totpost, line); ! fflush(stdout); #endif if (strcmp(thisterm, line) == 0) { *************** *** 208,213 **** postptr = i + POST; #if DEBUG ! (void) printf("reallocated post space to %u, totpost=%ld\n", ! postsize, totpost); #endif } --- 208,213 ---- postptr = i + POST; #if DEBUG ! printf("reallocated post space to %u, totpost=%ld\n", ! postsize, totpost); #endif } *************** *** 218,222 **** return(0); } ! (void) strcpy(thisterm, line); numpost = 1; postptr = POST; --- 218,222 ---- return(0); } ! strcpy(thisterm, line); numpost = 1; postptr = POST; *************** *** 248,254 **** *postptr++ = posting; #if DEBUG ! (void) printf("%ld %ld %ld %ld\n", posting.fileindex, ! posting.fcnoffset, posting.lineoffset, posting.type); ! (void) fflush(stdout); #endif } --- 248,254 ---- *postptr++ = posting; #if DEBUG ! printf("%ld %ld %ld %ld\n", posting.fileindex, ! posting.fcnoffset, posting.lineoffset, posting.type); ! fflush(stdout); #endif } *************** *** 313,317 **** goto cannotwrite; } ! (void) fseek(outfile, (long)BUFSIZ + 8, 0); /* get to second word first block */ tlong = numlogblk - 1; if (fwrite(&tlong, sizeof(tlong), 1, outfile) == 0 || --- 313,318 ---- goto cannotwrite; } ! /* get to second word first block */ ! fseek(outfile, BUFSIZ + 2 * sizeof(long), SEEK_SET); tlong = numlogblk - 1; if (fwrite(&tlong, sizeof(tlong), 1, outfile) == 0 || *************** *** 327,342 **** --totterm; /* don't count null term */ #if STATS ! (void) printf("logical blocks = %d, postings = %ld, terms = %ld, max term length = %d\n", numlogblk, totpost, totterm, maxtermlen); if (showzipf) { ! (void) printf("\n************* ZIPF curve ****************\n"); for (j = ZIPFSIZE; j > 1; j--) if (zipf[j]) break; for (i = 1; i < j; ++i) { ! (void) printf("%3d -%6d ", i, zipf[i]); ! if (i % 6 == 0) (void) putchar('\n'); } ! (void) printf(">%d-%6d\n", ZIPFSIZE, zipf[0]); } #endif --- 328,343 ---- --totterm; /* don't count null term */ #if STATS ! printf("logical blocks = %d, postings = %ld, terms = %ld, max term length = %d\n", numlogblk, totpost, totterm, maxtermlen); if (showzipf) { ! printf("\n************* ZIPF curve ****************\n"); for (j = ZIPFSIZE; j > 1; j--) if (zipf[j]) break; for (i = 1; i < j; ++i) { ! printf("%3d -%6d ", i, zipf[i]); ! if (i % 6 == 0) putchar('\n'); } ! printf(">%d-%6d\n", ZIPFSIZE, zipf[0]); } #endif *************** *** 385,389 **** supfing = i + SUPFING; #if DEBUG ! (void) printf("reallocated superfinger space to %d, totpost=%ld\n", supersize, totpost); #endif --- 386,390 ---- supfing = i + SUPFING; #if DEBUG ! printf("reallocated superfinger space to %d, totpost=%ld\n", supersize, totpost); #endif *************** *** 400,404 **** supint = i + SUPINT; #if DEBUG ! (void) printf("reallocated superfinger offset to %d, totpost = %ld\n", supintsize * sizeof(long), totpost); #endif --- 401,405 ---- supint = i + SUPINT; #if DEBUG ! printf("reallocated superfinger offset to %d, totpost = %ld\n", supintsize * sizeof(long), totpost); #endif *************** *** 448,455 **** iteminfo.packword[1] = logicalblk.invblk[4]; tptr2 = logicalblk.chrblk + iteminfo.e.offset; ! (void) strncpy(supfing, tptr2, (int) iteminfo.e.size); *(supfing + iteminfo.e.size) = '\0'; #if DEBUG ! (void) printf("backup %d at term=%s to term=%s\n", backupflag, thisterm, supfing); #endif --- 449,456 ---- iteminfo.packword[1] = logicalblk.invblk[4]; tptr2 = logicalblk.chrblk + iteminfo.e.offset; ! strncpy(supfing, tptr2, (int) iteminfo.e.size); *(supfing + iteminfo.e.size) = '\0'; #if DEBUG ! printf("backup %d at term=%s to term=%s\n", backupflag, thisterm, supfing); #endif *************** *** 476,480 **** lastinblk = sizeof(t_logicalblk); /* add new term to superindex */ ! (void) strcpy(supfing, thisterm); supfing += strlen(thisterm) + 1; *supint++ = nextsupfing; --- 477,481 ---- lastinblk = sizeof(t_logicalblk); /* add new term to superindex */ ! strcpy(supfing, thisterm); supfing += strlen(thisterm) + 1; *supint++ = nextsupfing; *************** *** 489,493 **** iteminfo.e.space = 0; iteminfo.e.post = numpost; ! (void) strncpy(logicalblk.chrblk + lastinblk, thisterm, len); amtused += numwilluse; logicalblk.invblk[(lastinblk/sizeof(long))+wdlen] = nextpost; --- 490,494 ---- iteminfo.e.space = 0; iteminfo.e.post = numpost; ! strncpy(logicalblk.chrblk + lastinblk, thisterm, len); amtused += numwilluse; logicalblk.invblk[(lastinblk/sizeof(long))+wdlen] = nextpost; *************** *** 554,562 **** openedinvname: if (fread(&invcntl->param, sizeof(invcntl->param), 1, invcntl->invfile) == 0) { ! (void) fprintf(stderr, "%s: empty inverted file\n", argv0); goto closeinv; } if (invcntl->param.version != FMTVERSION) { ! (void) fprintf(stderr, "%s: cannot read old index format; use -U option to force database to rebuild\n", argv0); goto closeinv; } --- 555,563 ---- openedinvname: if (fread(&invcntl->param, sizeof(invcntl->param), 1, invcntl->invfile) == 0) { ! fprintf(stderr, "%s: empty inverted file\n", argv0); goto closeinv; } if (invcntl->param.version != FMTVERSION) { ! fprintf(stderr, "%s: cannot read old index format; use -U option to force database to rebuild\n", argv0); goto closeinv; } *************** *** 564,568 **** if (stat == 0 && invcntl->param.filestat == INVALONE) { ! (void) fprintf(stderr, "%s: inverted file is locked\n", argv0); goto closeinv; } --- 565,569 ---- if (stat == 0 && invcntl->param.filestat == INVALONE) { ! fprintf(stderr, "%s: inverted file is locked\n", argv0); goto closeinv; } *************** *** 611,615 **** invcntl->iindex = shmat(shm_id, 0, ((read_index) ? 0 : SHM_RDONLY)); if (invcntl->iindex == (char *)ERR) { ! (void) fprintf(stderr, "%s: shared memory link failed\n", argv0); invcntl->iindex = NULL; read_index = 1; --- 612,616 ---- invcntl->iindex = shmat(shm_id, 0, ((read_index) ? 0 : SHM_RDONLY)); if (invcntl->iindex == (char *)ERR) { ! fprintf(stderr, "%s: shared memory link failed\n", argv0); invcntl->iindex = NULL; read_index = 1; *************** *** 628,640 **** } if (read_index) { ! (void) fseek(invcntl->invfile, invcntl->param.startbyte, 0); ! (void) fread(invcntl->iindex, (int) invcntl->param.supsize, 1, invcntl->invfile); } invcntl->numblk = -1; if (boolready() == -1) { closeboth: ! (void) fclose(invcntl->postfile); closeinv: ! (void) fclose(invcntl->invfile); return(-1); } --- 629,642 ---- } if (read_index) { ! fseek(invcntl->invfile, invcntl->param.startbyte, SEEK_SET); ! fread(invcntl->iindex, (int) invcntl->param.supsize, 1, ! invcntl->invfile); } invcntl->numblk = -1; if (boolready() == -1) { closeboth: ! fclose(invcntl->postfile); closeinv: ! fclose(invcntl->invfile); return(-1); } *************** *** 643,647 **** if (stat > invcntl->param.filestat ) { rewind(invcntl->invfile); ! (void) fwrite(&invcntl->param, sizeof(invcntl->param), 1, invcntl->invfile); } return(1); --- 645,649 ---- if (stat > invcntl->param.filestat ) { rewind(invcntl->invfile); ! fwrite(&invcntl->param, sizeof(invcntl->param), 1, invcntl->invfile); } return(1); *************** *** 656,670 **** invcntl->param.filestat = 0; rewind(invcntl->invfile); ! (void) fwrite(&invcntl->param, 1, sizeof(invcntl->param), invcntl->invfile); } if (invcntl->param.filestat == INVALONE) { /* write out the super finger */ ! (void) fseek(invcntl->invfile, invcntl->param.startbyte, 0); ! (void) fwrite(invcntl->iindex, 1, ! (int) invcntl->param.supsize, invcntl->invfile); } ! (void) fclose(invcntl->invfile); ! (void) fclose(invcntl->postfile); #if SHARE if (invcntl->param.share > 0) { --- 658,672 ---- invcntl->param.filestat = 0; rewind(invcntl->invfile); ! fwrite(&invcntl->param, 1, sizeof(invcntl->param), invcntl->invfile); } if (invcntl->param.filestat == INVALONE) { /* write out the super finger */ ! fseek(invcntl->invfile, invcntl->param.startbyte, SEEK_SET); ! fwrite(invcntl->iindex, 1, ! (int) invcntl->param.supsize, invcntl->invfile); } ! fclose(invcntl->invfile); ! fclose(invcntl->postfile); #if SHARE if (invcntl->param.share > 0) { *************** *** 691,696 **** /* now read in the block */ ! (void) fseek(invcntl->invfile, invcntl->numblk * invcntl->param.sizeblk + invcntl->param.cntlsize, 0); ! (void) fread(invcntl->logblk, (int) invcntl->param.sizeblk, 1, invcntl->invfile); invcntl->keypnt = 0; } --- 693,701 ---- /* now read in the block */ ! fseek(invcntl->invfile, ! invcntl->numblk*invcntl->param.sizeblk + invcntl->param.cntlsize, ! SEEK_SET); ! fread(invcntl->logblk, (int) invcntl->param.sizeblk, 1, ! invcntl->invfile); invcntl->keypnt = 0; } *************** *** 720,724 **** /* FIXME HBB: magic number alert! (3) */ entryptr = (ENTRY *)(invcntl->logblk->invblk + 3) + invcntl->keypnt; ! (void) strncpy(term, invcntl->logblk->chrblk + entryptr->offset, (int) entryptr->size); *(term + entryptr->size) = '\0'; --- 725,729 ---- /* FIXME HBB: magic number alert! (3) */ entryptr = (ENTRY *)(invcntl->logblk->invblk + 3) + invcntl->keypnt; ! strncpy(term, invcntl->logblk->chrblk + entryptr->offset, (int) entryptr->size); *(term + entryptr->size) = '\0'; *************** *** 764,770 **** /* note always fetch it if the file is busy */ if ((imid != invcntl->numblk) || (invcntl->param.filestat >= INVBUSY)) { ! (void) fseek(invcntl->invfile, (imid * invcntl->param.sizeblk) + invcntl->param.cntlsize, 0); invcntl->numblk = imid; ! (void) fread(invcntl->logblk, (int)invcntl->param.sizeblk, 1, invcntl->invfile); } --- 769,778 ---- /* note always fetch it if the file is busy */ if ((imid != invcntl->numblk) || (invcntl->param.filestat >= INVBUSY)) { ! fseek(invcntl->invfile, ! (imid*invcntl->param.sizeblk) + invcntl->param.cntlsize, ! SEEK_SET); invcntl->numblk = imid; ! fread(invcntl->logblk, (int)invcntl->param.sizeblk, 1, ! invcntl->invfile); } *************** *** 820,827 **** longptr = (long *)invcntl->iindex; n = *longptr++; ! (void) printf("Superindex dump, num blocks=%ld\n", n); longptr += j; while ((longptr <= ((long *)invcntl->iindex) + n) && invbreak == 0) { ! (void) printf("%2ld %6ld %s\n", j++, *longptr, invcntl->iindex + *longptr); longptr++; } --- 828,835 ---- longptr = (long *)invcntl->iindex; n = *longptr++; ! printf("Superindex dump, num blocks=%ld\n", n); longptr += j; while ((longptr <= ((long *)invcntl->iindex) + n) && invbreak == 0) { ! printf("%2ld %6ld %s\n", j++, *longptr, invcntl->iindex + *longptr); longptr++; } *************** *** 831,852 **** /* fetch the appropriate logical block */ invcntl->numblk = j; ! (void) fseek(invcntl->invfile, (j * invcntl->param.sizeblk) + invcntl->param.cntlsize, 0); ! (void) fread(invcntl->logblk, (int) invcntl->param.sizeblk, 1, invcntl->invfile); } else i = abs((int) invfind(invcntl, term)); longptr = invcntl->logblk->invblk; n = *longptr++; ! (void) printf("Entry term to invdump=%s, postings=%ld, forwrd ptr=%ld, back ptr=%ld\n" , term, i, *(longptr), *(longptr + 1)); /* FIXME HBB: magic number alert! (3) */ entryptr = (ENTRY *) (invcntl->logblk->invblk + 3); ! (void) printf("%ld terms in this block, block=%ld\n", n, invcntl->numblk); ! (void) printf("\tterm\t\t\tposts\tsize\toffset\tspace\t1st word\n"); for (j = 0; j < n && invbreak == 0; j++) { ptr = invcntl->logblk->chrblk + entryptr->offset; ! (void) strncpy(temp, ptr, (int) entryptr->size); temp[entryptr->size] = '\0'; ptr += (sizeof(long) * (long)((entryptr->size + (sizeof(long) - 1)) / sizeof(long))); ! (void) printf("%2ld %-24s\t%5ld\t%3d\t%d\t%d\t%ld\n", j, temp, entryptr->post, entryptr->size, entryptr->offset, entryptr->space, *(long *)ptr); --- 839,863 ---- /* fetch the appropriate logical block */ invcntl->numblk = j; ! fseek(invcntl->invfile, ! (j * invcntl->param.sizeblk) + invcntl->param.cntlsize, ! SEEK_SET); ! fread(invcntl->logblk, (int) invcntl->param.sizeblk, 1, ! invcntl->invfile); } else i = abs((int) invfind(invcntl, term)); longptr = invcntl->logblk->invblk; n = *longptr++; ! printf("Entry term to invdump=%s, postings=%ld, forwrd ptr=%ld, back ptr=%ld\n" , term, i, *(longptr), *(longptr + 1)); /* FIXME HBB: magic number alert! (3) */ entryptr = (ENTRY *) (invcntl->logblk->invblk + 3); ! printf("%ld terms in this block, block=%ld\n", n, invcntl->numblk); ! printf("\tterm\t\t\tposts\tsize\toffset\tspace\t1st word\n"); for (j = 0; j < n && invbreak == 0; j++) { ptr = invcntl->logblk->chrblk + entryptr->offset; ! strncpy(temp, ptr, (int) entryptr->size); temp[entryptr->size] = '\0'; ptr += (sizeof(long) * (long)((entryptr->size + (sizeof(long) - 1)) / sizeof(long))); ! printf("%2ld %-24s\t%5ld\t%3d\t%d\t%d\t%ld\n", j, temp, entryptr->post, entryptr->size, entryptr->offset, entryptr->space, *(long *)ptr); *************** *** 944,948 **** cannotalloc: invcannotalloc(u * sizeof(POSTING)); ! (void) boolready(); *num = -1; return(NULL); --- 955,959 ---- cannotalloc: invcannotalloc(u * sizeof(POSTING)); ! boolready(); *num = -1; return(NULL); *************** *** 956,961 **** } file = invcntl->postfile; ! (void) fseek(file, (long) *ptr2, 0); ! (void) fread(&posting, (int) sizeof(posting), 1, file); newsetc = 0; switch (boolarg) { --- 967,972 ---- } file = invcntl->postfile; ! fseek(file, *ptr2, SEEK_SET); ! fread(&posting, sizeof(posting), 1, file); newsetc = 0; switch (boolarg) { *************** *** 972,976 **** else if (set1p->lineoffset > posting.lineoffset) { *newsetp++ = posting; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 983,987 ---- else if (set1p->lineoffset > posting.lineoffset) { *newsetp++ = posting; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 981,985 **** else if (set1p->type > posting.type) { *newsetp++ = posting; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 992,996 ---- else if (set1p->type > posting.type) { *newsetp++ = posting; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 987,991 **** *newsetp++ = *set1p++; set1c++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 998,1002 ---- *newsetp++ = *set1p++; set1c++; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1001,1005 **** *newsetp++ = posting; newsetc++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); } } --- 1012,1016 ---- *newsetp++ = posting; newsetc++; ! fread(&posting, (int) sizeof(posting), 1, file); } } *************** *** 1014,1018 **** } else if (set1p->lineoffset > posting.lineoffset) { ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1025,1029 ---- } else if (set1p->lineoffset > posting.lineoffset) { ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1022,1026 **** } else if (set1p->type > posting.type) { ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1033,1037 ---- } else if (set1p->type > posting.type) { ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1029,1033 **** newsetc++; set1c++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1040,1044 ---- newsetc++; set1c++; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1043,1047 **** } else if (set1p->lineoffset > posting.lineoffset) { ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1054,1058 ---- } else if (set1p->lineoffset > posting.lineoffset) { ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1052,1056 **** } else if (set1p->type > posting.type) { ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1063,1067 ---- } else if (set1p->type > posting.type) { ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1058,1062 **** set1c++; set1p++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1069,1073 ---- set1c++; set1p++; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1076,1080 **** else if (set1p->lineoffset > posting.lineoffset) { *newsetp++ = posting; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1087,1091 ---- else if (set1p->lineoffset > posting.lineoffset) { *newsetp++ = posting; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1085,1089 **** else if (set1p->type > posting.type) { *newsetp++ = posting; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1096,1100 ---- else if (set1p->type > posting.type) { *newsetp++ = posting; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1091,1095 **** set1c++; set1p++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); set2c++; } --- 1102,1106 ---- set1c++; set1p++; ! fread(&posting, (int) sizeof(posting), 1, file); set2c++; } *************** *** 1098,1102 **** *newsetp++ = posting; newsetc++; ! (void) fread(&posting, (int) sizeof(posting), 1, file); } item = newitem; --- 1109,1113 ---- *newsetp++ = posting; newsetc++; ! fread(&posting, (int) sizeof(posting), 1, file); } item = newitem; *************** *** 1123,1127 **** return(NULL); } ! /* if clear then give them what we have and use (void) boolready to realloc */ if (clear) { ptr = item; --- 1134,1138 ---- return(NULL); } ! /* if clear then give them what we have and use boolready to realloc */ if (clear) { ptr = item; *************** *** 1131,1135 **** else item2 = NULL; ! (void) boolready(); return(ptr); } --- 1142,1146 ---- else item2 = NULL; ! boolready(); return(ptr); } *************** *** 1151,1155 **** invcannotalloc(unsigned n) { ! (void) fprintf(stderr, "%s: cannot allocate %u bytes\n", argv0, n); } --- 1162,1166 ---- invcannotalloc(unsigned n) { ! fprintf(stderr, "%s: cannot allocate %u bytes\n", argv0, n); } *************** *** 1157,1161 **** invcannotopen(char *file) { ! (void) fprintf(stderr, "%s: cannot open file %s\n", argv0, file); } --- 1168,1172 ---- invcannotopen(char *file) { ! fprintf(stderr, "%s: cannot open file %s\n", argv0, file); } *************** *** 1164,1167 **** { perror(argv0); /* must be first to preserve errno */ ! (void) fprintf(stderr, "%s: write to file %s failed\n", argv0, file); } --- 1175,1178 ---- { perror(argv0); /* must be first to preserve errno */ ! fprintf(stderr, "%s: write to file %s failed\n", argv0, file); } |