home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / MAKEZIP.ZIP / INIT.H < prev    next >
C/C++ Source or Header  |  1993-08-07  |  5KB  |  126 lines

  1. /*┌──────────────────────────────────────────────────────────────────────┐
  2.  ▌│                                                                      │
  3.  ▌│ Program Name: INIT.H            Copyright: Gallagher Computing Corp. │
  4.  ▌│     Language: Clipper 5.0                                            │
  5.  ▌│       Author: Kevin S Gallagher                                      │
  6.  ▌│                                                                      │
  7.  ▌├──────────────────────────────────────────────────────────────────────┤
  8.  ▌│ Comments:                                                            │
  9.  ▌│ Simple header file for makezip program.                              │
  10.  ▌│                                                                      │
  11.  ▌├──────────────────────────────────────────────────────────────────────┤
  12.  ▌│ History:                                                             │
  13.  ▌│                                                                      │
  14.  ▌└──────────────────────────────────────────────────────────────────────┘
  15.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀           */
  16.  
  17. #include "fileio.ch"
  18. #include "inkey.ch"
  19. #include "error.ch"
  20. #include "box.ch"
  21.  
  22. #define USING_VERSION52
  23.  
  24. #define Get_Colors "W+/RB,W+/N"
  25.  
  26. #define aPic_ { "@S48", "@!", "@!", "@S48@!",         ;
  27.                 "@S48@!", "@S48@!", "@!", "@!", "@!"  ;
  28.               }
  29.  
  30. #define aBlock             { |x , y| x[1] < y[1]  }
  31. #define bBlock             { |x    | Showit(x[1]) }
  32.  
  33. #define MR                 MAXROW()
  34.  
  35. //───── Pseudofunctions for opening/using/closing init file
  36. #define OPEN_INIT_FILE()   oIni:= TIniFile():Use( xIniFile )
  37. #define CLOSE_INIT_FILE()  oIni:Use()
  38. #define WRITE_TO_INIT()    oIni:Save()
  39.  
  40. //───── default file types to loadup for compressing
  41. #define MyLocalList        "PRG,BAT,CH,RMK,LNK,DBT,FPT,DBV,H,DOC"
  42.  
  43. //───── messages used in alert() routines in makezip.prg
  44. #define ASK_USER_METHOD    "UPDATE FILE;REMOVE FILE;EXIT PROGRAM"
  45. #define ASK_OK_TO_DELETE   "LAST CHANCE TO ABORT ERASING;"+ZIPFILE
  46.  
  47.  
  48. //───── Pseudofunctions to retrieve values from initialiation file
  49. #define GET_TITLE()        ReadInitFile( 1 )
  50. #define GET_LIST_FILE()    ReadInitFile( 2 )
  51. #define GET_ZIP_FILE()     ReadInitFile( 3 )
  52. #define GET_LOCAL_FILES()  ReadInitFile( 4 )
  53. #define GET_OBJ_FILE()     ReadInitFile( 5 )
  54. #define GET_LIB_FILE()     ReadInitFile( 6 )
  55. #define GET_ZIP_NAME()     ReadInitFile( 7 )
  56. #define GET_UNZIP_NAME()   ReadInitFile( 8 )
  57. #define GET_COMMENT_FILE() ReadInitFile( 9 )
  58.  
  59. #xtranslate LSTRINT( <n> )                               => ;
  60.             ltrim( str( int( <n> ) ) )
  61.  
  62. //───── Pseudofunction for working with gets
  63. #xtranslate KSGREAD( <n> )                               => ;
  64.             ( setcursor( 3 ),                               ;
  65.             readmodal( getlist, <n> ),                      ;
  66.             getlist :={},                                   ;
  67.             setcursor(0),                                   ;
  68.             !( lastkey() = 27 )                             )
  69.  
  70. #xtranslate IfNil( <x> , <y> )                           => ;
  71.             if(valtype( <x> ) == "U", <y> , <x>             )
  72.  
  73. #xtranslate StableOne( <o> )                             => ;
  74.             <o>:refreshcurrent():forcestable()
  75.  
  76. #xtranslate ForceRefresh( <o> )                          => ;
  77.             <o>:forcestable();<o>:refreshall()
  78.  
  79. #xcommand DEFAULT <param> TO <value>                     => ;
  80.           IF <param> == NIL ; <param> := <value> ; END 
  81.  
  82. #xcommand FWriteLine( <h>, <s> )                         => ;
  83.           FWrite( <h>, <s> + CHR(13) + CHR(10) )
  84.  
  85. //───── the following are from Steve Straley/reworked by KSG
  86. #xcommand local <exp1>[,<exp2>][,<exp3>][,<exp4>][,<exp5>] as chars     => ;
  87.           local <exp1>\:="";
  88.               [,<exp2>\:=""];
  89.               [,<exp3>\:=""];
  90.               [,<exp4>\:=""];
  91.               [,<exp5>\:=""]
  92.  
  93.  
  94. #xcommand local <exp1>[,<exp2>][,<exp3>][,<exp4>][,<exp5>] as ints      => ;
  95.           local <exp1>\:=0;
  96.               [,<exp2>\:=0];
  97.               [,<exp3>\:=0];
  98.               [,<exp4>\:=0];
  99.               [,<exp5>\:=0]
  100.  
  101. #xcommand local <exp1>[,<exp2>][,<exp3>][,<exp4>][,<exp5>] as arrays    => ;
  102.           local <exp1>\:={};
  103.               [,<exp2>\:={}];
  104.               [,<exp3>\:={}];
  105.               [,<exp4>\:={}];
  106.               [,<exp5>\:={}]
  107. //───── end of Steve Straley commands
  108.  
  109.  
  110. #define SaveFullScreen() oldscrn := savescreen( 0, 0, maxrow(), maxcol() )
  111. #define RestFullScreen() restscreen( 0, 0, maxrow(), maxcol(), oldscrn )
  112.  
  113.  
  114. *****************************************************************************
  115. *░░░░░ manifest constants for various code for TinitClass ░░░░░░░░░░░░░░░░░░*
  116. *****************************************************************************
  117. #define MAIN_TITLE   "main"       , "title"     
  118. #define LIST_FILE    "SetUpFiles" , "ListFile"  
  119. #define ZIP_FILE     "SetUpFiles" , "ZipFile"   
  120. #define EXT_LIST     "Backups"    , "filetypes" 
  121. #define OBJ_LIST     "Backups"    , "xObj"      
  122. #define LIB_LIST     "Backups"    , "xLib"      
  123. #define ZIP_NAME     "ZipNames"   , "Packer"    
  124. #define UNZIP_FILE   "ZipNames"   , "UnPacker"  
  125. #define COMMENT_FILE "ZipNames"   , "NoteFile"  
  126.