source: branches/MKIMES/undel.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.5 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 FILESTATUS3 fs;
19 static CHAR fullname[CCHMAXPATH];
20 CHAR *thisarg = NULL;
21 INT x;
22
23 DosError(FERR_DISABLEHARDERR);
24 for(x = 1;x < argc;x++) {
25 if(!strchr("/;,`\'",*argv[x]) && !thisarg) {
26 thisarg = argv[x];
27 break;
28 }
29 }
30 if(!thisarg) {
31 thisarg = fullname;
32 save_dir(fullname);
33 }
34 DosError(FERR_DISABLEHARDERR);
35 if(thisarg &&
36 !DosQueryPathInfo(thisarg,
37 FIL_STANDARD,
38 &fs,
39 sizeof(fs))) {
40 if(DosQueryPathInfo(thisarg,
41 FIL_QUERYFULLNAME,
42 fullname,
43 sizeof(fullname)))
44 strcpy(fullname,thisarg);
45 hab = WinInitialize(0);
46 if(hab) {
47 hmq = WinCreateMsgQueue(hab,256);
48 if(hmq) {
49 if(InitFM3DLL(hab,argc,argv)) {
50 MakeValidDir(fullname);
51 WinDlgBox(HWND_DESKTOP,
52 HWND_DESKTOP,
53 UndeleteDlgProc,
54 FM3ModHandle,
55 UNDEL_FRAME,
56 (PVOID)fullname);
57 }
58 DosSleep(250L);
59 WinDestroyMsgQueue(hmq);
60 }
61 WinTerminate(hab);
62 }
63 }
64 else
65 DosBeep(250,100);
66 return 0;
67}
68
Note: See TracBrowser for help on using the repository browser.