| Last change
 on this file since 894 was             862, checked in by Steven Levine, 18 years ago | 
        
          | 
Get rid of statics
 | 
        
          | 
              
Property                 svn:eol-style
 set to                 native
Property                 svn:keywords
 set to                 Author Date Id Revision | 
        
          | File size:
            1.5 KB | 
      
      
| Rev | Line |  | 
|---|
| [2] | 1 |  | 
|---|
| [862] | 2 | /*********************************************************************** | 
|---|
|  | 3 |  | 
|---|
|  | 4 | $Id: undel.c 862 2007-11-11 06:14:10Z 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 <stdarg.h> | 
|---|
|  | 17 | #include <stdio.h> | 
|---|
|  | 18 | #include <stdlib.h> | 
|---|
|  | 19 | #include <string.h> | 
|---|
|  | 20 | #include <ctype.h> | 
|---|
| [862] | 21 |  | 
|---|
|  | 22 | #define INCL_DOS | 
|---|
|  | 23 | #define INCL_WIN | 
|---|
|  | 24 | #include <os2.h> | 
|---|
|  | 25 |  | 
|---|
| [2] | 26 | #include "dll\fm3dll.h" | 
|---|
|  | 27 | #include "dll\fm3dlg.h" | 
|---|
|  | 28 |  | 
|---|
| [551] | 29 | int main(int argc, char *argv[]) | 
|---|
|  | 30 | { | 
|---|
|  | 31 | HAB hab; | 
|---|
|  | 32 | HMQ hmq; | 
|---|
| [844] | 33 | FILESTATUS3 fs; | 
|---|
| [862] | 34 | CHAR fullname[CCHMAXPATH]; | 
|---|
| [551] | 35 | CHAR *thisarg = NULL; | 
|---|
|  | 36 | INT x; | 
|---|
| [2] | 37 |  | 
|---|
|  | 38 | DosError(FERR_DISABLEHARDERR); | 
|---|
| [551] | 39 | for (x = 1; x < argc; x++) { | 
|---|
|  | 40 | if (!strchr("/;,`\'", *argv[x]) && !thisarg) { | 
|---|
| [2] | 41 | thisarg = argv[x]; | 
|---|
|  | 42 | break; | 
|---|
|  | 43 | } | 
|---|
|  | 44 | } | 
|---|
| [551] | 45 | if (!thisarg) { | 
|---|
| [2] | 46 | thisarg = fullname; | 
|---|
|  | 47 | save_dir(fullname); | 
|---|
|  | 48 | } | 
|---|
|  | 49 | DosError(FERR_DISABLEHARDERR); | 
|---|
| [844] | 50 | if (thisarg && !DosQueryPathInfo(thisarg, FIL_STANDARD, &fs, sizeof(fs))) { | 
|---|
| [551] | 51 | if (DosQueryPathInfo(thisarg, | 
|---|
|  | 52 | FIL_QUERYFULLNAME, fullname, sizeof(fullname))) | 
|---|
|  | 53 | strcpy(fullname, thisarg); | 
|---|
| [2] | 54 | hab = WinInitialize(0); | 
|---|
| [551] | 55 | if (hab) { | 
|---|
|  | 56 | hmq = WinCreateMsgQueue(hab, 256); | 
|---|
|  | 57 | if (hmq) { | 
|---|
|  | 58 | if (InitFM3DLL(hab, argc, argv)) { | 
|---|
|  | 59 | MakeValidDir(fullname); | 
|---|
|  | 60 | WinDlgBox(HWND_DESKTOP, | 
|---|
|  | 61 | HWND_DESKTOP, | 
|---|
|  | 62 | UndeleteDlgProc, | 
|---|
| [862] | 63 | FM3ModHandle, | 
|---|
|  | 64 | UNDEL_FRAME, | 
|---|
|  | 65 | fullname); | 
|---|
| [551] | 66 | } | 
|---|
| [844] | 67 | DosSleep(250); | 
|---|
| [551] | 68 | WinDestroyMsgQueue(hmq); | 
|---|
| [2] | 69 | } | 
|---|
|  | 70 | WinTerminate(hab); | 
|---|
|  | 71 | } | 
|---|
|  | 72 | } | 
|---|
|  | 73 | else | 
|---|
| [551] | 74 | DosBeep(250, 100); | 
|---|
| [2] | 75 | return 0; | 
|---|
|  | 76 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.