home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / HPACK78S.ZIP / language / hpaktext.c < prev    next >
C/C++ Source or Header  |  1992-12-03  |  14KB  |  304 lines

  1. /****************************************************************************
  2. *                                                                            *
  3. *                            HPACK Multi-System Archiver                        *
  4. *                            ===========================                        *
  5. *                                                                            *
  6. *                                    HPACK Messages                             *
  7. *                            HPAKTEXT.C  Updated 29/05/92                    *
  8. *                                                                            *
  9. *   This program is protected by copyright and as such if you use or copy    *
  10. *   this code for your own purposes directly or indirectly your soul will    *
  11. *   become the property of the author with the right to dispose of it as    *
  12. *                                     he wishes.                                *
  13. *                                                                            *
  14. *        Copyright 1991 - 1992  Peter C.Gutmann.  All rights reserved        *
  15. *                                                                            *
  16. ****************************************************************************/
  17.  
  18. /* Generated:        04 Dec 1992.
  19.    From file:        HPAKTEXT.DEF
  20.    Language:        English.
  21.    Character set:    7-bit ASCII */
  22.  
  23. /* The following are all the text messages (except for the hidden ones)
  24.    contained in HPACK.  The error messages are stored in a special struct
  25.    which also contains the error exit level.  Note that the messages are
  26.    all stored as seperate strings instead of in one unified array to make
  27.    automatic generation by a (currently experimental) preprocessing tool
  28.    easier */
  29.  
  30. #include <stdlib.h>
  31. #include "defs.h"
  32. #include "error.h"
  33. #include "errorlvl.h"
  34. #include "hpacklib.h"
  35.  
  36. /****************************************************************************
  37. *                                                                            *
  38. *                                    Errors                                    *
  39. *                                                                            *
  40. ****************************************************************************/
  41.  
  42. /* When changing the following remember to change the defines in ERROR.H
  43.    as well */
  44.  
  45. #define ERR            ERROR_INFO
  46.  
  47.             /* Severe errors */
  48. #if defined( __ARC__ )
  49. ERR err00 = { EXIT_INT_ERR,        "Abort on data transfer" };
  50. #else
  51. ERR err00 = { EXIT_INT_ERR,        "Internal error" };
  52. #endif /* __ARC__ */
  53. ERR err01 = { EXIT_NO_MEM,        "Out of memory" };
  54. ERR err02 = { EXIT_NO_DISK,        "Out of disk space" };
  55. ERR err03 = { EXIT_NO_ARCH,        "Cannot open archive file %s" };
  56. ERR err04 = { EXIT_NO_TEMP,        "Cannot open temp file" };
  57. ERR err05 = { EXIT_NO_PATH,        "Path %s not found" };
  58. ERR err06 = { EXIT_NO_BASE,        "Cannot access base directory" };
  59. ERR err07 = { EXIT_NO_MKDIR,    "Cannot create directory %s" };
  60. ERR err08 = { EXIT_BREAK,        "Stopped at user request" };
  61. #if defined( __MSDOS__ )
  62. ERR err09 = { EXIT_FILE_ERR,    "File error type %02d" };
  63. #else
  64. ERR err09 = { EXIT_FILE_ERR,    "File error" };
  65. #endif /* __MSDOS__ */
  66. ERR err10 = { EXIT_DIR_CORRUPT,    "Archive directory corrupted" };
  67.  
  68.             /* Standard errors */
  69. ERR err11 = { EXIT_LONG_PATH,    "Path %s too long" };
  70. ERR err12 = { EXIT_LONG_PATH,    "Path %s... too long" };
  71. ERR err13 = { EXIT_LONG_PATH,    "Path %s%s too long" };
  72. ERR err14 = { EXIT_LONG_PATH,    "Path %s%s... too long" };
  73. ERR err15 = { EXIT_LONG_PATH,    "Path %s/%s too long" };
  74. ERR err16 = { EXIT_NO_OVERRIDE,    "Cannot override base path" };
  75. ERR err17 = { EXIT_NEST,        "Too many levels of directory nesting" };
  76. ERR err18 = { EXIT_SCRIPT_ERR,    "%s%d errors detected in script file" };
  77. ERR err19 = { EXIT_NOT_ARCH,    "Not an HPACK archive" };
  78. ERR err20 = { EXIT_NOTHING,        "No matching files on disk" };
  79. ERR err21 = { EXIT_NOTHING,        "No matching files in archive" };
  80. ERR err22 = { EXIT_NOTHING,        "No matching archives found" };
  81. ERR err23 = { EXIT_BAD_KEYFILE,    "Bad keyfile" };
  82. ERR err24 = { EXIT_COMMAND,        "Unknown command \'%s\'" };
  83. ERR err25 = { EXIT_OPTION,        "Unknown directory option \'%c\'" };
  84. ERR err26 = { EXIT_OPTION,        "Unknown overwrite option \'%c\'" };
  85. ERR err27 = { EXIT_OPTION,        "Unknown view option \'%c\'" };
  86. ERR err28 = { EXIT_OPTION,        "Unknown option \'%c\'" };
  87.  
  88.             /* Minor errors */
  89. ERR err29 = { EXIT_PASS,        "Missing userID for encryption/authentication" };
  90. ERR err30 = { EXIT_PASS,        "Cannot find secret key for userID \'%s\'" };
  91. ERR err31 = { EXIT_PASS,        "Cannot find secret key - cannot decrypt data" };
  92. ERR err32 = { EXIT_PASS,        "Cannot find public key for userID \'%s\'" };
  93. ERR err33 = { EXIT_PASS,        "Cannot read random seed file" };
  94. ERR err34 = { EXIT_PASS,        "Passwords not the same" };
  95. ERR err35 = { EXIT_CHANGE,        "Cannot change deleted archive" };
  96. ERR err36 = { EXIT_CHANGE,        "Cannot change multipart archive" };
  97. ERR err37 = { EXIT_CHANGE,        "Cannot change encrypted archive" };
  98. ERR err38 = { EXIT_CHANGE,        "Cannot change unencrypted archive" };
  99. ERR err39 = { EXIT_CHANGE,        "Cannot change unit-compressed archive" };
  100. ERR err40 = { EXIT_NOLONG,        "Long argument format not supported in this version" };
  101. ERR err41 = { EXIT_BADWILD,        "Bad wildcard format in %s" };
  102. ERR err42 = { EXIT_BADWILD,        "Wildcard expression too complex" };
  103. ERR err43 = { EXIT_BADWILD,        "Cannot use wildcards in external pathname %s" };
  104. ERR err44 = { EXIT_SECURITY,    "Cannot use both conventional and public-key encryption" };
  105. ERR err45 = { EXIT_NOCRYPT,        "Cannot process encrypted archive" };
  106.  
  107. /****************************************************************************
  108. *                                                                            *
  109. *                                    Warnings                                *
  110. *                                                                            *
  111. ****************************************************************************/
  112.  
  113. char warn00[] =    "Warning: Truncated %u bytes of EOF padding\n";
  114. char warn01[] =    "Warning: %s. Continue [y/n] ";
  115. char warn02[] =    "\nWarning: File may be corrupt";
  116. char warn03[] =    "Warning: Cannot find public key - cannot perform authentication check\n";
  117. char warn04[] =    "Warning: Authentication data corrupted - cannot perform authentication check\n";
  118. char warn05[] =    "\nWarning: Archive section too short, skipping...";
  119. char warn06[] =    "Warning: Unknown script command \'%s\'\n";
  120. char warn07[] =    "Warning: Cannot open data file %s - skipping\n";
  121. char warn08[] =    "Warning: Cannot open script file %s - skipping\n";
  122. char warn09[] =    "Warning: Directory %s conflicts with\n\t existing file - skipping\n";
  123. char warn10[] =    "\nWarning: One file was corrupt";
  124. char warn11[] =    "\nWarning: %2d files were corrupt\n";
  125.  
  126. /****************************************************************************
  127. *                                                                            *
  128. *                                General Messages                            *
  129. *                                                                            *
  130. ****************************************************************************/
  131.  
  132. char mesg00[] =    "Verify multipart archive authenticity";
  133. char mesg01[] =    "Archive fails authenticity check";
  134. char mesg02[] =    "Verifying archive authenticity - please wait\n";
  135. char mesg03[] =    "Authentication information will be destroyed";
  136. char mesg04[] =    "Archive directory corrupted";
  137. char mesg05[] =    "Archive directory corrupted, probably due to\n\t incorrect password";
  138. char mesg06[] =    "Processing archive directory...";
  139. char mesg07[] =    "%s [y/n] ";
  140. char mesg08[] =    "%s %s [y/n/a] ";
  141. char mesg09[] =    "Skipping %s\n";
  142. char mesg10[] =    "Data is encrypted";
  143. char mesg11[] =    "Cannot process encryption information";
  144. char mesg12[] =    "Cannot open data file";
  145. char mesg13[] =    "Extracting";
  146. char mesg14[] =    " %s as";
  147. char mesg15[] =    " as %s";
  148. char mesg16[] =    "Unknown archiving method";
  149. char mesg17[] =    " - skipping %s";
  150. char mesg18[] =    "Won't overwrite existing file %s\n";
  151. char mesg19[] =    "%s already exists: Enter new filename ";
  152. char mesg20[] =    "Path %s... too long\n";
  153. char mesg21[] =    "already exists - overwrite";
  154. char mesg22[] =    "Extract";
  155. char mesg23[] =    "Display";
  156. char mesg24[] =    "Test";
  157. char mesg25[] =    "\n\tFile tested OK";
  158. char mesg26[] =    "\nHit a key...";
  159. char mesg27[] =    "Adding";
  160. char mesg28[] =    "\nError: ";
  161. char mesg29[] =    "Panic: Error during error recovery";
  162. char mesg30[] =    "Creating directory %s";
  163. char mesg31[] =    "\nProcessing script file %s\n";
  164. char mesg32[] =    "Path %s... too long in line %d\n";
  165. char mesg33[] =    "^ Bad character in filename in line %d\n";
  166. char mesg34[] =    "Maximum level of ";
  167. char mesg35[] =    "Adding directory %s\n";
  168. char mesg36[] =    "Checking directory %s\n";
  169. char mesg37[] =    "Leaving directory %s\n";
  170. char mesg38[] =    "File %s already in archive - skipping\n";
  171. char mesg39[] =    "Add";
  172. char mesg40[] =    "Delete";
  173. char mesg41[] =    "Deleting %s from archive\n";
  174. char mesg42[] =    "Freshen";
  175. char mesg43[] =    "Replace";
  176. char mesg44[] =    "\nArchive is \'%s\'\n\n";
  177. char mesg45[] =    "Archive is uptodate";
  178. char mesg46[] =    "\nDone";
  179. char mesg47[] =    "\nDirectory: ";
  180. char mesg48[] =    "\n\tCreated %02d/%02d/%02d, %02d:%02d:%02d\n";
  181. char mesg49[] =    "file";
  182. char mesg50[] =    "files";
  183. char mesg51[] =    "\rPassword must be between 8 and 80 characters long";
  184. char mesg52[] =    "Please enter password (8..80 characters): ";
  185. char mesg53[] =    "Please enter secondary password (8..80 characters): ";
  186. char mesg54[] =    "Reenter password to confirm: ";
  187. char mesg55[] =    "Please enter password for secret key (8..80 characters): ";
  188. char mesg56[] =    "Password is incorrect.";
  189. char mesg57[] =    "Warning: Data fails authenticity check!\nBad";
  190. char mesg58[] =    "Good";
  191. char mesg59[] =    " signature from: %s.\n\tSignature made on %02d/%02d/%02d, %02d:%02d:%02d\n";
  192. char mesg60[] =    " - One moment...";
  193. char mesg61[] =    "This is part %u of a multipart archive\n";
  194. char mesg62[] =    "Please insert the ";
  195. char mesg63[] =    "next disk";
  196. char mesg64[] =    "previous disk";
  197. char mesg65[] =    "disk containing ";
  198. char mesg66[] =    "part %u";
  199. char mesg67[] =    "the last part";
  200. char mesg68[] =    " of this archive";
  201. char mesg69[] =    " and press a key";
  202. char mesg70[] =    "Continuing... ";
  203.  
  204. /****************************************************************************
  205. *                                                                            *
  206. *                    Special Text Strings used in Viewfile.C                    *
  207. *                                                                            *
  208. ****************************************************************************/
  209.  
  210. /* The following messages *must* have the various columns line up since they
  211.    are used to display archive directory listings:
  212.  
  213.    System  Length   Size  Ratio   Date     Time    Name
  214.    ------  ------  ------ -----   ----     ----    ----
  215.     Subdirectory                dd/mm/yy hh:mm:ss  sssssssssss...
  216.     sssss ddddddd ddddddd  dd%  dd/mm/yy hh:mm:ss #sssssssssss...
  217.           ------- ------- -----                       ----
  218.           ddddddd ddddddd  dd%                       Total: dddd files
  219.  
  220.    Grand Total:
  221.           ddddddd ddddddd                     dd archives, dddd files */
  222.  
  223. char vmsg00[] =    "System  Length   Size  Ratio   Date     Time    Name\n" \
  224.                 "------  ------  ------ -----   ----     ----    ----";
  225. char vmsg01[] =    " Subdirectory                %02d/%02d/%02d %02d:%02d:%02d  %s\n";
  226. char vmsg02[] =    " %s %7lu %7lu  %2d%%  %02d/%02d/%02d %02d:%02d:%02d %c%s\n";
  227. char vmsg03[] =    "       ------- ------- -----                    ----\n" \
  228.                 "       %7lu %7lu  %2d%%                     Total: %u %s\n";
  229. char vmsg04[] =    "\nGrand Total:\n" \
  230.                 "       %7lu %7lu                    %2d archives, %u %s\n";
  231.  
  232. /****************************************************************************
  233. *                                                                            *
  234. *                                OS-Specific Messages                        *
  235. *                                                                            *
  236. ****************************************************************************/
  237.  
  238. #if defined( __MSDOS__ )
  239. char osmsg00[] = "File sharing violation";
  240. char osmsg01[] = "File locking violation";
  241. char osmsg02[] = "File corresponds to device driver";
  242. #endif /* __MSDOS__ */
  243.  
  244. /****************************************************************************
  245. *                                                                            *
  246. *                        Display Various (Long) Messages                        *
  247. *                                                                            *
  248. ****************************************************************************/
  249.  
  250. #ifndef __MSDOS__
  251.  
  252. void showTitle( void )
  253.     {
  254.     hputs( "HPACK - The multi-system archiver Version 0.78a0.  Release date: 1 Sept 1992" );
  255.     hputs( "For Amiga, Archimedes, Atari, Macintosh, MSDOS, OS/2, and UNIX" );
  256. #if defined( __AMIGA__ )
  257.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  Amiga port by N.Little & P.Gutmann." );
  258. #elif defined( __ARC__ )
  259.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  Arc port by Jason, Edouard, & Peter." );
  260. #elif defined( __ATARI__ )
  261.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  Atari port by M.Moffatt and P.Gutmann." );
  262. #elif defined( __MAC__ )
  263.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  Macintosh port by Peter Gutmann." );
  264. #elif defined( __OS2__ )
  265.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  OS/2 port by John Burnell." );
  266. #elif defined( __UNIX__ )
  267.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  Unix port by Stuart Woolford." );
  268. #else
  269.     hputs( "Copyright (c) Peter Gutmann 1989 - 1992.  xxxx port by yyyy zzzz." );
  270. #endif /* Various OS-dependant credits */
  271.     }
  272.  
  273. void showHelp( void )
  274.     {
  275.     hputs( "\nUsage: HPACK command [options] archive [data files...][@scriptfiles... ]" );
  276.     hputs( "\nValid HPACK commands are:" );
  277.     hputs( " A - Add files          X - Extract files       V - Directory of files" );
  278.     hputs( " P - View files         D - Delete files        F - Freshen files in archive" );
  279.     hputs( " R - Replace files      U - Update files        T - Test archive integrity" );
  280.     hputs( "\nValid HPACK options are:" );
  281.     hputs( " -K - Overwrite existing archive       -T - Touch files on extraction" );
  282.     hputs( " -R - Recurse through subdirectories   -D - Store directories recursed into" );
  283.     hputs( " -S - Stealth mode                     -A - Store/restore file attributes" );
  284.     hputs( " -I - Interactive mode                 -L - Add authentication information" );
  285.     hputs( " -W - Add archive comment              -E - Add error recovery information" );
  286.     hputs( " -U - Unit compression mode            -C<*> - Encryption opts: see HPACK.DOC" );
  287.     hputs( " -B<path>  - Specify base path         -D<*> - Directory options: see HPACK.DOC" );
  288.     hputs( " -V<F,D,S> - View opt(Files,Dirs,Sort) -Z<*> - Sys-specific opts: see HPACK.DOC" );
  289.     hputs( " -O<N,A,S,P>       - Overwrite options (None, All, Smart, Prompt)" );
  290. #if defined( __ATARI__ ) || defined( __MSDOS__ ) || defined( __OS2__ )
  291.     hputs( " -X<R,Xxx,L,E,P,A> - Xlate opts (smart, CR, Hex lit, LF, EBCDIC, Prime, ASCII)" );
  292. #elif defined( __MAC__ )
  293.     hputs( " -X<C,Xxx,L,E,P,A> - Xlate opts (smart, CRLF, Hex lit, LF,EBCDIC,Prime,ASCII)" );
  294. #elif defined( __AMIGA__ ) || defined( __ARC__ ) || defined( __UNIX__ )
  295.     hputs( " -X<R,Xxx,C,E,P,A> - Xlate opts (smart, CR, Hex lit, CRLF, EBCDIC,Prime,ASCII)" );
  296. #endif /* Various OS-specific defines */
  297.     hputs( "\n\"archive\" is the HPACK archive, with a default extension of .HPK" );
  298.     hputs( "\"data files\" are the files to archive, defaulting to all files if none are" );
  299.     hputs( "             given.  Wildcards *, ?, [], ^/!, \\ can be used." );
  300.     exit( OK );
  301.     }
  302.  
  303. #endif /* !__MSDOS__ */
  304.