Last change
on this file since 844 was 844, checked in by Gregg Young, 18 years ago |
Reversion of some large file funtions where file sizes is not used
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2] | 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 |
|
---|
[551] | 13 | int main(int argc, char *argv[])
|
---|
| 14 | {
|
---|
[2] | 15 |
|
---|
[551] | 16 | HAB hab;
|
---|
| 17 | HMQ hmq;
|
---|
[844] | 18 | FILESTATUS3 fs;
|
---|
[2] | 19 | static CHAR fullname[CCHMAXPATH];
|
---|
[551] | 20 | CHAR *thisarg = NULL;
|
---|
| 21 | INT x;
|
---|
[2] | 22 |
|
---|
| 23 | DosError(FERR_DISABLEHARDERR);
|
---|
[551] | 24 | for (x = 1; x < argc; x++) {
|
---|
| 25 | if (!strchr("/;,`\'", *argv[x]) && !thisarg) {
|
---|
[2] | 26 | thisarg = argv[x];
|
---|
| 27 | break;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
[551] | 30 | if (!thisarg) {
|
---|
[2] | 31 | thisarg = fullname;
|
---|
| 32 | save_dir(fullname);
|
---|
| 33 | }
|
---|
| 34 | DosError(FERR_DISABLEHARDERR);
|
---|
[844] | 35 | if (thisarg && !DosQueryPathInfo(thisarg, FIL_STANDARD, &fs, sizeof(fs))) {
|
---|
[551] | 36 | if (DosQueryPathInfo(thisarg,
|
---|
| 37 | FIL_QUERYFULLNAME, fullname, sizeof(fullname)))
|
---|
| 38 | strcpy(fullname, thisarg);
|
---|
[2] | 39 | hab = WinInitialize(0);
|
---|
[551] | 40 | if (hab) {
|
---|
| 41 | hmq = WinCreateMsgQueue(hab, 256);
|
---|
| 42 | if (hmq) {
|
---|
| 43 | if (InitFM3DLL(hab, argc, argv)) {
|
---|
| 44 | MakeValidDir(fullname);
|
---|
| 45 | WinDlgBox(HWND_DESKTOP,
|
---|
| 46 | HWND_DESKTOP,
|
---|
| 47 | UndeleteDlgProc,
|
---|
| 48 | FM3ModHandle, UNDEL_FRAME, (PVOID) fullname);
|
---|
| 49 | }
|
---|
[844] | 50 | DosSleep(250);
|
---|
[551] | 51 | WinDestroyMsgQueue(hmq);
|
---|
[2] | 52 | }
|
---|
| 53 | WinTerminate(hab);
|
---|
| 54 | }
|
---|
| 55 | }
|
---|
| 56 | else
|
---|
[551] | 57 | DosBeep(250, 100);
|
---|
[2] | 58 | return 0;
|
---|
| 59 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.