source: trunk/eas.c@ 22

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

Reformat

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