1 /* yForth? - Written by Luca Padovani (C) 1996/97
2 * ------------------------------------------------------------------------
3 * This software is FreeWare as long as it comes with this header in each
4 * source file, anyway you can use it or any part of it whatever
5 * you want. It comes without any warranty, so use it at your own risk.
6 * ------------------------------------------------------------------------
8 * Abstract: Block word set header file
28 /**************************************************************************/
29 /* VARIABLES **************************************************************/
30 /**************************************************************************/
34 struct _block_data { /* Entry in the table of blocks */
35 UCell block_no; /* Block number */
36 Cell dirty; /* Block updated */
39 struct _block_buffer { /* Simply an array of Char */
40 Char buffer[BLOCK_SIZE];
43 extern FILE *block_file;
45 extern struct _block_data *block_data;
46 extern struct _block_buffer *block_buffer;
48 extern UCell current_block;
52 variable(UCell, b_l_k, "blk")
54 /**************************************************************************/
55 /* PROTOTYPES *************************************************************/
56 /**************************************************************************/
58 code(block, "block", 0)
59 code(buffer, "buffer", 0)
60 code(flush, "flush", 0)
62 code(save_buffers, "save-buffers", 0)
63 code(update, "update", 0)
67 /**************************************************************************/
68 /* AUXILIARY FUNCTIONS PROTOTYPES *****************************************/
69 /**************************************************************************/
71 int search_block(UCell block_no);
72 int allocate_block(UCell block_no, int load);
73 void load_block(UCell block_no, int b);
74 void save_block(int b);
75 int open_block_file(char *name);
76 void close_block_file(void);