home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************
- *
- * DISKFILE.PIF
- *
- **************************************************************/
-
- /*** general ********************************************************/
-
- #define filename_length 128 /* max. 127 characters for a file name */
- #define pathname_length 256 /* max. 255 characters for complete path */
-
- /********************************************************************/
-
-
-
- /*******************************************************************
- */
- int load_file(
- char path[], /* IN: full path of file to be loaded */
- long *filesize, /* OUT: size of file in RAM */
- void **RAM_file /* begin address of file in RAM */
- ) ;
- /*
- * Load a file from disk into RAM.
- *
- * RETURN:
- */
- #define file_loaded 0 /* all right */
- #define path_not_found 1
- #define no_more_handle 2
- #define access_denied 3
- #define file_too_large 4
- #define file_not_closed 5 /* severe error ! */
- /*
- *******************************************************************/
-
-
- /*******************************************************************
- */
- void unload_file(
- void *RAM_file /* begin address of file in RAM */
- ) ;
- /*
- * Frees the memory occupied by load_file().
- *
- *******************************************************************/
-
-
- /*******************************************************************
- */
- unsigned int get_file_name(
- char whole_path[], /* OUT: path + filename */
- char path[], /* IN: initial search path for files, incl. search mask
- OUT: path selected by user, incl. search mask */
- char file[], /* OUT: file selected by user */
- char title[] /* IN: TOS >= 1.04 title in the file selector box
- TOS < 1.04 extra title in an alert box, the alert
- is shown only, if title is not empty */
- ) ;
- /*
- * Opens the file select box and gets the file name from that dialog.
- *
- * RETURN:
- */
- #define valid_file_selected 0 /* all right */
- #define no_file_selected 1
- #define file_select_error 2 /* severe error ! */
- /*
- *******************************************************************/
-
-
- /*******************************************************************
- */
- int Fcopy(
- char *output_name, /* IN: name of destination file */
- char *input_name /* IN: name of source file */
- ) ;
- /*
- * copies a file using a RAM buffer.
- *
- * OUTPUT: new file on disk
- *
- * RETURN: -1 if no success, 0 else
- *
- *******************************************************************/
-
-