Changeset 1341 for trunk/av2.c
- Timestamp:
- Dec 14, 2008, 11:18:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/av2.c
r1238 r1341 12 12 23 Sep 07 SHL Get rid of statics 13 13 17 Sep 08 JBS Convert to use of wrapped DosFind... (i.e. xDosFind...) 14 14 Dec 08 SHL Add exception handler support 14 15 15 16 ***********************************************************************/ 16 17 17 #include <stdlib.h> 18 #include <stdlib.h> // getenv 18 19 #include <string.h> 19 20 … … 21 22 #define INCL_WIN 22 23 #define INCL_LONGLONG 24 #define INCL_DOSEXCEPTIONS // XCTP_... 25 #define INCL_DOSERRORS // NO_ERROR 23 26 24 27 #include "dll\fm3dll.h" 25 #include "dll\mainwnd.h" // Data declaration(s) 26 #include "dll\init.h" // Data declaration(s) 27 #include "dll\notebook.h" // Data declaration(s) 28 #include "dll\mainwnd.h" // hwndBubble 29 #include "dll\notebook.h" // appname hwndHelp 28 30 #include "dll\arccnrs.h" 29 31 #include "dll\fm3str.h" … … 35 37 #include "dll\dirs.h" // switch_to 36 38 #include "dll\viewer.h" // StartMLEEditor 37 #include "dll\getnames.h" 39 #include "dll\getnames.h" // insert_filename 38 40 #include "dll\copyf.h" // unlinkf 39 41 #include "dll\init.h" // InitFM3DLL 40 42 #include "dll\valid.h" // IsFile 41 43 #include "dll\wrappers.h" // xDosFind... 44 #include "dll\errutil.h" // Error reporting 45 #include "dll\excputil.h" // Exception handlers 46 47 static PSZ pszSrcFile = __FILE__; 42 48 43 49 HMTX av2Sem; … … 97 103 HMQ hmq; 98 104 QMSG qmsg; 99 HWND hwndFrame = (HWND) 0; 100 static CHAR fullname[CCHMAXPATH]; // 23 Sep 07 SHL fixme to not be static 101 CHAR *thisarg = NULL; 102 INT x; 103 104 *fullname = 0; 105 HWND hwndFrame = 0; 106 CHAR fullname[CCHMAXPATH] = { 0 }; // 14 Dec 08 SHL was static 107 PSZ thisarg = NULL; 108 UINT x; 109 APIRET regRet; 110 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL }; 111 105 112 strcpy(appname, "AV/2"); 106 113 fAmAV2 = TRUE; 107 114 DosError(FERR_DISABLEHARDERR); 115 116 regRec.ExceptionHandler = HandleException; 117 regRet = DosSetExceptionHandler(®Rec); 118 if (regRet != NO_ERROR) { 119 DbgMsg(pszSrcFile, __LINE__, 120 "DosSetExceptionHandler failed with error %u", regRet); 121 } 122 108 123 for (x = 1; x < argc; x++) { 109 124 if (!strchr("/;,`\'", *argv[x]) && … … 116 131 } 117 132 } 133 118 134 DosExitList(EXLST_ADD, deinit); 135 119 136 if (DosOpenMutexSem("\\SEM32\\AV2", &av2Sem)) 120 137 DosCreateMutexSem("\\SEM32\\AV2", &av2Sem, DC_SEM_SHARED, FALSE); 138 121 139 if (thisarg) { 122 140 if (DosQueryPathInfo(thisarg, … … 149 167 } 150 168 } 169 151 170 hab = WinInitialize(0); 152 171 if (hab) {
Note:
See TracChangeset
for help on using the changeset viewer.