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
RevLine 
[22]1
[52]2/***********************************************************************
[22]3
[52]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
[754]9 Copyright (c) 2002, 2007 Steven H.Levine
[52]10
[620]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
[1010]15 10 May 08 SHL Correct compare typo
[52]16
17***********************************************************************/
18
[2]19#include <stdlib.h>
20#include <string.h>
[754]21
22#define INCL_DOS
23#define INCL_WIN
24
[907]25#include "dll\fm3dlg.h"
26#include "dll\makelist.h"
[2]27#include "dll\fm3dll.h"
28
[52]29int main (int argc,char *argv[])
30{
[754]31 HAB hab;
32 HMQ hmq;
33 CHAR fullname[CCHMAXPATH];
34 CHAR **list = NULL;
[907]35 UINT x,numfiles = 0,numalloc = 0;
[2]36
37 DosError(FERR_DISABLEHARDERR);
[754]38 for(x = 1; x < argc; x++) {
[620]39 if (!strchr("/;,`\'",*argv[x]) && IsFile(argv[x]) != -1) {
[754]40 if (DosQueryPathInfo(argv[x],
41 FIL_QUERYFULLNAME,fullname,
[620]42 sizeof(fullname)))
[754]43 strcpy(fullname, argv[x]);
[2]44 AddToList(fullname,&list,&numfiles,&numalloc);
45 }
46 }
47 hab = WinInitialize(0);
[620]48 if (hab) {
[2]49 hmq = WinCreateMsgQueue(hab,384);
[620]50 if (hmq) {
51 if (InitFM3DLL(hab,argc,argv)) {
52 if (!list) {
[754]53 strcpy(fullname, "*");
[620]54 list = malloc(sizeof(CHAR *) * 2);
[754]55 if (list &&
56 insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) &&
[1010]57 *fullname && *fullname != '*') {
[754]58 list[0] = fullname;
59 list[1] = NULL;
60 }
[620]61 }
[754]62 if (list) {
63 WinDlgBox(HWND_DESKTOP,
64 HWND_DESKTOP,
65 DisplayEAsProc,
66 FM3ModHandle,
67 EA_FRAME,
68 (PVOID)list);
69 }
[2]70 }
71 WinDestroyMsgQueue(hmq);
72 }
73 WinTerminate(hab);
74 }
[52]75 if (list)
76 free(list);
[2]77 return 0;
78}
79
Note: See TracBrowser for help on using the repository browser.