- Now puts cursor position in window title properly instead of overwriting
[tangerine.git] / workbench / tools / Edit / DiskIO.h
blobe6214de6c520b2f17f997db2e46147fc79a74863
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 LONG protection;
23 } LoadFileArgs;
25 WORD load_file ( LoadFileArgs * );
26 WORD read_file ( LoadFileArgs *, ULONG * );
27 BYTE save_file ( STRPTR, LINE *, unsigned char eol, LONG protection );
28 BYTE get_full_path ( STRPTR, STRPTR * );
30 #ifndef INTUITION_INTUITION_H
31 struct Window;
32 #endif
34 /** Arguments to use with ask_save and ask_load function **/
35 typedef struct
37 STRPTR dir; /* Directory name */
38 STRPTR file; /* File name */
39 UBYTE modifmark; /* True if file has modif. mark */
40 } AskArgs;
42 /** Split a name into two pointers **/
43 void split_path( AskArgs *, STRPTR *, STRPTR * );
45 /** Prompt user for a filename **/
46 STRPTR ask_save(struct Window *, AskArgs *, CONST_STRPTR);
48 /** Like previous but with ASL_LOAD. if setfile is 1 File gadget will
49 *** be initially fill. Otherwise it will be empty and multi-select will
50 *** be enabled. Thus a (StartUpArgs *) will be returned instead (utility.h).
51 **/
52 STRPTR ask_load(struct Window *, AskArgs *, BYTE setfile, CONST_STRPTR asltitle);
54 void free_diskio_alloc(void);
56 #endif