Imported Upstream version 0.1beta
[debian/yforth] / searche.c
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  * ------------------------------------------------------------------------
7  * Module name:
8  * Abstract:
9  */
10
11 #include <stdio.h>
12 #include "yforth.h"
13 #include "searche.h"
14
15 /**************************************************************************/
16 /* WORDS ******************************************************************/
17 /**************************************************************************/
18
19 void _also() {
20         if (top < WORD_LISTS) {
21                 top++;
22                 list[top] = list[top - 1];
23         }
24 }
25
26 void _forth() {
27         list[top] = forth_wid;
28 }
29
30 void _only() {
31         top = 0;
32         list[0] = forth_wid;
33 }
34
35 void _order() {
36         register int i;
37         printf("[%p] ", voc);
38         for (i = 0; i <= top; i++) printf("%d: %p ", i, list[i]);
39 }
40
41 void _previous() {
42         if (top >= 0) top--;
43 }
44
45