Changeset 551 for trunk/undel.c
- Timestamp:
- Feb 28, 2007, 2:33:51 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/undel.c
r2 r551 11 11 #include "dll\fm3dlg.h" 12 12 13 int main(int argc, char *argv[]) 14 { 13 15 14 int main (int argc,char *argv[]) { 15 16 HAB hab; 17 HMQ hmq; 16 HAB hab; 17 HMQ hmq; 18 18 FILESTATUS3 fs; 19 19 static CHAR fullname[CCHMAXPATH]; 20 CHAR 21 INT 20 CHAR *thisarg = NULL; 21 INT x; 22 22 23 23 DosError(FERR_DISABLEHARDERR); 24 for (x = 1;x < argc;x++) {25 if (!strchr("/;,`\'",*argv[x]) && !thisarg) {24 for (x = 1; x < argc; x++) { 25 if (!strchr("/;,`\'", *argv[x]) && !thisarg) { 26 26 thisarg = argv[x]; 27 27 break; 28 28 } 29 29 } 30 if (!thisarg) {30 if (!thisarg) { 31 31 thisarg = fullname; 32 32 save_dir(fullname); 33 33 } 34 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); 35 if (thisarg && !DosQueryPathInfo(thisarg, FIL_STANDARD, &fs, sizeof(fs))) { 36 if (DosQueryPathInfo(thisarg, 37 FIL_QUERYFULLNAME, fullname, sizeof(fullname))) 38 strcpy(fullname, thisarg); 45 39 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); 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 } 50 DosSleep(250L); 51 WinDestroyMsgQueue(hmq); 60 52 } 61 53 WinTerminate(hab); … … 63 55 } 64 56 else 65 DosBeep(250, 100);57 DosBeep(250, 100); 66 58 return 0; 67 59 } 68
Note:
See TracChangeset
for help on using the changeset viewer.