add casts to zune macros to silence some warnings
[tangerine.git] / workbench / tools / Edit / DiskIO.h
blobdb0a4af924c4bc6dc8539382117048275570f33b
1 /**************************************************************
2 **** diskio.h : prototypes for reading / writing files ****
3 **** Free software under GNU license, started on 25.2.2000 ****
4 **** © T.Pierron, C.Guillaume. ****
5 **************************************************************/
7 #ifndef DISKIO_H
8 #define DISKIO_H
10 #include "Memory.h"
12 /* This is the fields modified by load_file in Project datatype **
13 ** But because of this function may failed, we must use another **
14 ** datatype and re-fill original structure in case of success */
15 typedef struct
17 STRPTR filename; /* Just fill this field */
18 STRPTR buffer;
19 LINE *lines;
20 ULONG nblines;
21 char eol;
22 } LoadFileArgs;
24 WORD load_file ( LoadFileArgs * );
25 WORD read_file ( LoadFileArgs *, ULONG * );
26 BYTE save_file ( STRPTR, LINE *, unsigned char eol );
27 BYTE get_full_path ( STRPTR, STRPTR * );
29 #ifndef INTUITION_INTUITION_H
30 struct Window;
31 #endif
33 /** Arguments to use with ask_save and ask_load function **/
34 typedef struct
36 STRPTR dir; /* Directory name */
37 STRPTR file; /* File name */
38 UBYTE modifmark; /* True if file has modif. mark */
39 } AskArgs;
41 /** Split a name into two pointers **/
42 void split_path( AskArgs *, STRPTR *, STRPTR * );
44 /** Prompt user for a filename **/
45 STRPTR ask_save(struct Window *, AskArgs *, CONST_STRPTR);
47 /** Like previous but with ASL_LOAD. if setfile is 1 File gadget will
48 *** be initially fill. Otherwise it will be empty and multi-select will
49 *** be enabled. Thus a (StartUpArgs *) will be returned instead (utility.h).
50 **/
51 STRPTR ask_load(struct Window *, AskArgs *, BYTE setfile, CONST_STRPTR asltitle);
53 void free_diskio_alloc(void);
55 #endif