source: trunk/undel.c@ 841

Last change on this file since 841 was 841, checked in by Gregg Young, 18 years ago

This implements large file support; The wrappers to allow WARP3 compatibility are not done so this will not run on Warp3or Warp 4 pre fixpack 12(?)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
RevLine 
[2]1#define INCL_DOS
2#define INCL_WIN
[841]3#define INCL_LONGLONG
[2]4
5#include <os2.h>
6#include <stdarg.h>
7#include <stdio.h>
8#include <stdlib.h>
9#include <string.h>
10#include <ctype.h>
11#include "dll\fm3dll.h"
12#include "dll\fm3dlg.h"
13
[551]14int main(int argc, char *argv[])
15{
[2]16
[551]17 HAB hab;
18 HMQ hmq;
[841]19 FILESTATUS3L fs;
[2]20 static CHAR fullname[CCHMAXPATH];
[551]21 CHAR *thisarg = NULL;
22 INT x;
[2]23
24 DosError(FERR_DISABLEHARDERR);
[551]25 for (x = 1; x < argc; x++) {
26 if (!strchr("/;,`\'", *argv[x]) && !thisarg) {
[2]27 thisarg = argv[x];
28 break;
29 }
30 }
[551]31 if (!thisarg) {
[2]32 thisarg = fullname;
33 save_dir(fullname);
34 }
35 DosError(FERR_DISABLEHARDERR);
[841]36 if (thisarg && !DosQueryPathInfo(thisarg, FIL_STANDARDL, &fs, sizeof(fs))) {
[551]37 if (DosQueryPathInfo(thisarg,
38 FIL_QUERYFULLNAME, fullname, sizeof(fullname)))
39 strcpy(fullname, thisarg);
[2]40 hab = WinInitialize(0);
[551]41 if (hab) {
42 hmq = WinCreateMsgQueue(hab, 256);
43 if (hmq) {
44 if (InitFM3DLL(hab, argc, argv)) {
45 MakeValidDir(fullname);
46 WinDlgBox(HWND_DESKTOP,
47 HWND_DESKTOP,
48 UndeleteDlgProc,
49 FM3ModHandle, UNDEL_FRAME, (PVOID) fullname);
50 }
51 DosSleep(250L);
52 WinDestroyMsgQueue(hmq);
[2]53 }
54 WinTerminate(hab);
55 }
56 }
57 else
[551]58 DosBeep(250, 100);
[2]59 return 0;
60}
Note: See TracBrowser for help on using the repository browser.