source: branches/MKIMES/eas.c@ 869

Last change on this file since 869 was 2, checked in by root, 23 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1#define INCL_DOS
2#define INCL_WIN
3
4#include <os2.h>
5#include <stdarg.h>
6#include <stdio.h>
7#include <stdlib.h>
8#include <string.h>
9#include <ctype.h>
10#include "dll\fm3dll.h"
11#include "dll\fm3dlg.h"
12
13
14int main (int argc,char *argv[]) {
15
16 HAB hab;
17 HMQ hmq;
18 static CHAR fullname[CCHMAXPATH];
19 APIRET rc;
20 CHAR **list = NULL;
21 INT x,numfiles = 0,numalloc = 0;
22
23 DosError(FERR_DISABLEHARDERR);
24 *fullname = 0;
25 for(x = 1;x < argc;x++) {
26 if(!strchr("/;,`\'",*argv[x]) && IsFile(argv[x]) != -1) {
27 if(DosQueryPathInfo(argv[x],FIL_QUERYFULLNAME,fullname,
28 sizeof(fullname)))
29 strcpy(fullname,argv[x]);
30 AddToList(fullname,&list,&numfiles,&numalloc);
31 }
32 }
33 hab = WinInitialize(0);
34 if(hab) {
35 hmq = WinCreateMsgQueue(hab,384);
36 if(hmq) {
37 if(InitFM3DLL(hab,argc,argv)) {
38 if(!list) {
39 strcpy(fullname,"*");
40 list = malloc(sizeof(CHAR *) * 2);
41 if(!list || !insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) ||
42 !*fullname || *fullname == '*')
43 goto Abort;
44 list[0] = fullname;
45 list[1] = NULL;
46 }
47 WinDlgBox(HWND_DESKTOP,HWND_DESKTOP,
48 DisplayEAsProc,FM3ModHandle,
49 EA_FRAME,(PVOID)list);
50 }
51Abort:
52 WinDestroyMsgQueue(hmq);
53 }
54 WinTerminate(hab);
55 }
56 FreeList(list);
57 return 0;
58}
59
Note: See TracBrowser for help on using the repository browser.