Changeset 404
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/avv.c
r347 r404 18 18 26 Jun 06 SHL rewrite_archiverbb2: include user comments 19 19 14 Jul 06 SHL Use Runtime_Error 20 29 Jul 06 SHL Use xfgets 20 21 21 22 ***********************************************************************/ … … 240 241 needReload = TRUE; 241 242 while (input_line_num < arcsigs_header_lines) { 242 psz = fgets(sz, sizeof(sz), fpOld);243 psz = xfgets(sz, sizeof(sz), fpOld, pszSrcFile, __LINE__); 243 244 if (!psz) 244 245 break; … … 265 266 } 266 267 while (input_line_num + 1 < pat -> defn_line_num) { 267 psz = fgets(sz, sizeof(sz), fpOld);268 psz = xfgets(sz, sizeof(sz), fpOld, pszSrcFile, __LINE__); 268 269 if (!psz) 269 270 break; // Unexpected EOF … … 341 342 if (fpOld && arcsigs_trailer_line_num) { 342 343 for (;;) { 343 psz = fgets(sz, sizeof(sz), fpOld);344 psz = xfgets(sz, sizeof(sz), fpOld, pszSrcFile, __LINE__); 344 345 if (!psz) 345 346 break; … … 590 591 else { 591 592 while(!feof(fp)) { 592 if(!fgets(s,sizeof(s),fp)) break; 593 if (!xfgets(s, sizeof(s), fp, pszSrcFile, __LINE__)) 594 break; 593 595 stripcr(s); 594 596 WinSendDlgItemMsg(hwnd, -
trunk/dll/init.c
r339 r404 18 18 13 Jul 06 SHL Use Runtime_Error 19 19 13 Jul 06 SHL Sync with current style 20 29 Jul 06 SHL Use xfgets 20 21 21 22 ***********************************************************************/ … … 109 110 } 110 111 *filename = (CHAR)nm + '@'; 111 fp = xfsopen(filename, "r", SH_DENYNO, pszSrcFile,__LINE__);112 fp = xfsopen(filename, "r", SH_DENYNO, pszSrcFile, __LINE__); 112 113 if (fp) 113 114 { 114 while (!feof(fp)) 115 { 116 if (!fgets(input, 8192, fp)) 115 while (!feof(fp)) { 116 if (!xfgets(input, sizeof(input), fp,pszSrcFile, __LINE__)) 117 117 break; 118 input[8191] = 0;119 118 lstrip(input); 120 119 if (!strnicmp(input, "SWAPPATH", 8)) -
trunk/dll/killproc.c
r350 r404 11 11 24 May 05 SHL Rework Win_Error usage 12 12 14 Jul 06 SHL Use Runtime_Error 13 29 Jul 06 SHL Use xfgets 13 14 14 15 ***********************************************************************/ … … 188 189 } 189 190 fp = fopen(s,"r"); 190 if (fp) {191 while (!feof(fp)) {191 if (fp) { 192 while (!feof(fp)) { 192 193 strset(s,0); 193 if (!fgets(s,1025,fp))194 if (!xfgets(s,1025,fp,pszSrcFile,__LINE__)) 194 195 break; 195 if (!foundstart) {196 if (*s == ' ' && strstr(s,startstring))196 if (!foundstart) { 197 if (*s == ' ' && strstr(s,startstring)) 197 198 foundstart = TRUE; 198 199 } -
trunk/dll/remap.c
r353 r404 10 10 06 Aug 05 SHL Renames 11 11 22 Jul 06 SHL Check more run time errors 12 29 Jul 06 SHL Use xfgets 12 13 13 14 ***********************************************************************/ … … 15 16 #define INCL_WIN 16 17 #define INCL_DOS 17 18 18 #include <os2.h> 19 19 20 #include <stdlib.h> 20 21 #include <stdio.h> … … 23 24 #include <time.h> 24 25 #include <share.h> 26 25 27 #include "fm3dll.h" 26 28 #include "fm3dlg.h" … … 71 73 fp = xfsopen(s,"r",SH_DENYWR,pszSrcFile,__LINE__); 72 74 if (fp) { 73 while (x < MAXNUMRES && !feof(fp)) {74 if (!fgets(s,sizeof(s),fp))75 while (x < MAXNUMRES && !feof(fp)) { 76 if (!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 75 77 break; 76 s[sizeof(s) - 1] = 0; 77 bstripcr(s); 78 if(*s && *s != ';') { 78 if (*s && *s != ';') { 79 79 info = xmalloc(sizeof(LINKRES),pszSrcFile,__LINE__); 80 80 if (info) { -
trunk/dll/saveclip.c
r352 r404 14 14 24 May 05 SHL Rework for CNRITEM.szSubject 15 15 17 Jul 06 SHL Use Runtime_Error 16 29 Jul 06 SHL Use xfgets 16 17 17 18 ***********************************************************************/ … … 270 271 fp = _fsopen(s,"r",SH_DENYWR); 271 272 if(fp) { 272 while(fgets(s,81,fp)) { 273 s[80] = 0; 273 while(xfgets(s,81,fp,pszSrcFile,__LINE__)) { 274 274 stripcr(s); 275 275 if(*s && *s != ';') … … 662 662 fp = _fsopen(s,"r",SH_DENYWR); 663 663 if(fp) { 664 while(fgets(s,81,fp)) { 665 s[80] = 0; 664 while (xfgets(s,81,fp,pszSrcFile,__LINE__)) { 666 665 stripcr(s); 667 if (*s && *s != ';')666 if (*s && *s != ';') 668 667 WinSendMsg(WinWindowFromID(hwnd,SAV_LISTBOX),LM_INSERTITEM, 669 668 MPFROM2SHORT(LIT_SORTASCENDING,0), -
trunk/dll/sysinfo.c
r375 r404 13 13 01 Aug 04 SHL RunRmview: avoid buffer overflow 14 14 26 Jul 06 SHL Report open errors 15 29 Jul 06 SHL Use xfgets 15 16 16 17 ***********************************************************************/ … … 73 74 fp = xfopen("$RMVIEW.#$#","r",pszSrcFile,__LINE__); 74 75 if (fp) { 75 fgets(s,2048,fp);76 fgets(s,2048,fp);76 xfgets(s,sizeof(s),fp,pszSrcFile,__LINE__); 77 xfgets(s,sizeof(s),fp,pszSrcFile,__LINE__); 77 78 if(!feof(fp) && WinIsWindow(thab,hwnd)) 78 79 WinSendDlgItemMsg(hwnd,SYS_LISTBOX,LM_INSERTITEM, … … 81 82 while(!feof(fp)) { 82 83 strset(s,0); 83 if(! fgets(s,2048,fp))84 if(!xfgets(s,sizeof(s),fp,pszSrcFile,__LINE__)) 84 85 break; 85 s[2047] = 0;86 86 stripcr(s); 87 87 rstrip(s); -
trunk/dll/uudecode.c
r382 r404 12 12 06 Jun 05 SHL Drop unused code 13 13 17 Jul 06 SHL Use Runtime_Error 14 29 Jul 06 SHL Use xfgets 14 15 15 16 ***********************************************************************/ … … 63 64 for (;;) 64 65 { 65 if (!fgets(buf, sizeof(buf), in)) 66 { 66 if (!xfgets(buf, sizeof(buf), in,pszSrcFile,__LINE__)) { 67 67 fclose(in); 68 68 saymsg(MB_CANCEL, … … 73 73 return ret; 74 74 } 75 buf[sizeof(buf) - 1] = 0;76 75 if (!strncmp(buf, "begin ", 6)) 77 76 break; … … 119 118 decode(in, out); 120 119 121 fgets(buf, sizeof(buf), in);120 xfgets(buf, sizeof(buf), in,pszSrcFile,__LINE__); 122 121 123 122 fclose(in); … … 138 137 { 139 138 /* for each input line */ 140 if (! fgets(buf, sizeof(buf), in))139 if (!xfgets(buf, sizeof(buf), in,pszSrcFile,__LINE__)) 141 140 return FALSE; 142 buf[sizeof(buf) - 1] = 0;143 141 n = DEC(buf[0]); 144 142 if (n <= 0) -
trunk/dll/walkem.c
r382 r404 12 12 13 Aug 05 SHL remove_udir - avoid corrupting last dirs list 13 13 17 Jul 06 SHL Use Runtime_Error 14 29 Jul 06 SHL Use xfgets 14 15 15 16 ***********************************************************************/ … … 155 156 while (!feof(fp)) 156 157 { 157 if (! fgets(s, CCHMAXPATH + 24, fp))158 if (!xfgets(s, CCHMAXPATH + 24, fp,pszSrcFile,__LINE__)) 158 159 break; 159 160 s[CCHMAXPATH] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.