Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Applications / gui_ate_src / edit.c
1 /*
2  * Acess Text Editor (ATE)
3  * - By John Hodge (thePowersGang)
4  *
5  * edit.c
6  * - File Loading / Manipulation
7  */
8 #include <stdio.h>
9 #include "include/file.h"
10 #include "include/syntax.h"
11
12 // === CODE ===
13 tFile *File_New(void)
14 {
15         tFile *ret = malloc(sizeof(tFile) + 1);
16         ret->Handle = NULL;
17         ret->nLines = 0;
18         ret->Lines = NULL;
19         ret->NameOfs = 0;
20         ret->Path[0] = 0;
21         return ret;
22 }
23
24 tFile *File_Load(const char *Path)
25 {
26         return NULL;
27 }
28
29 int File_Save(tFile *File)
30 {
31         
32         //file->bIsDirty = 0;
33         return -1;
34 }
35
36 int File_Close(tFile *File, int bDiscard)
37 {
38         //if( file->bIsDirty && !bDiscard )
39         //      return 1;
40         if( file->Handle )
41                 fclose(File->Handle);
42         
43         return 0;
44 }
45

UCC git Repository :: git.ucc.asn.au