Changeset 328 for trunk/dll/uudecode.c
- Timestamp:
- Jul 25, 2006, 8:37:24 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/uudecode.c
r204 r328 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005 Steven H. Levine9 Copyright (c) 2005, 2006 Steven H. Levine 10 10 11 11 06 Jun 05 SHL Indent -i2 12 12 06 Jun 05 SHL Drop unused code 13 17 Jul 06 SHL Use Runtime_Error 13 14 14 15 ***********************************************************************/ … … 16 17 #define INCL_DOS 17 18 #define INCL_WIN 18 19 19 #include <os2.h> 20 20 21 #include <stdlib.h> 21 22 #include <stdio.h> 22 23 #include <string.h> 23 24 #include <share.h> 25 24 26 #include "fm3dll.h" 25 27 #include "fm3dlg.h" 26 28 #include "fm3str.h" 29 30 static PSZ pszSrcFile = __FILE__; 27 31 28 32 /* prototypes */ … … 395 399 MPVOID, 396 400 MPVOID); 397 for (y = 0; y < x; y++) 398 { 401 for (y = 0; y < x; y++) { 399 402 *szBuffer = 0; 400 403 WinSendDlgItemMsg(hwnd, … … 403 406 MPFROM2SHORT(y, CCHMAXPATH), 404 407 MPFROMP(szBuffer)); 405 if (*szBuffer) 406 { 408 if (*szBuffer) { 407 409 error = AddToList(szBuffer, 408 410 &list, 409 411 &numfiles, 410 412 &numalloc); 411 if (error) 412 { 413 DosBeep(250, 100); 413 if (error) { 414 Runtime_Error(pszSrcFile, __LINE__, "AddToList"); 414 415 break; 415 416 } … … 418 419 if (numfiles && list && numfiles + 1 < numalloc) 419 420 { 420 test = realloc(list, sizeof(CHAR *) * (numfiles + 1));421 test = xrealloc(list, sizeof(CHAR *) * (numfiles + 1),pszSrcFile,__LINE__); 421 422 if (test) 422 423 list = test; 423 424 } 424 if (list && list[0]) 425 { 425 if (!list || !list[0]) { 426 Runtime_Error(pszSrcFile, __LINE__, "no data"); 427 break; 428 } 429 else { 426 430 FreeList(wk -> li -> list); 427 431 wk -> li -> list = list; 428 432 } 429 else430 {431 DosBeep(50, 100);432 break;433 }434 433 } 435 434 WinDismissDlg(hwnd, 1); 436 435 break; 437 } 436 } // switch WM_COMMAND mp1 438 437 return 0; 439 } 438 } // switch msg 440 439 return WinDefDlgProc(hwnd, msg, mp1, mp2); 441 440 }
Note:
See TracChangeset
for help on using the changeset viewer.