home *** CD-ROM | disk | FTP | other *** search
- #ifndef USEDUMP
-
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Fonts.h>
- #include <OSEvents.h>
- #include <Controls.h>
- #include <Windows.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include <Dialogs.h>
- #include <Desk.h>
- #include <ToolUtils.h>
- #include <OSUtils.h>
- #include <Scrap.h>
- #include <Packages.h>
- #include <Lists.h>
- #include <Files.h>
- #include <Memory.h>
- #include <Printing.h>
- #include <Errors.h>
- #include <SetJmp.h>
-
- #ifndef EOF
- #define EOF (-1L)
- #endif
-
- #define DIRECTORY(pb) (((pb).hfileInfo.ioFlAttrib & ioDirMask) == ioDirMask)
-
- /*
- * Character definitions
- */
- #define ENTER 0x03
- #define BS 0x08
- #define TAB 0x09
- #define LF 0x0a
- #define RETURN 0x0d
-
- /*
- * Difference between Mac and Unix times
- */
- #define TIMEDIFF 0x7c25b080
-
- /*
- * Global Variables
- */
- extern Boolean autoPage;
- extern Boolean cvtNl;
- extern Boolean doneFlag;
- extern Boolean doPrint;
- extern Boolean ignorez;
- extern Boolean menusOK;
- extern Boolean pOpen;
-
- extern char fdCreator[];
- extern char fdType[];
- extern char header[];
-
- extern jmp_buf errJmp;
-
- extern THPrint prRecHdl;
-
- /*
- * Standard File and GetDir saved outputs
- */
- extern char *arName;
- extern short arVRefNum;
- extern long dirDirID;
- extern short dirVRefNum;
-
- /*
- * External routines
- */
- extern Boolean GetDir();
- extern Boolean MenuInit();
- extern Boolean PrSetup();
- extern Boolean WindInit();
-
- /*
- * Remainder taken from:
- * Header file for public domain tar (tape archive) program.
- *
- * @(#)tar.h 1.20 86/10/29 Public Domain.
- *
- * Created 25 August 1985 by John Gilmore, ihnp4!hoptoad!gnu.
- */
-
- /*
- * Header block on tape.
- *
- * I'm going to use traditional DP naming conventions here.
- * A "block" is a big chunk of stuff that we do I/O on.
- * A "record" is a piece of info that we care about.
- * Typically many "record"s fit into a "block".
- */
- #define RECORDSIZE 512
- #define NAMSIZ 100
- #define TUNMLEN 32
- #define TGNMLEN 32
-
- union record {
- char charptr[RECORDSIZE];
- struct header {
- char name[NAMSIZ];
- char mode[8];
- char uid[8];
- char gid[8];
- char size[12];
- char mtime[12];
- char chksum[8];
- char linkflag;
- char linkname[NAMSIZ];
- char magic[8];
- char uname[TUNMLEN];
- char gname[TGNMLEN];
- char devmajor[8];
- char devminor[8];
- } header;
- };
-
- /* The checksum field is filled with this while the checksum is computed. */
- #define CHKBLANKS " " /* 8 blanks, no null */
-
- /* The magic field is filled with this if uname and gname are valid. */
- #define TMAGIC "ustar " /* 7 chars and a null */
-
- /* The linkflag defines the type of file */
- #define LF_OLDNORMAL '\0' /* Normal disk file, Unix compat */
- #define LF_NORMAL '0' /* Normal disk file */
- #define LF_LINK '1' /* Link to previously dumped file */
- #define LF_SYMLINK '2' /* Symbolic link */
- #define LF_CHR '3' /* Character special file */
- #define LF_BLK '4' /* Block special file */
- #define LF_DIR '5' /* Directory */
- #define LF_FIFO '6' /* FIFO special file */
- #define LF_CONTIG '7' /* Contiguous file */
- /* Further link types may be defined later. */
-
- /*
- * Global variables
- */
- extern int blocking; /* Size of each block, in records */
- extern int blockSize; /* Size of each block, in bytes */
- extern Boolean reblock;
- extern Boolean oldArch;
-
- /*
- * We now default to Unix Standard format rather than 4.2BSD tar format.
- * The code can actually produce all three:
- * standard ANSI standard
- * oldarch V7
- * neither 4.2BSD
- * but we don't bother, since 4.2BSD can read ANSI standard format anyway.
- * The only advantage to the "neither" option is that we can cmp(1) our
- * output to the output of 4.2BSD tar, for debugging.
- */
- #define standard (!oldArch)
-
- extern short archive; /* File descriptor for archive file */
-
- /*
- * Declarations of functions available to the world.
- */
- union record *FindRec();
- void UseRec();
- union record *EndOfRecs();
- Boolean OpenArchive();
-
- #ifdef MAKEDUMP
- #pragma dump "hdrs.dmp"
- #endif
- #else
- #pragma load "hdrs.dmp"
- #endif