Changeset 340
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filter.c
r123 r340 5 5 6 6 Copyright (c) 1993-98 M. Kimes 7 Copyright (c) 2004 Steven H.Levine 8 9 Revisions 01 Aug 04 SHL - Rework lstrip/rstrip usage 7 Copyright (c) 2004, 2006 Steven H.Levine 8 9 01 Aug 04 SHL Rework lstrip/rstrip usage 10 22 Jul 06 SHL Check more run time errors 10 11 11 12 ***********************************************************************/ … … 13 14 #define INCL_WIN 14 15 #define INCL_DOS 15 16 16 #include <os2.h> 17 17 18 #include <stdio.h> 18 19 #include <stdlib.h> 19 20 #include <string.h> 20 21 #include <share.h> 22 21 23 #include "fm3dll.h" 22 24 #include "fm3dlg.h" … … 24 26 25 27 #pragma data_seg(FILTER_DATA) 28 29 static PSZ pszSrcFile = __FILE__; 30 26 31 #pragma alloc_text(FILTER,Filter) 27 32 … … 129 134 bstripcr(s); 130 135 if(*s && *s != ';') { 131 info = malloc(sizeof(LINKMASKS));136 info = xmalloc(sizeof(LINKMASKS),pszSrcFile,__LINE__); 132 137 if(info) { 133 info->mask = strdup(s);138 info->mask = xstrdup(s,pszSrcFile,__LINE__); 134 139 if(info->mask) { 135 140 info->next = NULL; … … 165 170 strcat(s,"\\"); 166 171 strcat(s,"FILTERS.DAT"); 167 fp = fopen(s,"w");168 if (fp) {172 fp = xfopen(s,"w",pszSrcFile,__LINE__); 173 if (fp) { 169 174 fputs(GetPString(IDS_FILTERFILETEXT),fp); 170 175 info = maskhead; … … 197 202 info = info->next; 198 203 } 199 info = malloc(sizeof(LINKMASKS));204 info = xmalloc(sizeof(LINKMASKS),pszSrcFile,__LINE__); 200 205 if(info) { 201 info->mask = strdup(mask);206 info->mask = xstrdup(mask,pszSrcFile,__LINE__); 202 207 if(info->mask) { 203 208 info->next = NULL; … … 634 639 } 635 640 else 636 DosBeep(50,100); 641 DosBeep(50,100); // MSK_DELETE 637 642 } 638 643 } -
trunk/dll/flesh.c
r284 r340 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 200 5Steven H. Levine9 Copyright (c) 2006 Steven H. Levine 10 10 11 11 24 May 05 SHL Rework Win_Error usage … … 13 13 28 May 05 SHL Clean while reading code 14 14 24 Oct 05 SHL Delete obsolete code 15 22 Jul 06 SHL Check more run time errors 15 16 16 17 ***********************************************************************/ … … 19 20 #define INCL_DOSERRORS 20 21 #define INCL_WIN 21 22 22 #include <os2.h> 23 23 24 #include <stdarg.h> 24 25 #include <stdio.h> … … 31 32 32 33 #pragma data_seg(DATA1) 34 35 static PSZ pszSrcFile = __FILE__; 36 33 37 #pragma alloc_text(FLESH,Flesh,FleshEnv,Unflesh,Stubby) 34 38 … … 60 64 path[strlen(path) - 1] = 0; 61 65 if(!stricmp(path,"LIBPATH")) { 62 var = malloc(65536);66 var = xmalloc(65536,pszSrcFile,__LINE__); 63 67 if(var) 64 68 LoadLibPath(var,65536); … … 176 180 BOOL includefiles = fFilesInTree; 177 181 178 if (!pciParent || (INT)pciParent == -1 || !hwndCnr)182 if (!pciParent || (INT)pciParent == -1 || !hwndCnr) 179 183 return FALSE; 180 184 pciL = (PCNRITEM)WinSendMsg(hwndCnr, … … 466 470 MPFROMLONG(EXTRA_RECORD_BYTES2), 467 471 MPFROMLONG(1L)); 468 if(pci) { 469 472 if(!pci) { 473 Win_Error(hwndCnr,HWND_DESKTOP,__FILE__,__LINE__, 474 GetPString(IDS_RECORDALLOCFAILEDTEXT)); 475 } 476 else { 470 477 RECORDINSERT ri; 471 478 … … 486 493 DosSleep(100L); 487 494 WinSetFocus(HWND_DESKTOP,hwndCnr); 488 if(WinIsWindow((HAB)0,hwndCnr)) { 489 if(WinSendMsg(hwndCnr, 490 CM_INSERTRECORD, 491 MPFROMP(pci), 492 MPFROMP(&ri))) 493 ret = TRUE; 494 else { 495 if (WinIsWindow((HAB)0,hwndCnr)) { 496 if (!WinSendMsg(hwndCnr, 497 CM_INSERTRECORD, 498 MPFROMP(pci), 499 MPFROMP(&ri))) { 495 500 Win_Error(hwndCnr,HWND_DESKTOP,__FILE__,__LINE__, 496 501 GetPString(IDS_RECORDINSERTFAILEDTEXT)); … … 499 504 MPFROMP(&pci), 500 505 MPFROMSHORT(1)); 501 } 506 } 507 else 508 ret = TRUE; 502 509 } 503 510 } … … 505 512 ret = TRUE; 506 513 } 507 else508 Win_Error(hwndCnr,HWND_DESKTOP,__FILE__,__LINE__,509 GetPString(IDS_RECORDALLOCFAILEDTEXT));510 514 } 511 515 else if(toupper(*str) > 'B' && str[1] == ':' && str[2] == '\\' &&
Note:
See TracChangeset
for help on using the changeset viewer.