XEROX DUMPLOAD 2 4 1 DUMPLOAD 1 4 By: Bill van Melle (vanMelle@Xerox.com) This module reads files written by the Alto operating system Executive's DUMP command, and the Alto FTP's DUMP command. Its utility is limited to those who have machines with those systems. The user interface consists of a single function: (DUMPREAD FILE &KEY :COPY-TO :ASK :DATES :PRINT :COLLECT) [Function] FILE is the file to read. The optional keys are as follows: COPY-TO copy each subfile in the dump file to this destination. The default is T, meaning the terminal. If NIL, no files are copied, but the names are still listed. Otherwise, the value must be a well-formed directory specification, e.g., "{DSK}" or "{FS:}Misc>". ASK if true, means to ask the user for confirmation before processing each file; those for which the user replies "No" are skipped. This flag is automatically true when the destination is the terminal. PRINT if true, means to print the name and (if DATES is true) the creation date for each file. Default is T. DATES if true, the printout includes the creation date for each file. Default is T. COLLECT Return a list of all files processed. This flag defaults to true when copying to a non-terminal destination. For example, (DUMPREAD dumpfile) queries you with each file name, and if you answer Yes, dumps the file to the terminal. (DUMPREAD dumpfile :COPY-TO NIL) simply lists the contents of the dump file. (DUMPREAD dumpfile :COPY-TO "{DSK}") copies all the components of the dump file to the local disk, without asking. Implementation details: Dump file format A dump file is a sequence of blocks of eight-bit bytes. The first byte of each block is the block type. A typical dump file might look like: ... . . ... The well-known block types are as follows: Name [#377]. A name block contains two bytes of file attributes (ignored by Load, set to 0 by Dump) and then the file name as a sequence of bytes terminated by zero. Data [#376]. A data block contains two bytes of byte count (high-order byte first), two bytes of checksum (high-order byte first), and a sequence of data bytes. The count does not include the checksum or byte count; only the data bytes are counted. The checksum is a 16-bit add ignoring carry, over the data and byte count. If the block has an odd number of bytes, the last byte is not included in the checksum computation. End [#374]. An end block has no contents and terminates a Load. Date [#373]. A date block consists of six bytes: four bytes of Alto creation date and zero for the remaining two. Date blocks are optional.(LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) ) T. (00 1T HT(((8( (8D PAGEHEADING RUNNINGHEAD GACHA  TIMESROMAN TERMINAL  HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO     HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN )2         8f):Oo  Z , O)+  v  ) 6  uz