�����������������������������������Ŀ � 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 -fFILELIST : show the help. : 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.


: add file FILENAME to the top of the library.If the file is not in the current dir give full pathname. : delete file FILENAME from the library. : extract file FILENAME from the library to the current dir.If FILENAME = *,extract all files in library. : 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 Out:WORD Name: void __cdecl df_close(WORD df_handle); Usage: closes a previously opened datafile. In: df_handle Name: DATAFILE * __cdecl df_getinfos(WORD df_handle); Usage: get all the infos to access the files in the datafile. In: df_handle Out:DATAFILE * = = file handle returned by df_open(); a pointer to a list of DATAFILE structs containing all the infos. NULL if an error occurred. = datafile file handle. = = full name of the datafile. file handle if datafile opened else NULL.

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= 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 = datafileinfo= name = buffer = Out:PTR DATA STRUCTURES: struct datafile { BYTE name[13]; DWORD offset; DWORD length; struct datafile *next; }; // // // // name of the file positive offset from the file's end lenght in bytes of the file next file info structure or NULL = the file handle of the datafile. the pointer returned by df_getinfos(). the name of the file to be loaded. 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. the pointer to the memory containing the loaded file,or NULL if error. a pointer to the list of DATAFILE structs returned by df_getinfos().

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: S-MAIL: S0IOB@uduniv.cc.uniud.it (i'm not here very otfen) Alessandro Job

via Peresson ,12 33020 - Piano d'Arta (UD) ITALY