home *** CD-ROM | disk | FTP | other *** search
- IFND FILES_FILES_I
- FILES_FILES_I SET 1
-
- **
- ** $VER: files.i V0.9B
- **
- ** File Definitions.
- **
- ** (C) Copyright 1996-1997 DreamWorld Productions.
- ** All Rights Reserved.
- **
- **
-
- IFND DPKERNEL_I
- include 'games/dpkernel.i'
- ENDC
-
- ****************************************************************************
- * Module information.
-
- FileModVersion = 0
- FileModRevision = 9
-
- ****************************************************************************
- * Mini structures for source and destination operations.
-
- ;Filename structure.
-
- STRUCTURE FN,0
- WORD FN_ID ;ID_FILENAME
- APTR FN_Name ;Pointer to filename.
- LABEL FN_SIZEOF ;Private.
-
- ;Memory pointer structure.
-
- STRUCTURE MPTR,0
- WORD MPTR_ID ;ID_MEMPOINTER
- APTR MPTR_Address ;Pointer to memory area.
- LONG MPTR_Size ;Must supply a size unless you are a MemBlock.
- LABEL MPTR_SIZEOF ;Private.
-
-
- ;Example: FILENAME "HD1:Picture.iff"
-
- FILENAME MACRO
- dc.w ID_FILENAME
- dc.l .name\@
- .name\@ dc.b \1,0
- even
- ENDM
-
- ;Example: MEMPTR $530
-
- MEMPTR MACRO
- dc.w ID_MEMPTR
- dc.l \1
- dc.l \2
- ENDM
-
- *****************************************************************************
- * File Object.
-
- FILEVERSION = 1
- TAGS_FILE = (ID_SPCTAGS<<16)|ID_FILE
-
- STRUCTURE FL,HEAD_SIZEOF ;Standard header.
- LONG FL_BytePos ;Current position in file.
- LONG FL_Size ;Total size of the file.
- LONG FL_Flags ;File flags.
- APTR FL_Source ;Points to the Source descriptor.
- APTR FL_Prev ;Previous file in chain.
- APTR FL_Next ;Next file in chain.
- APTR FL_Comment ;Pointer to comment string.
- APTR FL_Date ;Time of creation.
- LONG FL_Permissions ;User permission flags.
-
- ;File tags.
-
- FLA_BytePos = (TLONG|FL_BytePos)
- FLA_Size = (TLONG|FL_Size)
- FLA_Flags = (TLONG|FL_Flags)
- FLA_Source = (TAPTR|FL_Source)
- FLA_Prev = (TAPTR|FL_Prev)
- FLA_Next = (TAPTR|FL_Next)
- FLA_Comment = (TAPTR|FL_Comment)
- FLA_Date = (TAPTR|FL_Date)
-
- ;Opening tags.
-
- FB_READ = 0 ;Default.
- FB_WRITE = 0 ;Set if writing to the file.
- FB_LOCK = 1 ;Locks other programs out from using this file.
- ;FB_NEW = 2 ;
- FB_FIND = 3 ;
- FB_NOUNPACK = 4 ;Disallow auto-unpacking of the data.
- FB_NOPACK = 4 ;Disallow auto-packing of the data.
- FB_NOBUFFER = 5 ;
- FB_NEWFILE = 6 ;Open a new file (size of 0).
- FB_ALPHASORT = 7 ;Applies to directories only.
-
- FL_OLDFILE = 0
- FL_READ = 0
- FL_WRITE = (1<<FB_WRITE)
- FL_LOCK = (1<<FB_LOCK)
- ;FL_NEW = (1<<FB_NEW)
- FL_FIND = (1<<FB_FIND)
- FL_NOUNPACK = (1<<FB_NOUNPACK)
- FL_NOPACK = (1<<FB_NOPACK)
- FL_NOBUFFER = (1<<FB_NOBUFFER)
- FL_NEWFILE = (1<<FB_NEWFILE)
- FL_ALPHASORT = (1<<FB_ALPHASORT)
-
- ****************************************************************************
- * Permission flags for Files and Directories.
-
- FPT_READ = $00000001
- FPT_WRITE = $00000002
- FPT_EXECUTE = $00000004
- FPT_DELETE = $00000008
- FPT_SCRIPT = $00000010
- FPT_HIDDEN = $00000020
- FPT_ARCHIVE = $00000040
- FPT_PASSWORD = $00000080
-
- *****************************************************************************
- * Directory Object.
-
- DIRVERSION = 1
- TAGS_DIRECTORY = (ID_SPCTAGS<<16)|ID_DIRECTORY
-
- STRUCTURE DIR,HEAD_SIZEOF
- APTR DIR_ChildDir ;First sub-directory under this dir.
- APTR DIR_ChildFile ;First file under this directory.
- APTR DIR_Source ;Location of the directory.
- LONG DIR_Flags ;Opening flags (see file flags).
- APTR DIR_Comment ;Comment string.
- LONG DIR_Permissions ;User flags.
- APTR DIR_Date ;Pointer to Time structure.
- APTR DIR_Next ;Next directory in this list.
- APTR DIR_Prev ;Previous directory in this list.
-
- DIRA_Source = (TAPTR|DIR_Source)
- DIRA_Flags = (TLONG|DIR_Flags)
- DIRA_Permissions = (TLONG|DIR_Permissions)
- DIRA_Comment = (TAPTR|DIR_Comment)
- DIRA_Date = (TAPTR|DIR_Date)
-
- ENDC ;FILES_FILES_I
-
-