238 lines
9.0 KiB
Plaintext
238 lines
9.0 KiB
Plaintext
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
|
|
³ DFMAKE v1.0 ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ (c) 1994 by DIGITAL UNDERGROUND ³
|
|
³Programmed by Alessandro 'BLOB' Job³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Introduction ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
DFMAKE is a small utility for joining a number of files in a unique
|
|
BIG file,and giving access to each of the old little files contained
|
|
in it.
|
|
This is PUBLIC DOMAIN.
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Disclaimer ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
DIGITAL UNDERGROUND & Alessandro Job makes no warranty of any kind,
|
|
either express or implied,including but not limited to implied
|
|
warranties of merchantability and fitness for a particular purpose,
|
|
with respect to this software and accompanying documentation.
|
|
|
|
IN NO EVENT SHALL DIGITAL UNDERGROUND & Alessandro Job BE LIABLE FOR
|
|
ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE, INCLUDING BUT NOT
|
|
LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
|
|
LOSS OF BUSINESS INFORMATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES, OR
|
|
OTHER FINANCIAL LOSS ARISING OUT OF THE USE OF OR INABILITY TO USE THIS
|
|
PROGRAM , EVEN IF DIGITAL UNDERGROUN & Alessandro Job HAS BEEN ADVISED
|
|
OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Usage ³
|
|
ÀÄÄÄÄÄÄÄÙ
|
|
|
|
DFMAKE builds a datafile library from a list of files you pass to it
|
|
with the -fFILELIST command line option (where FILELIST is the name of
|
|
the text file where your files ar listed).
|
|
The name of the datafile library must be the first argument of DFMAKE.
|
|
The format of the text file is very simple: you need only to write the
|
|
name of the files divided by a CR,a space or a comma.If the files you
|
|
need are not in the current dir,you must specify them with the full
|
|
path name.
|
|
Filenames in library are case sensitive.
|
|
|
|
Usage: DFMAKE [library name] [-command[commandoption]]
|
|
|
|
This are the commands you can use:
|
|
|
|
-?,-h : show the help.
|
|
|
|
-fFILELIST : this is the text file with the list of files you have
|
|
to insert in the new library file.
|
|
Use this option only when you want to create a library
|
|
file from scratch.
|
|
|
|
-aFILENAME : add file FILENAME to the top of the library.If the
|
|
file is not in the current dir give full pathname.
|
|
|
|
-dFILENAME : delete file FILENAME from the library.
|
|
|
|
-xFILENAME : extract file FILENAME from the library to the current
|
|
dir.If FILENAME = *,extract all files in library.
|
|
|
|
-rOLDFILENAME NEWFILENAME : rename the file OLDFILENAME,contained
|
|
in the library,in NEWFILENAME.
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Developement ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
Some routines to access a datafile library are supplyed.They are not
|
|
very optimized,but they are only examples.All the functions use the
|
|
PMC library functions for PMODE by Thomas Pytel.
|
|
|
|
FUNCTIONS SUPPLYED:
|
|
|
|
Name:
|
|
|
|
WORD __cdecl df_open(STR filename);
|
|
|
|
Usage:
|
|
opens the 'filename' datafile library.
|
|
|
|
In: filename = full name of the datafile.
|
|
Out:WORD = file handle if datafile opened
|
|
else NULL.
|
|
|
|
Name:
|
|
|
|
void __cdecl df_close(WORD df_handle);
|
|
|
|
Usage:
|
|
closes a previously opened datafile.
|
|
|
|
In: df_handle = datafile file handle.
|
|
|
|
Name:
|
|
|
|
DATAFILE * __cdecl df_getinfos(WORD df_handle);
|
|
|
|
Usage:
|
|
get all the infos to access the files in the datafile.
|
|
|
|
In: df_handle = file handle returned by df_open();
|
|
Out:DATAFILE * = a pointer to a list of DATAFILE structs
|
|
containing all the infos.
|
|
NULL if an error occurred.
|
|
|
|
Name:
|
|
|
|
void __cdecl df_delinfos(DATAFILE *datafileinfo);
|
|
|
|
Usage:
|
|
frees the memory allocated by df_getinfos().Use this function
|
|
only when you want to have no more access to the datafile.
|
|
|
|
In: datafileinfo= a pointer to the list of DATAFILE structs
|
|
returned by df_getinfos().
|
|
|
|
Name:
|
|
|
|
PTR __cdecl df_read(WORD df_handle,DATAFILE *datafileinfo, \
|
|
STR name,PTR buffer);
|
|
|
|
Usage:
|
|
reads in memory a file contained in the datafile.
|
|
|
|
In: df_handle = the file handle of the datafile.
|
|
datafileinfo= the pointer returned by df_getinfos().
|
|
name = the name of the file to be loaded.
|
|
buffer = a pointer to a pre-allocated buffer of the
|
|
size of the file to be loaded,or NULL if
|
|
allocation must be done by function.
|
|
Out:PTR = the pointer to the memory containing the
|
|
loaded file,or NULL if error.
|
|
|
|
DATA STRUCTURES:
|
|
|
|
struct datafile {
|
|
BYTE name[13]; // name of the file
|
|
DWORD offset; // positive offset from the file's end
|
|
DWORD length; // lenght in bytes of the file
|
|
struct datafile *next; // next file info structure or NULL
|
|
};
|
|
|
|
typedef struct datafile DATAFILE;
|
|
|
|
This is the structure used to store the infos for every file in
|
|
the datafile.
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ DATAFILE library format ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
This is the format of a datafile file made by DFMAKE.
|
|
All offsets are positive offsets from the end of the datafile.
|
|
|
|
File START->ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
|
|
³ First file ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ Second file ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ ... ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ Nth file ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
NFILES----->³ 2 BYTES ³
|
|
³ Number of files in lib³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ 21 BYTES ³
|
|
³ First file header ³
|
|
³ ³
|
|
³ 13 BYTES: file name ³
|
|
³ 4 BYTES: offset from ³
|
|
³ end of file ³
|
|
³ 4 BYTES: file lenght ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ Second file header ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ Nth file header ³
|
|
³ ... ³
|
|
³ ... ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ 4 BYTES ³
|
|
³ NFILES offset from end³
|
|
³ of file ³
|
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|
|
³ 4 BYTES ³
|
|
³ "DATA" signature ³
|
|
File END--->ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Acknowledgements ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
This piece of code uses the great PMODE handler and PMC interface and
|
|
library by Thomas 'TRAN' Pytel.
|
|
I want to thank him for this fantastic stuff. Thank you.
|
|
|
|
ÚÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ Greetings ³
|
|
ÀÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
Greetings to all the demo-coders,utility-coders & coders all around
|
|
the globe.
|
|
|
|
ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
³ INFOS ³
|
|
ÀÄÄÄÄÄÄÄÙ
|
|
|
|
This code is PUBLIC DOMAIN,but if you find it usefull and you use it
|
|
in some productions,please,credit me.(This is CREDIT-WARE !! 8-} )
|
|
You can also contact me if you have suggestions,comments,flames,etc.
|
|
at this addresses:
|
|
|
|
Internet: S0IOB@uduniv.cc.uniud.it (i'm not here very otfen)
|
|
|
|
S-MAIL: Alessandro Job
|
|
via Peresson ,12
|
|
33020 - Piano d'Arta (UD)
|
|
ITALY
|
|
|
|
|