Changeset 754 for trunk/eas.c
- Timestamp:
- Aug 3, 2007, 11:43:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eas.c
r620 r754 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2002 -2007 Steven H.Levine9 Copyright (c) 2002, 2007 Steven H.Levine 10 10 11 11 16 Oct 02 SHL Reformat … … 16 16 ***********************************************************************/ 17 17 18 #define INCL_DOS19 #define INCL_WIN20 21 #include <os2.h>22 18 #include <stdarg.h> 23 19 #include <stdio.h> … … 25 21 #include <string.h> 26 22 #include <ctype.h> 23 24 #define INCL_DOS 25 #define INCL_WIN 26 #include <os2.h> 27 27 28 #include "dll\fm3dll.h" 28 29 #include "dll\fm3dlg.h" 29 30 30 31 31 int main (int argc,char *argv[]) 32 32 { 33 34 HAB hab; 35 HMQ hmq; 36 static CHAR fullname[CCHMAXPATH]; 37 APIRET rc; 38 CHAR **list = NULL; 39 INT x,numfiles = 0,numalloc = 0; 33 HAB hab; 34 HMQ hmq; 35 CHAR fullname[CCHMAXPATH]; 36 CHAR **list = NULL; 37 INT x,numfiles = 0,numalloc = 0; 40 38 41 39 DosError(FERR_DISABLEHARDERR); 42 *fullname = 0; 43 for(x = 1;x < argc;x++) { 40 for(x = 1; x < argc; x++) { 44 41 if (!strchr("/;,`\'",*argv[x]) && IsFile(argv[x]) != -1) { 45 if (DosQueryPathInfo(argv[x],FIL_QUERYFULLNAME,fullname, 42 if (DosQueryPathInfo(argv[x], 43 FIL_QUERYFULLNAME,fullname, 46 44 sizeof(fullname))) 47 strcpy(fullname, argv[x]);45 strcpy(fullname, argv[x]); 48 46 AddToList(fullname,&list,&numfiles,&numalloc); 49 47 } … … 55 53 if (InitFM3DLL(hab,argc,argv)) { 56 54 if (!list) { 57 strcpy(fullname, "*");55 strcpy(fullname, "*"); 58 56 list = malloc(sizeof(CHAR *) * 2); 59 if (!list || !insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) || 60 !*fullname || *fullname == '*') 61 goto Abort; 62 list[0] = fullname; 63 list[1] = NULL; 57 if (list && 58 insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) && 59 *fullname && *fullname == '*') { 60 list[0] = fullname; 61 list[1] = NULL; 62 } 64 63 } 65 WinDlgBox(HWND_DESKTOP, 66 HWND_DESKTOP, 67 DisplayEAsProc, 68 FM3ModHandle, 69 EA_FRAME, 70 (PVOID)list); 64 if (list) { 65 WinDlgBox(HWND_DESKTOP, 66 HWND_DESKTOP, 67 DisplayEAsProc, 68 FM3ModHandle, 69 EA_FRAME, 70 (PVOID)list); 71 } 71 72 } 72 Abort:73 73 WinDestroyMsgQueue(hmq); 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.