Changeset 406
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r377 r406 26 26 14 Jul 06 SHL Use Runtime_Error 27 27 26 Jul 06 SHL Correct SelectAll usage 28 29 Jul 06 SHL Use xfgets_bstripcr 28 29 29 30 ***********************************************************************/ … … 431 432 432 433 while(!feof(fp) && !gotend) { 433 if(! fgets(s,CCHMAXPATH * 2,fp))434 if(!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 434 435 break; 435 s[(CCHMAXPATH * 2) - 1] = 0;436 stripcr(s);437 436 if(!gotstart) { 438 437 if (!strcmp(s,info->startlist)) … … 450 449 lonename[CCHMAXPATH + 1] = 0; 451 450 fname = lonename; 452 if(! fgets(s,CCHMAXPATH * 2,fp))451 if(!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 453 452 break; 454 s[(CCHMAXPATH * 2) - 1] = 0;455 bstripcr(s);456 453 if(*fname == '\"') { 457 454 memmove(fname,fname + 1,strlen(fname) + 1); … … 534 531 } 535 532 } 536 if (info->nameisnext) {537 if (!fgets(lonename,CCHMAXPATH + 2,fp))533 if (info->nameisnext) { 534 if (!xfgets_bstripcr(lonename,sizeof(lonename),fp,pszSrcFile,__LINE__)) 538 535 break; 539 lonename[CCHMAXPATH + 1] = 0;540 bstripcr(lonename);541 536 fname = lonename; 542 537 } 543 if (fname && *fname) {538 if (fname && *fname) { 544 539 545 540 RECORDINSERT ri; -
trunk/dll/cmdline.c
r345 r406 12 12 05 Jun 05 SHL Use QWL_USER 13 13 22 Jul 06 SHL Check more run time errors 14 29 Jul 06 SHL Use xfgets_bstripcr 14 15 15 16 ***********************************************************************/ … … 67 68 if (fp) { 68 69 while (x < MAXNUMCLS && !feof(fp)) { 69 if (! fgets(s,sizeof(s),fp))70 if (!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 70 71 break; 71 s[sizeof(s) - 1] = 0;72 bstripcr(s);73 72 if (*s && *s != ';') { 74 73 info = xmalloc(sizeof(LINKCLS), pszSrcFile, __LINE__); -
trunk/dll/command.c
r347 r406 12 12 06 Jun 05 SHL Drop unused code 13 13 14 Jul 06 SHL Use Runtime_Error 14 29 Jul 06 SHL Use xfgets_bstripcr 14 15 15 16 ***********************************************************************/ … … 334 335 fp = _fsopen(cl,"r",SH_DENYWR); 335 336 if(fp) { 336 while (!feof(fp)) {337 if (!fgets(title,100,fp))337 while (!feof(fp)) { 338 if (!xfgets_bstripcr(title,sizeof(title),fp,pszSrcFile,__LINE__)) 338 339 break; 339 title[34] = 0; 340 title[34] = 0; // fixme to know why chopped this way? 340 341 bstripcr(title); 341 if (!*title || *title == ';')342 if (!*title || *title == ';') 342 343 continue; 343 if(!fgets(cl,1024,fp) || 344 !fgets(flags,72,fp)) 344 if (!xfgets(cl,sizeof(cl),fp,pszSrcFile,__LINE__)) 345 345 break; /* error! */ 346 cl[1000] = 0; 346 if (!xfgets(flags,72,fp,pszSrcFile,__LINE__)) 347 break; /* error! */ 348 cl[1000] = 0; // fixme to know why chopped this way? 349 bstripcr(cl); 347 350 flags[34] = 0; 348 bstripcr(cl);349 351 bstripcr(flags); 350 352 if(!*cl) 351 353 continue; 352 354 info = xmallocz(sizeof(LINKCMDS),pszSrcFile,__LINE__); 353 if (info) {355 if (info) { 354 356 info->cl = xstrdup(cl,pszSrcFile,__LINE__); 355 357 info->title = xstrdup(title,pszSrcFile,__LINE__); -
trunk/dll/comp.c
r378 r406 19 19 13 Jul 06 SHL Use Runtime_Error 20 20 26 Jul 06 SHL Drop unreachable CN_... code 21 29 Jul 06 SHL Use xfgets_bstripcr 21 22 22 23 ***********************************************************************/ … … 827 828 Runtime_Error(pszSrcFile, __LINE__, "can not open %s (%d)", cmp->rightlist, errno); 828 829 else { 829 while (!feof(fp)) {830 while (!feof(fp)) { 830 831 /* first get name of directory */ 831 if (!fgets(str,sizeof(str) - 1,fp))832 if (!xfgets_bstripcr(str,sizeof(str),fp,pszSrcFile,__LINE__)) 832 833 break; // EOF 833 str[sizeof(str) - 1] = 0;834 bstrip(str);835 834 p = str; 836 835 if(*p == '\"') { … … 869 868 lenr = strlen(cmp->rightdir) + 870 869 (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\'); 871 while (!feof(fp)) {872 if (!fgets(str,sizeof(str) - 1,fp))870 while (!feof(fp)) { 871 if (!xfgets_bstripcr(str,sizeof(str),fp,pszSrcFile,__LINE__)) 873 872 break; 874 str[sizeof(str) - 1] = 0;875 bstrip(str);876 873 p = str; 877 874 if(*p == '\"') { -
trunk/dll/filter.c
r377 r406 9 9 01 Aug 04 SHL Rework lstrip/rstrip usage 10 10 22 Jul 06 SHL Check more run time errors 11 29 Jul 06 SHL Use xfgets_bstripcr 11 12 12 13 ***********************************************************************/ … … 128 129 fp = _fsopen(s,"r",SH_DENYWR); 129 130 if(fp) { 130 while (!feof(fp)) {131 if (!fgets(s,sizeof(s),fp))131 while (!feof(fp)) { 132 if (!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 132 133 break; 133 s[sizeof(s) - 1] = 0;134 bstripcr(s);135 134 if(*s && *s != ';') { 136 135 info = xmalloc(sizeof(LINKMASKS),pszSrcFile,__LINE__); -
trunk/dll/menu.c
r356 r406 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 12 22 Jul 06 SHL Check more run time errors 13 29 Jul 06 SHL Use xfgets_bstripcr 13 14 14 15 ***********************************************************************/ … … 99 100 else { 100 101 while (!feof(fp)) { 101 if (! fgets(s,256,fp))102 if (!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 102 103 break; 103 104 lines++; 104 bstripcr(s);105 105 if(!*s || *s == ';') 106 106 continue; -
trunk/dll/misc.c
r397 r406 4 4 $Id$ 5 5 6 Misc support functions6 Misc GUI support functions 7 7 8 8 Copyright (c) 1993-98 M. Kimes … … 18 18 26 Jul 06 SHL Use chop_at_crnl 19 19 27 Jul 06 SHL Comments, apply indent 20 29 Jul 06 SHL Use xfgets_bstripcr 20 21 21 22 ***********************************************************************/ … … 1816 1817 if (fp) { 1817 1818 while (!feof(fp)) { 1818 if (! fgets(var, 8192, fp))1819 if (!xfgets_bstripcr(var, sizeof(var), fp,pszSrcFile,__LINE__)) 1819 1820 break; 1820 var[8191] = 0;1821 bstripcr(var);1822 1821 if (!strnicmp(var, "LIBPATH=", 8)) { 1823 1822 memmove(var, var + 8, strlen(var + 8) + 1); -
trunk/dll/select.c
r362 r406 14 14 06 Jul 06 SHL Support compare content (IDM_SELECTSAMECONTENT) 15 15 13 Jul 06 SHL Use Runtime_Error 16 29 Jul 06 SHL Use xfgets_bstripcr 16 17 17 18 ***********************************************************************/ … … 107 108 if (fp) { 108 109 while (!feof(fp)) { 109 if (! fgets(input,1024,fp))110 if (!xfgets_bstripcr(input,sizeof(input),fp,pszSrcFile,__LINE__)) 110 111 break; 111 input[1023] = 0;112 bstripcr(input);113 112 if (*input == '\"') { 114 113 memmove(input,input + 1,strlen(input) + 1); -
trunk/dll/undel.c
r382 r406 10 10 24 May 05 SHL Rework Win_Error usage 11 11 17 Jul 06 SHL Use Runtime_Error 12 29 Jul 06 SHL Use xfgets_bstripcr 12 13 13 14 ***********************************************************************/ … … 99 100 fp = xfopen("$UDELETE.#$#","r",pszSrcFile,__LINE__); 100 101 if (fp) { 101 fgets(s,CCHMAXPATH + 128,fp);102 while (!feof(fp)) {102 xfgets(s,sizeof(s),fp,pszSrcFile,__LINE__); // Skip 1st line 103 while (!feof(fp)) { 103 104 strset(s,0); 104 if(!fgets(s,CCHMAXPATH + 2,fp)) 105 break; 106 bstripcr(s); 105 if (!xfgets_bstripcr(s,CCHMAXPATH + 2,fp,pszSrcFile,__LINE__)) 106 break; 107 107 if(*s) { 108 108 if(!strnicmp(s,"SYS3194: ",9)) { … … 111 111 112 112 strcat(s," "); 113 fgets(&s[strlen(s)],(CCHMAXPATH + 128) - strlen(s),fp);113 xfgets(&s[strlen(s)],CCHMAXPATH + 128 - strlen(s),fp,pszSrcFile,__LINE__); 114 114 fclose(fp); 115 115 s[CCHMAXPATH + 128] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
