Last change
on this file since 1036 was 907, checked in by Steven Levine, 18 years ago |
Avoid out of memory traps in Compare Directories
Rework Compare Directories progress display for 2 second update rate
Start refactoring to reduce dependence on fm3dll.h
Add timer services (IsITimerExpired etc.)
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.4 KB
|
Rev | Line | |
---|
[2] | 1 |
|
---|
[862] | 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: undel.c 907 2008-01-06 07:26:17Z stevenhl $
|
---|
| 5 |
|
---|
| 6 | File undelete applet
|
---|
| 7 |
|
---|
| 8 | Copyright (c) 1993-98 M. Kimes
|
---|
| 9 | Copyright (c) 2007 Steven H. Levine
|
---|
| 10 |
|
---|
| 11 | 23 Sep 07 SHL Sync with standards
|
---|
| 12 | 23 Sep 07 SHL Get rid of statics
|
---|
| 13 |
|
---|
| 14 | ***********************************************************************/
|
---|
| 15 |
|
---|
[2] | 16 | #include <string.h>
|
---|
[862] | 17 |
|
---|
| 18 | #define INCL_DOS
|
---|
| 19 |
|
---|
[907] | 20 | #include "dll\fm3dlg.h"
|
---|
[2] | 21 | #include "dll\fm3dll.h"
|
---|
| 22 |
|
---|
[551] | 23 | int main(int argc, char *argv[])
|
---|
| 24 | {
|
---|
| 25 | HAB hab;
|
---|
| 26 | HMQ hmq;
|
---|
[844] | 27 | FILESTATUS3 fs;
|
---|
[862] | 28 | CHAR fullname[CCHMAXPATH];
|
---|
[551] | 29 | CHAR *thisarg = NULL;
|
---|
| 30 | INT x;
|
---|
[2] | 31 |
|
---|
| 32 | DosError(FERR_DISABLEHARDERR);
|
---|
[551] | 33 | for (x = 1; x < argc; x++) {
|
---|
| 34 | if (!strchr("/;,`\'", *argv[x]) && !thisarg) {
|
---|
[2] | 35 | thisarg = argv[x];
|
---|
| 36 | break;
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
[551] | 39 | if (!thisarg) {
|
---|
[2] | 40 | thisarg = fullname;
|
---|
| 41 | save_dir(fullname);
|
---|
| 42 | }
|
---|
| 43 | DosError(FERR_DISABLEHARDERR);
|
---|
[844] | 44 | if (thisarg && !DosQueryPathInfo(thisarg, FIL_STANDARD, &fs, sizeof(fs))) {
|
---|
[551] | 45 | if (DosQueryPathInfo(thisarg,
|
---|
| 46 | FIL_QUERYFULLNAME, fullname, sizeof(fullname)))
|
---|
| 47 | strcpy(fullname, thisarg);
|
---|
[2] | 48 | hab = WinInitialize(0);
|
---|
[551] | 49 | if (hab) {
|
---|
| 50 | hmq = WinCreateMsgQueue(hab, 256);
|
---|
| 51 | if (hmq) {
|
---|
| 52 | if (InitFM3DLL(hab, argc, argv)) {
|
---|
| 53 | MakeValidDir(fullname);
|
---|
| 54 | WinDlgBox(HWND_DESKTOP,
|
---|
| 55 | HWND_DESKTOP,
|
---|
| 56 | UndeleteDlgProc,
|
---|
[862] | 57 | FM3ModHandle,
|
---|
| 58 | UNDEL_FRAME,
|
---|
| 59 | fullname);
|
---|
[551] | 60 | }
|
---|
[844] | 61 | DosSleep(250);
|
---|
[551] | 62 | WinDestroyMsgQueue(hmq);
|
---|
[2] | 63 | }
|
---|
| 64 | WinTerminate(hab);
|
---|
| 65 | }
|
---|
| 66 | }
|
---|
| 67 | else
|
---|
[551] | 68 | DosBeep(250, 100);
|
---|
[2] | 69 | return 0;
|
---|
| 70 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.