Imported Upstream version 0.2.0+beta upstream/0.2.0+beta
authorBdale Garbee <bdale@gag.com>
Wed, 10 Oct 2012 12:52:54 +0000 (06:52 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 10 Oct 2012 12:52:54 +0000 (06:52 -0600)
58 files changed:
LICENSE [new file with mode: 0644]
Makefile
README
block.c
block.h
blocke.c
blocke.h
config.h
core.c
core.h
coree.c
coree.h
division.c
double.c
double.h
doublee.c
doublee.h
errors.h
exceptio.c
exceptio.h
facility.c
facility.h
file.c
file.h
filee.c
filee.h
float.c
float.h
floate.c
floate.h
hello.yf [new file with mode: 0644]
locals.c
locals.h
localse.c
localse.h
memall.c
memall.h
search.c
search.h
searche.c
searche.h
string.c
string.h
tools.c
tools.h
toolse.c
toolse.h
udio.c
udio.h
ver.h
vm.c
ycore.c
ycore.h
yfinit.c
yforth.1 [new file with mode: 0644]
yforth.c
yforth.h
yfvinit.c

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..de4d48e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,16 @@
+yForth? - A Forth interpreter written in ANSI C
+Copyright (C) 2012 Luca Padovani
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
index f5d210829fe1d61c25ba2d989b8eef76b6413b58..5e0fddb08bc741a61c4222653e91f7ff79a7e358 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,16 +12,14 @@ INCLUDES = block.h blocke.h config.h core.h coree.h defaults.h double.h \
        floate.h locals.h localse.h macro.h memall.h search.h searche.h \
        string.h tools.h toolse.h udio.h ver.h ycore.h yforth.h 
 
-all:
-       make div
-       make yforth
-
-yforth: $(OBJECTS)
-       $(CC) $(MATHLIB) -o yforth $(OBJECTS)
+yforth: div.h $(OBJECTS)
+       $(CC) -o yforth $(OBJECTS) $(MATHLIB)
 
+div.h: div
+       ./div 
+       
 div: division.c
        $(CC) -o div division.c
-       div > div.h 
 
 .c.o:   
        $(CC) -c -o $@ $(OPTIMIZE) $<
diff --git a/README b/README
index 95d5713794c56356831ce1f8c09278dd6150aa11..1ec1bdec42f5ccd06ec10653e143fd0c04e2a43b 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-yForth? v0.1beta - READ THIS (AND ONLY THIS) TO GET yForth? RUNNING.
+yForth? v0.2+beta - READ THIS (AND ONLY THIS) TO GET yForth? RUNNING.
 
 0) Hello world!
 Here's a little file which will help you having yForth? running in few
@@ -23,11 +23,6 @@ In fact, you'll find that all the device dependent routines are grouped
 together in the file "udio.c". If you're using Turbo C, Borland C, or any
 compiler which supplies the "conio.h", you can define HAVE_CONIO in 
 your "config.h" file and go. 
-Note that even if in file "udio.c" you'll see some lines telling you:
-#ifdef HAVE_CURSES
-or similar, yForth? actually doesn't support CURSES library. I've decided to
-stop my work as soon as something machine depended that was too messy has 
-came around.
 
 2) Where does the name yForth? came from?
 I've been charmed by Forth since the first time I "played" with it, but 
@@ -58,17 +53,15 @@ type which allows having 32bit Cells. Using Turbo C that's not possible.
 Below data definition you'll have to change the maximum values of your
 system. See "limits.h".
 - terminal
-Finally, define HAVE_CONIO if you're using Turbo C, Borland C or GCC for DOS.
-You'll have some nice words such as "page"...
+Finally, define HAVE_CONIO to 1 if you're using Turbo C, Borland C or GCC 
+for DOS. You'll have some nice words such as "page"...
 - special functions
 "asinh", "acosh", "atanh" aren't provided by all the libraries, if you don't
-have them delete the definitions at the end of "config.h".
+have them reset the definitions at the end of "config.h".
 
-The second thing to do now is configuring the "Makefile". I know, it's rude,
-but yForth? is drifting on my system for too long, I want to finish it 
-within 1996.
-At the moment "Makefile" is ready for GCC (under Linux), it's simple and 
-you won't find any problem modifying it.
+The second thing to do now is configuring the "Makefile". At the moment 
+"Makefile" is ready for GCC (under Linux), it's simple and you won't find any 
+problem modifying it.
 
 Third, type "make all". Yes, that's all.
 
@@ -94,10 +87,6 @@ Don't forget:
        - yForth? is a "beta" release, I think it has bugs, but, most 
                important, I'm afraid that some words don't behave as the
                standard says they have to.
-       - yForth? comes with no warranty, I don't make any warranty about it.
-       - yForth? is completely free. You can use, modify, doing anything
-               you want with it. If you're going to use it in any project,
-               I would be grateful if you cite me, but you're no obliged.
        - yForth? is NOT a complete ANS Forth.
        - yForth? is written in ANSI C. Ok, you could see some warning while
                compiling it, and I've to check it with lint, but it 
@@ -119,12 +108,11 @@ I'll be very happy if you report me some bug. Obviously I'll be happy even
 more if you tell me how fo fix it, but I can't pretend so much, even 'cause
 my C is not very readable (few comments...).
 
-8) Who am I?
-Luca Padovani
-v. Cormons, 12
-48100 Ravenna (RA)
-Italy
-
 email: lpadovan@cs.unibo.it
 
 Enjoy yForth?
+
+**********************************************************************
+                             CONTRIBUTORS 
+**********************************************************************
+
diff --git a/block.c b/block.c
index 1d98967a9d77ac2b796ced82bf925241d20586fc..ab807fd4ad6977ecfd5a3a831020b8f8f0129419 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     block.c
  * Abstract:        Block word set implementation
diff --git a/block.h b/block.h
index fbf507b919e178906e609d1e0f8517e7f7dce9f9..9580087c93ee86fffd888a48f3579e2ce590a07f 100644 (file)
--- a/block.h
+++ b/block.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     block.h
  * Abstract:        Block word set header file
index 71c9cbcfb5de5cb1b8900bce0dd992850424d696..3a60287f16bdd55cadb40f6dde09b65ed3f69b92 100644 (file)
--- a/blocke.c
+++ b/blocke.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: blocke.c
  * Abstract:   Block extension word set
index 8751091ee4be549a5b80c62a941995d71100ce0c..c10b405dd2c9b06ea2e3a063328d0ff784003f8e 100644 (file)
--- a/blocke.h
+++ b/blocke.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: blocke.h
  * Abstract:    Block extension include file
index 9bae024ed635253f62dc3820fef582d99ba43c1a..22e6b1b92060e09611311e1d8f4fb428b539d6e7 100644 (file)
--- a/config.h
+++ b/config.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     config.h
  * Abstract:        configuration file. Before any compilation please check
@@ -15,6 +25,8 @@
  * excluded word lists may be linked to final code if used by other words.
  */
 
+#include <endian.h>
+
 #define COREE_DEF           1L
 #define DOUBLE_DEF          1L
 #define DOUBLEE_DEF         1L
  * Note that some compilers have LITTLE_ENDIAN yet defined.
  */
 #ifndef LITTLE_ENDIAN
+# if __BYTE_ORDER == __LITTLE_ENDIAN
 #      define LITTLE_ENDIAN
+# else
+#      undef  LITTLE_ENDIAN
+# endif
 #endif
 
 /* When DCELL_MEM is defined, double cell transfer is realized by memory
  * Under Linux, Cell may be "int" and DCell "long long".
  */
 
-#define Cell                           int
+/* this might work for other 64 bit architectures, too? */
+#if defined(__alpha__)
+# define Cell                           long
+#else
+# define Cell                           int
+#endif /* __alpha__ */
+
 #define Char                           char
-#define Real                           long double     
+#define Real                           float
 
 #define UCell                          unsigned Cell
 #define DCell               long long
 #define MAX_F                          0.0
 
 /* Some compilers doesn't provide some functions in the standard library.
- * If you don't have, undefine them
- */ 
-#define HAVE_ACOSH
-#define HAVE_ASINH
-#define HAVE_ATANH
+ * If you don't have, turn 1s into 0s 
+ */
+#define HAVE_ACOSH                     1
+#define HAVE_ASINH                     1
+#define HAVE_ATANH                     1
+
+/* Set following define to 1 if you're compiling under Turbo C, Borland C,
+ * or GCC for DOS.
+ */
+#define HAVE_CONIO                     0
diff --git a/core.c b/core.c
index 38a9d8ae71fc16339d1b0b564f645d22e6a65980..1cdc2d9e577120e8ec1f49938c78adf8fe43fb73 100644 (file)
--- a/core.c
+++ b/core.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     core.c
  * Abstract:        Core word set
diff --git a/core.h b/core.h
index 86994dea4fabe9f04a4c1be71227826de9f5457c..3c0082c0fbc9baa7092632ba037f30e3c0d6f2cc 100644 (file)
--- a/core.h
+++ b/core.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     core.h
  * Abstract:        include file for "core" word set
diff --git a/coree.c b/coree.c
index 8acd70811d667963a5f1b50b44bb2bdc30800e06..cf7eef643f3f3cf1240169056cbe6611955ae769 100644 (file)
--- a/coree.c
+++ b/coree.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     coree.c
  * Abstract:        Core extension word set
@@ -159,15 +169,16 @@ void _nip() {
 }
 
 void _parse() {
-       register Char delim = (Char) *sp;
+    register Char delim = (Char) *sp;
     register Char *orig = &_input_buffer[_to_in];
     register int i = 0;
     while (_to_in < _in_input_buffer && _input_buffer[_to_in] != delim) {
         _to_in++;
         i++;
     }
-       *sp = (Cell) orig;
+    *sp = (Cell)orig;
     *--sp = i;
+
     if (_to_in < _in_input_buffer) _to_in++;
 }
 
diff --git a/coree.h b/coree.h
index c43a185c2d2270e37204100893da41a915447996..0f17df672408fd3029052baf8b2a2c3ace373c36 100644 (file)
--- a/coree.h
+++ b/coree.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     coree.h
  * Abstract:        Include file for "core-extension" word set
@@ -67,6 +77,7 @@ code(u_greater_than,                "u>",                   0)
 code(unused,                        "unused",               0)
 code(within,                        "within",               0)
 code(backslash,                     "\\",                   IMMEDIATE)
+code(backslash,                     "#!",                   IMMEDIATE)
 code(bracket_compile,               "[compile]",            COMP_ONLY)
 code(value,                                                    "value",                                0)
 code(to,                                                       "to",                                   IMMEDIATE)
index 2a404985bde03a7a87eb049a1b9dd8cb0e538e77..cff3160ff49d73b94415e95353031d00e4a9e7fc 100644 (file)
@@ -1,2 +1,28 @@
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <stdio.h>
-main() { printf("#define FLOORED_DIVISION %d\n", (-10 % 7) > 0 ? 1 : 0); }
+#include <math.h>
+#include <assert.h>
+
+main() {
+       FILE *f = fopen("div.h", "wt");
+       assert(f != NULL);
+       fprintf(f, "#define FLOORED_DIVISION %d\n", (-10 % 7) > 0 ? 1 : 0);
+       fclose(f);
+       return 0;
+}
index 631417de4113ec5fdb8dd708db0280114f6eb547..9a35d99f63cebe353c5fcc89ae7b0ffb148c421f 100644 (file)
--- a/double.c
+++ b/double.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     double.c
  * Abstract:        double-number word set
index 57e663b5aa940ee72d891de6cc10c39a0c2b5dc5..79f7bd8cb87c462f988dc2d54e8de69ddd9b1326 100644 (file)
--- a/double.h
+++ b/double.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     double.h
  * Abstract:        include file for "double-numbers" word set
index a6de7084718540e30d53feb9fbfb8daa99a5526b..fe33ad024d6135e72d8cac7b83f5e3f1e09b74d9 100644 (file)
--- a/doublee.c
+++ b/doublee.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     doublee.c
  * Abstract:        double-extension word set
index 81845c6ef9b1ef0466292e706b8f6ee366e5e3db..4c5f6d3ae73dc7538e86e7d429fb7461c9aa0ea6 100644 (file)
--- a/doublee.h
+++ b/doublee.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     doublee.h
  * Abstract:        include file for "double-number extension" word set
index 4df4e4763cc17dc200afbfbb3d8ef686781f93c6..d3d080ff34b10dab75558a747e97280932c05827 100644 (file)
--- a/errors.h
+++ b/errors.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     errors.h
  * Abstract:        definitions for system error codes
index 5acaa5775581dd34012ce39cdee58a9443503063..0400340c7598267f7aad789c369bca8dc7079844 100644 (file)
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     exceptio.c
  * Abstract:        exception word set
index 219dcd5fd32d92cacd4f713b34ad182b9bf97453..25280a4f8647d1a89231148d47530e1bef1e4de3 100644 (file)
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     exceptio.h
  * Abstract:        include file for "exception" word set
index dd8aed96a1a14c4a9c52a11a71ce15a07ea26c0f..30fd075f86eef4fa8f3b39f127afc2cd84260b25 100644 (file)
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     facility.c
  * Abstract:        facility word set
index d1211508b01f743641c851f1ffc1512da431d1a0..3b97e564a70cbaf014d3788aae6ae7f36894a8e6 100644 (file)
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     facility.h
  * Abstract:        include file for "facility" word set
diff --git a/file.c b/file.c
index ec01a2d08e8ce04b588342e2426427db787fb5d2..bb1b50427ae59b16a283d2d61e718df9e8d602e2 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: file.c
  * Abstract:    File word set
@@ -208,7 +218,7 @@ void _write_line() {
 /**************************************************************************/
 
 Cell truncate_file(FILE *f, UDCell cur, UDCell ud) {
-       if (cur == cur && fseek(f, ud, SEEK_SET)) return (errno);
+       if (fseek(f, ud, SEEK_SET)) return (errno);
        else return (0);
 }
 
diff --git a/file.h b/file.h
index 3f05c4714aa63d0692f64c62428064fab194d07d..d2a315a65c93a25b9433f0dec1aea124272a22b5 100644 (file)
--- a/file.h
+++ b/file.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: file.h
  * Abstract:    File word-set include file
diff --git a/filee.c b/filee.c
index 60e151d4d250426a25c08ecebc734e8e4d808ac0..bd3c665bba19bd2330b3911bc7446c2ecf78ea05 100644 (file)
--- a/filee.c
+++ b/filee.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: filee.c
  * Abstract:    File extension word set
diff --git a/filee.h b/filee.h
index f3523a8cd64ff49e54e00e5562a68ffa8f95eed0..274e1aa161046eca6af268a852f635a7d6bebc97 100644 (file)
--- a/filee.h
+++ b/filee.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: filee.h
  * Abstract:    Include file for "File extension" word set
diff --git a/float.c b/float.c
index cb931129bdee3c6d7e0b6325a70474d863770cb4..7311f539715c97f07f26b9954d671e0720a896b0 100644 (file)
--- a/float.c
+++ b/float.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     float.c
  * Abstract:        floating word set
diff --git a/float.h b/float.h
index c192ecec02dff6e42d23eddafbbb8a0c8d20b22c..1e924f2b84cf033262e9fe7d147830aca9765925 100644 (file)
--- a/float.h
+++ b/float.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     float.h
  * Abstract:        include file for "floating" word set
index 2e110c13596c8386de535f067b31c702141c0e0a..39739d2573dbc7a332d8c97d5e26451244256eb1 100644 (file)
--- a/floate.c
+++ b/floate.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     floate.c
  * Abstract:        floating-extension word set
index 135231400eb4ce54010b9dd3cea7a8674d2a6211..e97cf7e135a8cf63d5854a55992dcf9045b9c772 100644 (file)
--- a/floate.h
+++ b/floate.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     floate.h
  * Abstract:        include file for "floating-extension" word set
diff --git a/hello.yf b/hello.yf
new file mode 100644 (file)
index 0000000..9211feb
--- /dev/null
+++ b/hello.yf
@@ -0,0 +1,5 @@
+#! /usr/bin/yforth
+\
+\ a simple example of a yforth script
+\
+.( Hello World!) cr bye
index 94d9e56a3f827a817d761971e52b189f52a40427..1fe9bdb38deaff8ec88d5d225cd06076ba67da0b 100644 (file)
--- a/locals.c
+++ b/locals.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     locals.c
  * Abstract:        locals word set
index d007b14056a0442ce18cd24674181a40d0aa0dbb..e8080bdcc143bc37a2913a7c64a90ae8647d2589 100644 (file)
--- a/locals.h
+++ b/locals.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     locals.h
  * Abstract:        include file for "locals" word set
index 7e3b8218b8331e432ac826d9d288659c49e1a932..06b92ac329d64b76d9c994590e2b89c4cbf7a884 100644 (file)
--- a/localse.c
+++ b/localse.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     localse.c
  * Abstract:        locals-extension word set
index f55ea78deed30f594a43c43fc96b52d53adef13b..1d4e7a8e0f9175df3ae14cdff0d697fbcdac0a69 100644 (file)
--- a/localse.h
+++ b/localse.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     localse.h
  * Abstract:        include file for "locals-extension" word set
index 2ede4fc5b709aa6e43c890e91bcfa8726bfc4a5a..1aee1b60407616c96ac8e7b6b466882ea7e4c3b9 100644 (file)
--- a/memall.c
+++ b/memall.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: memall.c
  * Abstract:    Memory allocation word set
index bd4bb92d370bf8358654132057aceb16e13e608f..d50ca62164a0ff4fc00ff8316bbb384f8f478b9e 100644 (file)
--- a/memall.h
+++ b/memall.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: memall.h
  * Abstract:    Include file for "Memory Allocation" word set
index 04d17ee2b42ba513a7afade01ac5e19ad050faf8..a09dad1c74f4a601ca8bd096b8f5f76dffd66e69 100644 (file)
--- a/search.c
+++ b/search.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: 
  * Abstract:
index 3c8ff4d356a26337549a0d5e712fa62f535c1753..7fe616f25c1368358d6a9f30b6d0b4d9c71d5908 100644 (file)
--- a/search.h
+++ b/search.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:
  * Abstract:
index 7bb57ed5c13eaf40df690e56786fa716bb83cfe0..943c3ada6401920ebc169407f1b1a82601716d7e 100644 (file)
--- a/searche.c
+++ b/searche.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:
  * Abstract:
index 9f186a8236ca40558227a96242626b9f285891f6..f4b100486ad32794a1c32296e27fa1dc71b7fcfb 100644 (file)
--- a/searche.h
+++ b/searche.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:
  * Abstract:
index 6979a405f3e220c3ddc174be7307b0d1f2b38ec5..a1ef85b2f046172802915f1c8874adf9b28a58ea 100644 (file)
--- a/string.c
+++ b/string.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:
  * Abstract:
index 7d600b1a5e50fb1fe16ecd61ef3bffe5be90ab58..40554fdee49c92e0086377a40a3f6d815c5c1624 100644 (file)
--- a/string.h
+++ b/string.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:
  * Abstract:
diff --git a/tools.c b/tools.c
index 2a5d1109f378a3b7f2e5674b3da02a085d63b9d2..fb28edd69fd88fb4c657b31e278f12f5b8a5404b 100644 (file)
--- a/tools.c
+++ b/tools.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: tools.c
  * Abstract:   Programming Tools word set
diff --git a/tools.h b/tools.h
index f6f5048f7cf20ea4f7310daa1ee158ed23eba404..2217fd8a7de6441cbda3729f735dfae7eeea703a 100644 (file)
--- a/tools.h
+++ b/tools.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: tools.h
  * Abstract:   Include file for "Programming Tools" word set
index 2ea7098d8b6d37058bf6a43437d441e57ea55388..b0893a80514e79e3af73fdc28d0d754a96c85ebb 100644 (file)
--- a/toolse.c
+++ b/toolse.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: toolse.c
  * Abstract:   Programming Tools extension word set
index 4c2b0603c6ecb16ef3967b70fef16e94f11e8c3d..54b72f3c3bb598035a6ca0c2c64b6bfa17b860d6 100644 (file)
--- a/toolse.h
+++ b/toolse.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: toolse.h
  * Abstract:   Include file for "Programming Tools extension" word set
diff --git a/udio.c b/udio.c
index d3873a244873f337374599cb1203309990d15c2b..4029995f6d3be46e70179c7cb49db055e4547bf9 100644 (file)
--- a/udio.c
+++ b/udio.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: udio.c
  * Abstract:    User Device Input/Output functions. Here are enclosed all
  */
 
 #include "yforth.h"
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
 #      include <conio.h>
-#elifdef HAVE_CURSES
-#      include <curses.h>
 #endif
 #include "udio.h"
 
 /* d_clrscr: clear the screen */
 void d_clrscr() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        clrscr();
-#elifdef HAVE_CURSES
-       clear();
 #endif
 }
 
 /* d_clreol: clear to end of line */
 void d_clreol() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        clreol();
-#elifdef HAVE_CURSES
-       clrtoeol();
 #endif
 }
 
 /* d_setattr: set default attributes */
 void d_setaddr(Cell attr) {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        textattr(attr);
-#elifdef HAVE_CURSES
 #endif
 }
 
 /* d_getattr: get default attributes */
 Cell d_getattr() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        struct text_info ti;
        gettextinfo(&ti);
        return (ti.attribute);
-#elifdef HAVE_CURSES
 #endif
 }
 
 /* d_gotoxy: move the cursor to the location (x, y) of the screen */
 void d_gotoxy(Cell x, Cell y) {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        gotoxy(x, y);
-#elifdef HAVE_CURSES
-       move(y, x);
 #endif
 }
 
 /* d_wherex: current column position of the cursor */
 Cell d_wherex() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        return (wherex());
-#elifdef HAVE_CURSES
-       int x, y;
-       getyx(stdscr, y, x);
-       return ((Cell) x);
 #endif
 }
 
 /* d_wherey: current row position of the cursor */
 Cell d_wherey() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        return (wherey());
-#elifdef HAVE_CURSES
-       int x, y;
-       getyx(stdscr, y, x);
-       return ((Cell) y);
 #endif
 }
 
@@ -89,39 +81,24 @@ Cell d_wherey() {
  * Return
  */
 Char d_getch() {
-#ifdef HAVE_CONIO
-       return (getch());
-#elifdef HAVE_CURSES
+#if HAVE_CONIO
        return (getch());
 #endif 
 }
 
 /* d_kbhit: return True if a character is available */
 Cell d_kbhit() {
-#ifdef HAVE_CONIO
+#if HAVE_CONIO
        return (kbhit());
-#elifdef HAVE_CURSES
-       return (1);
-#endif 
+#endif
 }
 
 /* d_open: Initialize the Input/Output device */
 void d_open() {
-#ifdef HAVE_CURSES
-       initscr();
-       cbreak();
-       noecho();
-       nonl();
-       /* intrflush(stdscr, FALSE); */
-       /* keypad(stdscr, TRUE); */
-#endif
-} 
+}
 
 /* d_close: make some work when program finish to restore Input/Output device */
 void d_close() {
-#ifdef HAVE_CURSES
-       endwin();
-#endif
 }
 
 
diff --git a/udio.h b/udio.h
index 6f150bb7eb36eaf9bae736f7a610d8495971689b..e4098aafbd1dd07d7dc629637cc0fe18fb29409f 100644 (file)
--- a/udio.h
+++ b/udio.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: udio.h
  * Abstract:    User device Input/Output functions.
diff --git a/ver.h b/ver.h
index 14fa71bca1fe9c8a6e6d0d2eb1774fdb2b64204e..37829062d31e7d198edb73122bd2e3276fac3cc2 100644 (file)
--- a/ver.h
+++ b/ver.h
@@ -1,14 +1,24 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     ver.h
  * Abstract:        yForth? version definition
  */
 
 #define VER_HI                 0
-#define        VER_LO                  1
-#define VER_TEST               "beta"
+#define        VER_LO                  2
+#define VER_TEST               "+beta"
 
diff --git a/vm.c b/vm.c
index 97ec591de6a6ac10c22de053e1bd41adf6b1c959..11e7b749072e683125c7642bce1dd14cc99b5134 100644 (file)
--- a/vm.c
+++ b/vm.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     vm.c
  * Abstract:        The Virtual Machine on which is based the whole
diff --git a/ycore.c b/ycore.c
index 4e37d5e999f8b00430085b0c5efbf304c21dbcfb..d3acd6d4d62968be7be52aa7462f79ce3cea92ec 100644 (file)
--- a/ycore.c
+++ b/ycore.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     ycore.c
  * Abstract:        Words defined for this particular implementation of
diff --git a/ycore.h b/ycore.h
index 340b1227d8970e92d94f19c6ead61c62eab1a27e..e458f352cd31d5d34445045c99c19e2a17cdb8b0 100644 (file)
--- a/ycore.h
+++ b/ycore.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name: ycore.h 
  * Abstract:   YCore word set (non-standard words specific to yForth?. Don't
index b6528010c9defac5450173613f80a710ce67b231..0b81e56e91cfde4542e6bdc2cb6b43c7dcff207f 100644 (file)
--- a/yfinit.c
+++ b/yfinit.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     yfinit.c
  * Abstract:        Allocate memory for the main structures of the
diff --git a/yforth.1 b/yforth.1
new file mode 100644 (file)
index 0000000..79fbdd9
--- /dev/null
+++ b/yforth.1
@@ -0,0 +1,17 @@
+.TH YFORTH 1
+.SH NAME
+yforth \- a small, free Forth implementation
+.SH SYNOPSIS
+.B yforth 
+.SH DESCRIPTION
+This is a small implementation of the Forth programming language, somewhat
+easier to read than larger Forth implementations like Gforth.
+
+It is not being actively developed or maintained.  If you find it useful,
+great.  If not, don't expect much help.  The www.forth.org site is a good 
+place to get more general information on Forth.
+
+Serious Forth authors would be advised to use Gforth instead of this package.
+
+.SH AUTHOR
+This man page was cobbled up for the Debian distribution by Bdale Garbee.
index 7ea1513c9fd49f47a63ebddb7c2d1e700a8a3c26..9eec173651b2061d951deb1d3f60070a2bf28e37 100644 (file)
--- a/yforth.c
+++ b/yforth.c
@@ -1,9 +1,19 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
- * ------------------------------------------------------------------------
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+* ------------------------------------------------------------------------
  * Module name:     yforth.c
  * Abstract:        Main program
  */
@@ -40,9 +50,11 @@ static int silent,
 static struct image_header hd;
 
 void print_version() {
-    printf("yForth? v%d.%d%s - Written by Luca Padovani (C) 1996.\n\
-This software is Freeware, use it at your own risk.\n",
-       VER_HI, VER_LO, VER_TEST);
+  printf("yForth? v%d.%d%s  Copyright (C) 2012  Luca Padovani\n\
+This program comes with ABSOLUTELY NO WARRANTY.\n\
+This is free software, and you are welcome to redistribute it\n\
+under certain conditions; see LICENSE for details.\n",
+        VER_HI, VER_LO, VER_TEST);
 }
 
 void print_help(void) {
index abdef546c1faaf2584f4aaacc4797d1e78037b60..e5e5ac030149ec37e6b2610f1811ba0854fea2e4 100644 (file)
--- a/yforth.h
+++ b/yforth.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     yforth.h
  * Abstract:        definition of constants, data types, prototypes, and so on.
@@ -126,8 +136,8 @@ void put_dcell(Cell *ptr, DCell d);
 #              define GET_DCELL(ptr)           get_dcell((Cell *) ptr)
 #              define PUT_DCELL(ptr, d)        put_dcell((Cell *) ptr, (DCell) d)
 #      else
-#              define GET_DCELL(ptr)           *((DCell *) ptr)
-#              define PUT_DCELL(ptr, d)        *((DCell *) ptr) = d
+#              define GET_DCELL(ptr)           *((DCell *) (ptr))
+#              define PUT_DCELL(ptr, d)        *((DCell *) (ptr)) = d
 #      endif
 #else
 #      ifdef LITTLE_ENDIAN
index 67dc8adc74caeaaf07333968369d4d43f8a863a4..b652ed73026a72f6aff31bc9d702b3770fb228b1 100644 (file)
--- a/yfvinit.c
+++ b/yfvinit.c
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * ------------------------------------------------------------------------
  * Module name:     yfvinit.c
  * Abstract:        Initialize the vocabulary.