💾 Archived View for gemini.spam.works › mirrors › textfiles › computers › DOCUMENTATION › dfmake.txt captured on 2022-06-12 at 06:32:22.

View Raw

More Information

-=-=-=-=-=-=-


                    ?????????????????????????????????????
                    ?            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