source: trunk/eas.c@ 1010

Last change on this file since 1010 was 1010, checked in by Steven Levine, 17 years ago

Correct compare typo

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1
2/***********************************************************************
3
4 $Id: eas.c 1010 2008-05-10 20:07:58Z stevenhl $
5
6 EA viewer applet
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2002, 2007 Steven H.Levine
10
11 16 Oct 02 SHL Reformat
12 08 Feb 03 SHL Free list with free() since we don't
13 allocate list contents
14 08 Apr 07 SHL Minor reformat
15 10 May 08 SHL Correct compare typo
16
17***********************************************************************/
18
19#include <stdlib.h>
20#include <string.h>
21
22#define INCL_DOS
23#define INCL_WIN
24
25#include "dll\fm3dlg.h"
26#include "dll\makelist.h"
27#include "dll\fm3dll.h"
28
29int main (int argc,char *argv[])
30{
31 HAB hab;
32 HMQ hmq;
33 CHAR fullname[CCHMAXPATH];
34 CHAR **list = NULL;
35 UINT x,numfiles = 0,numalloc = 0;
36
37 DosError(FERR_DISABLEHARDERR);
38 for(x = 1; x < argc; x++) {
39 if (!strchr("/;,`\'",*argv[x]) && IsFile(argv[x]) != -1) {
40 if (DosQueryPathInfo(argv[x],
41 FIL_QUERYFULLNAME,fullname,
42 sizeof(fullname)))
43 strcpy(fullname, argv[x]);
44 AddToList(fullname,&list,&numfiles,&numalloc);
45 }
46 }
47 hab = WinInitialize(0);
48 if (hab) {
49 hmq = WinCreateMsgQueue(hab,384);
50 if (hmq) {
51 if (InitFM3DLL(hab,argc,argv)) {
52 if (!list) {
53 strcpy(fullname, "*");
54 list = malloc(sizeof(CHAR *) * 2);
55 if (list &&
56 insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) &&
57 *fullname && *fullname != '*') {
58 list[0] = fullname;
59 list[1] = NULL;
60 }
61 }
62 if (list) {
63 WinDlgBox(HWND_DESKTOP,
64 HWND_DESKTOP,
65 DisplayEAsProc,
66 FM3ModHandle,
67 EA_FRAME,
68 (PVOID)list);
69 }
70 }
71 WinDestroyMsgQueue(hmq);
72 }
73 WinTerminate(hab);
74 }
75 if (list)
76 free(list);
77 return 0;
78}
79
Note: See TracBrowser for help on using the repository browser.