1 /* yForth? - A Forth interpreter written in ANSI C
2 * Copyright (C) 2012 Luca Padovani
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * ------------------------------------------------------------------------
18 * Abstract: File word-set include file
44 /**************************************************************************/
45 /* PROTOTYPES *************************************************************/
46 /**************************************************************************/
49 code(close_file, "close-file", 0)
50 code(create_file, "create-file", 0)
51 code(delete_file, "delete-file", 0)
52 code(file_position, "file-position", 0)
53 code(file_size, "file-size", 0)
54 code(include_file, "include-file", 0)
55 code(included, "included", 0)
56 code(open_file, "open-file", 0)
59 code(read_file, "read-file", 0)
60 code(read_line, "read-line", 0)
61 code(reposition_file, "reposition-file", 0)
62 code(resize_file, "resize-file", 0)
64 code(write_file, "write-file", 0)
65 code(write_line, "write-line", 0)
69 /**************************************************************************/
70 /* AUXILIARY FUNCTIONS PROTOTYPES *****************************************/
71 /**************************************************************************/
73 Cell truncate_file(FILE *f, UDCell cur, UDCell ud);
74 Cell expand_file(FILE *f, UDCell cur, UDCell ud);
75 Char *get_file_name(void);
76 void load_file(Char *name);