Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2015 03:29:50 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r282804 - in vendor/ficl/4.1.0: . contrib doc doc/articles doc/graphics doc/source ficlplatform softcore softwords test
Message-ID:  <201505120329.t4C3Topf071873@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue May 12 03:29:50 2015
New Revision: 282804
URL: https://svnweb.freebsd.org/changeset/base/282804

Log:
  Tag ficl 4.1.0

Added:
  vendor/ficl/4.1.0/
     - copied from r282801, vendor/ficl/dist/
  vendor/ficl/4.1.0/Makefile
     - copied unchanged from r282803, vendor/ficl/dist/Makefile
  vendor/ficl/4.1.0/Makefile.ansi
     - copied unchanged from r282803, vendor/ficl/dist/Makefile.ansi
  vendor/ficl/4.1.0/bit.c
     - copied unchanged from r282803, vendor/ficl/dist/bit.c
  vendor/ficl/4.1.0/callback.c
     - copied unchanged from r282803, vendor/ficl/dist/callback.c
  vendor/ficl/4.1.0/compatibility.c
     - copied unchanged from r282803, vendor/ficl/dist/compatibility.c
  vendor/ficl/4.1.0/contrib/
     - copied from r282803, vendor/ficl/dist/contrib/
  vendor/ficl/4.1.0/dictionary.c
     - copied unchanged from r282803, vendor/ficl/dist/dictionary.c
  vendor/ficl/4.1.0/doc/api.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/api.html
  vendor/ficl/4.1.0/doc/articles/
     - copied from r282803, vendor/ficl/dist/doc/articles/
  vendor/ficl/4.1.0/doc/debugger.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/debugger.html
  vendor/ficl/4.1.0/doc/dpans.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/dpans.html
  vendor/ficl/4.1.0/doc/graphics/
     - copied from r282803, vendor/ficl/dist/doc/graphics/
  vendor/ficl/4.1.0/doc/license.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/license.html
  vendor/ficl/4.1.0/doc/links.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/links.html
  vendor/ficl/4.1.0/doc/locals.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/locals.html
  vendor/ficl/4.1.0/doc/oop.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/oop.html
  vendor/ficl/4.1.0/doc/parsesteps.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/parsesteps.html
  vendor/ficl/4.1.0/doc/releases.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/releases.html
  vendor/ficl/4.1.0/doc/source/
     - copied from r282803, vendor/ficl/dist/doc/source/
  vendor/ficl/4.1.0/doc/upgrading.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/upgrading.html
  vendor/ficl/4.1.0/double.c
     - copied unchanged from r282803, vendor/ficl/dist/double.c
  vendor/ficl/4.1.0/extras.c
     - copied unchanged from r282803, vendor/ficl/dist/extras.c
  vendor/ficl/4.1.0/ficlcompatibility.h
     - copied unchanged from r282803, vendor/ficl/dist/ficlcompatibility.h
  vendor/ficl/4.1.0/ficldll.def
     - copied unchanged from r282803, vendor/ficl/dist/ficldll.def
  vendor/ficl/4.1.0/ficldll.dsp
     - copied unchanged from r282803, vendor/ficl/dist/ficldll.dsp
  vendor/ficl/4.1.0/ficlexe.dsp
     - copied unchanged from r282803, vendor/ficl/dist/ficlexe.dsp
  vendor/ficl/4.1.0/ficllib.dsp
     - copied unchanged from r282803, vendor/ficl/dist/ficllib.dsp
  vendor/ficl/4.1.0/ficllocal.h
     - copied unchanged from r282803, vendor/ficl/dist/ficllocal.h
  vendor/ficl/4.1.0/ficlplatform/
     - copied from r282803, vendor/ficl/dist/ficlplatform/
  vendor/ficl/4.1.0/ficltokens.h
     - copied unchanged from r282803, vendor/ficl/dist/ficltokens.h
  vendor/ficl/4.1.0/hash.c
     - copied unchanged from r282803, vendor/ficl/dist/hash.c
  vendor/ficl/4.1.0/lzcompress.c
     - copied unchanged from r282803, vendor/ficl/dist/lzcompress.c
  vendor/ficl/4.1.0/lzuncompress.c
     - copied unchanged from r282803, vendor/ficl/dist/lzuncompress.c
  vendor/ficl/4.1.0/main.c
     - copied unchanged from r282803, vendor/ficl/dist/main.c
  vendor/ficl/4.1.0/primitives.c
     - copied unchanged from r282803, vendor/ficl/dist/primitives.c
  vendor/ficl/4.1.0/softcore/
     - copied from r282803, vendor/ficl/dist/softcore/
  vendor/ficl/4.1.0/system.c
     - copied unchanged from r282803, vendor/ficl/dist/system.c
  vendor/ficl/4.1.0/utility.c
     - copied unchanged from r282803, vendor/ficl/dist/utility.c
  vendor/ficl/4.1.0/word.c
     - copied unchanged from r282803, vendor/ficl/dist/word.c
Replaced:
  vendor/ficl/4.1.0/Makefile.linux
     - copied unchanged from r282803, vendor/ficl/dist/Makefile.linux
  vendor/ficl/4.1.0/ReadMe.txt
     - copied unchanged from r282803, vendor/ficl/dist/ReadMe.txt
  vendor/ficl/4.1.0/doc/favicon.ico
     - copied unchanged from r282803, vendor/ficl/dist/doc/favicon.ico
  vendor/ficl/4.1.0/doc/ficl.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/ficl.html
  vendor/ficl/4.1.0/doc/index.html
     - copied unchanged from r282803, vendor/ficl/dist/doc/index.html
  vendor/ficl/4.1.0/ficl.dsw
     - copied unchanged from r282803, vendor/ficl/dist/ficl.dsw
  vendor/ficl/4.1.0/ficl.h
     - copied unchanged from r282803, vendor/ficl/dist/ficl.h
  vendor/ficl/4.1.0/fileaccess.c
     - copied unchanged from r282803, vendor/ficl/dist/fileaccess.c
  vendor/ficl/4.1.0/float.c
     - copied unchanged from r282803, vendor/ficl/dist/float.c
  vendor/ficl/4.1.0/prefix.c
     - copied unchanged from r282803, vendor/ficl/dist/prefix.c
  vendor/ficl/4.1.0/search.c
     - copied unchanged from r282803, vendor/ficl/dist/search.c
  vendor/ficl/4.1.0/softcore.c
     - copied unchanged from r282803, vendor/ficl/dist/softcore.c
  vendor/ficl/4.1.0/stack.c
     - copied unchanged from r282803, vendor/ficl/dist/stack.c
  vendor/ficl/4.1.0/test/asm68k.4th
     - copied unchanged from r282803, vendor/ficl/dist/test/asm68k.4th
  vendor/ficl/4.1.0/test/core.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/core.fr
  vendor/ficl/4.1.0/test/fib.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/fib.fr
  vendor/ficl/4.1.0/test/ficltest.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/ficltest.fr
  vendor/ficl/4.1.0/test/ooptest.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/ooptest.fr
  vendor/ficl/4.1.0/test/prefix.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/prefix.fr
  vendor/ficl/4.1.0/test/sarray.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/sarray.fr
  vendor/ficl/4.1.0/test/testcase.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/testcase.fr
  vendor/ficl/4.1.0/test/tester.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/tester.fr
  vendor/ficl/4.1.0/test/vocab.fr
     - copied unchanged from r282803, vendor/ficl/dist/test/vocab.fr
  vendor/ficl/4.1.0/tools.c
     - copied unchanged from r282803, vendor/ficl/dist/tools.c
  vendor/ficl/4.1.0/vm.c
     - copied unchanged from r282803, vendor/ficl/dist/vm.c
Deleted:
  vendor/ficl/4.1.0/dict.c
  vendor/ficl/4.1.0/doc/Logo.jpg
  vendor/ficl/4.1.0/doc/ficl1.ico
  vendor/ficl/4.1.0/doc/ficl_debug.html
  vendor/ficl/4.1.0/doc/ficl_guts.htm
  vendor/ficl/4.1.0/doc/ficl_loc.html
  vendor/ficl/4.1.0/doc/ficl_logo.jpg
  vendor/ficl/4.1.0/doc/ficl_oop.html
  vendor/ficl/4.1.0/doc/ficl_oop.jpg
  vendor/ficl/4.1.0/doc/ficl_parse.html
  vendor/ficl/4.1.0/doc/ficl_rel.html
  vendor/ficl/4.1.0/doc/ficl_top.jpg
  vendor/ficl/4.1.0/doc/ficlddj.PDF
  vendor/ficl/4.1.0/doc/ficlheader.js
  vendor/ficl/4.1.0/doc/jwsforml.PDF
  vendor/ficl/4.1.0/doc/oo_in_c.html
  vendor/ficl/4.1.0/doc/primer.txt
  vendor/ficl/4.1.0/doc/sigplan9906.doc
  vendor/ficl/4.1.0/doc/skey.gif
  vendor/ficl/4.1.0/ficl.c
  vendor/ficl/4.1.0/ficl.dsp
  vendor/ficl/4.1.0/math64.c
  vendor/ficl/4.1.0/math64.h
  vendor/ficl/4.1.0/softwords/
  vendor/ficl/4.1.0/sysdep.c
  vendor/ficl/4.1.0/sysdep.h
  vendor/ficl/4.1.0/testmain.c
  vendor/ficl/4.1.0/unix.c
  vendor/ficl/4.1.0/win32.c
  vendor/ficl/4.1.0/words.c

Copied: vendor/ficl/4.1.0/Makefile (from r282803, vendor/ficl/dist/Makefile)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/Makefile	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/Makefile)
@@ -0,0 +1,60 @@
+OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o
+HEADERS= ficl.h ficlplatform/unix.h
+#
+# Flags for shared library
+#TARGET= -Dlinux  # riscos MOTO_CPU32 
+SHFLAGS = -fPIC
+CFLAGS= -O $(SHFLAGS) -Wall
+CPPFLAGS= $(TARGET) -I.
+CC = cc
+LIB = ar cr
+RANLIB = ranlib
+
+MAJOR = 4
+MINOR = 1.0
+
+ficl: main.o $(HEADERS) libficl.a
+	$(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm
+
+lib: libficl.so.$(MAJOR).$(MINOR)
+
+# static library build
+libficl.a: $(OBJECTS)
+	$(LIB) libficl.a $(OBJECTS)
+	$(RANLIB) libficl.a
+
+# shared library build
+libficl.so.$(MAJOR).$(MINOR): $(OBJECTS)
+	$(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \
+	-o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS)
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so
+
+main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR)
+	$(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR)
+
+# depend explicitly to help finding source files in another subdirectory,
+# and repeat commands since gmake doesn't understand otherwise
+ansi.o: ficlplatform/ansi.c $(HEADERS)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+unix.o: ficlplatform/unix.c $(HEADERS)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+#
+#       generic object code
+#
+.SUFFIXES: .cxx .cc .c .o
+
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cxx.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cc.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+#
+#       generic cleanup code
+#
+clean:
+	rm -f *.o *.a libficl.* ficl

Copied: vendor/ficl/4.1.0/Makefile.ansi (from r282803, vendor/ficl/dist/Makefile.ansi)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/Makefile.ansi	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/Makefile.ansi)
@@ -0,0 +1,56 @@
+OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o ansi.o utility.o hash.o callback.o word.o extras.o
+HEADERS= ficl.h ficlplatform/ansi.h
+#
+# Flags for shared library
+TARGET=  -ansi -DFICL_ANSI  # riscos MOTO_CPU32 
+SHFLAGS = -fPIC
+CFLAGS= -O $(SHFLAGS)
+CPPFLAGS= $(TARGET) -I.
+CC = cc
+LIB = ar cr
+RANLIB = ranlib
+
+MAJOR = 4
+MINOR = 1.0
+
+ficl: main.o $(HEADERS) libficl.a
+	$(CC) main.o -o ficl -L. -lficl -lm
+
+lib: libficl.so.$(MAJOR).$(MINOR)
+
+# static library build
+libficl.a: $(OBJECTS)
+	$(LIB) libficl.a $(OBJECTS)
+	$(RANLIB) libficl.a
+
+# shared library build
+libficl.so.$(MAJOR).$(MINOR): $(OBJECTS)
+	$(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \
+	-o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS)
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so
+
+main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR)
+	$(CC) main.o -o main -L. -lficl -lm
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR)
+
+ansi.o: ficlplatform/ansi.c $(HEADERS)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/ansi.c
+
+#
+#       generic object code
+#
+.SUFFIXES: .cxx .cc .c .o
+
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cxx.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cc.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+#
+#       generic cleanup code
+#
+clean:
+	rm -f *.o *.a libficl.*

Copied: vendor/ficl/4.1.0/Makefile.linux (from r282803, vendor/ficl/dist/Makefile.linux)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/Makefile.linux	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/Makefile.linux)
@@ -0,0 +1,56 @@
+OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o
+HEADERS= ficl.h ficlplatform/unix.h
+#
+# Flags for shared library
+TARGET= -Dlinux  # riscos MOTO_CPU32 
+SHFLAGS = -fPIC
+CFLAGS= -O $(SHFLAGS)
+CPPFLAGS= $(TARGET) -I.
+CC = cc
+LIB = ar cr
+RANLIB = ranlib
+
+MAJOR = 4
+MINOR = 1.0
+
+ficl: main.o $(HEADERS) libficl.a
+	$(CC) main.o -o ficl -L. -lficl -lm
+
+lib: libficl.so.$(MAJOR).$(MINOR)
+
+# static library build
+libficl.a: $(OBJECTS)
+	$(LIB) libficl.a $(OBJECTS)
+	$(RANLIB) libficl.a
+
+# shared library build
+libficl.so.$(MAJOR).$(MINOR): $(OBJECTS)
+	$(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \
+	-o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS)
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so
+
+main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR)
+	$(CC) main.o -o main -L. -lficl -lm
+	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR)
+
+unix.o: ficlplatform/unix.c $(HEADERS)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/unix.c
+
+#
+#       generic object code
+#
+.SUFFIXES: .cxx .cc .c .o
+
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cxx.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.cc.o:
+	$(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+#
+#       generic cleanup code
+#
+clean:
+	rm -f *.o *.a libficl.*

Copied: vendor/ficl/4.1.0/ReadMe.txt (from r282803, vendor/ficl/dist/ReadMe.txt)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/ReadMe.txt	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/ReadMe.txt)
@@ -0,0 +1,53 @@
+FICL 4.1.0
+October 2010
+
+________
+OVERVIEW
+
+Ficl is a complete programming language interpreter designed to be embedded
+into other systems (including firmware based ones) as a command, macro,
+and development prototype language.  Ficl stands for "Forth Inspired
+Command Language".
+
+For more information, please see the "doc" directory.
+For release notes, please see "doc/releases.html".
+
+____________
+INSTALLATION
+
+Ficl builds out-of-the-box on the following platforms:
+	* NetBSD, FreeBSD: use "Makefile".
+	* Linux: use "Makefile.linux", but it should work with
+	  "Makefile" as well.
+	* Win32: use "ficl.dsw" / "ficl.dsp".
+To port to other platforms, we suggest you start with the generic
+"Makefile" and the "unix.c" / "unix.h" platform-specific implementation
+files.  (And please--feel free to submit your portability changes!)
+
+(Note: Ficl used to build under RiscOS, but we broke everything
+for the 4.0 release.  Please fix it and send us the diffs!)
+
+____________
+FICL LICENSE
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+

Copied: vendor/ficl/4.1.0/bit.c (from r282803, vendor/ficl/dist/bit.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/bit.c	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/bit.c)
@@ -0,0 +1,49 @@
+#include "ficl.h"
+
+int ficlBitGet(const unsigned char *bits, size_t index)
+	{
+	int byteIndex = index >> 3;
+	int bitIndex = index & 7;
+	unsigned char mask = (unsigned char)(128 >> bitIndex);
+
+	return ((mask & bits[byteIndex]) ? 1 : 0);
+	}
+
+
+
+void ficlBitSet(unsigned char *bits, size_t index, int value)
+	{
+	int byteIndex = index >> 3;
+	int bitIndex = index & 7;
+	unsigned char mask = (unsigned char)(128 >> bitIndex);
+
+	if (value)
+		bits[byteIndex] |= mask;
+	else
+		bits[byteIndex] &= ~mask;
+	}
+
+
+void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment)
+	{
+	int bit = destAlignment - count;
+	while (count--)
+		ficlBitSet(destination, bit++, ficlBitGet(source, offset++));
+	}
+
+
+/*
+** This will actually work correctly *regardless* of the local architecture.
+** --lch
+**/
+ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number)
+{
+	ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number;
+	return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1]));
+}
+
+ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number)
+{
+	ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number;
+	return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]);
+}

Copied: vendor/ficl/4.1.0/callback.c (from r282803, vendor/ficl/dist/callback.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/callback.c	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/callback.c)
@@ -0,0 +1,76 @@
+#include "ficl.h"
+
+
+extern ficlSystem *ficlSystemGlobal;
+
+/**************************************************************************
+                        f i c l C a l l b a c k T e x t O u t
+** Feeds text to the vm's output callback
+**************************************************************************/
+void ficlCallbackTextOut(ficlCallback *callback, char *text)
+{
+	ficlOutputFunction textOut = NULL;
+
+	if (callback != NULL)
+	{
+		if (callback->textOut != NULL)
+			textOut = callback->textOut;
+		else if ((callback->system != NULL) && (callback != &(callback->system->callback)))
+		{
+			ficlCallbackTextOut(&(callback->system->callback), text);
+			return;
+		}
+	}
+
+	if ((textOut == NULL) && (ficlSystemGlobal != NULL))
+	{
+		callback = &(ficlSystemGlobal->callback);
+		textOut = callback->textOut;
+	}
+	
+	if (textOut == NULL)
+		textOut = ficlCallbackDefaultTextOut;
+
+    (textOut)(callback, text);
+
+    return;
+}
+
+
+/**************************************************************************
+                        f i c l C a l l b a c k E r r o r O u t
+** Feeds text to the vm's error output callback
+**************************************************************************/
+void ficlCallbackErrorOut(ficlCallback *callback, char *text)
+{
+	ficlOutputFunction errorOut = NULL;
+
+	if (callback != NULL)
+	{
+		if (callback->errorOut != NULL)
+			errorOut = callback->errorOut;
+		else if ((callback->system != NULL) && (callback != &(callback->system->callback)))
+		{
+			ficlCallbackErrorOut(&(callback->system->callback), text);
+			return;
+		}
+	}
+
+	if ((errorOut == NULL) && (ficlSystemGlobal != NULL))
+	{
+		callback = &(ficlSystemGlobal->callback);
+		errorOut = callback->errorOut;
+	}
+
+	if (errorOut == NULL)
+	{
+		ficlCallbackTextOut(callback, text);
+		return;
+	}
+
+    (errorOut)(callback, text);
+
+    return;
+}
+
+

Copied: vendor/ficl/4.1.0/compatibility.c (from r282803, vendor/ficl/dist/compatibility.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/compatibility.c	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/compatibility.c)
@@ -0,0 +1,284 @@
+#define FICL_FORCE_COMPATIBILITY 1
+#include "ficl.h"
+
+
+FICL_PLATFORM_EXTERN ficlStack *stackCreate   (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); }
+FICL_PLATFORM_EXTERN void        stackDelete   (ficlStack *stack) { ficlStackDestroy(stack); }
+FICL_PLATFORM_EXTERN int         stackDepth    (ficlStack *stack) { return ficlStackDepth(stack); }
+FICL_PLATFORM_EXTERN void        stackDrop     (ficlStack *stack, int n) { ficlStackDrop(stack, n); }
+FICL_PLATFORM_EXTERN ficlCell    stackFetch    (ficlStack *stack, int n) { return ficlStackFetch(stack, n); }
+FICL_PLATFORM_EXTERN ficlCell    stackGetTop   (ficlStack *stack) { return ficlStackFetch(stack, 0); }
+#if FICL_WANT_LOCALS
+FICL_PLATFORM_EXTERN void        stackLink     (ficlStack *stack, int cells) { ficlStackLink(stack, cells); }
+FICL_PLATFORM_EXTERN void        stackUnlink   (ficlStack *stack) { ficlStackUnlink(stack); }
+#endif /* FICL_WANT_LOCALS */
+FICL_PLATFORM_EXTERN void        stackPick     (ficlStack *stack, int n) { ficlStackPick(stack, n); }
+FICL_PLATFORM_EXTERN ficlCell    stackPop      (ficlStack *stack) { return ficlStackPop(stack); }
+FICL_PLATFORM_EXTERN void       *stackPopPtr   (ficlStack *stack) { return ficlStackPopPointer(stack); }
+FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS   (ficlStack *stack) { return ficlStackPopUnsigned(stack); }
+FICL_PLATFORM_EXTERN ficlInteger stackPopINT   (ficlStack *stack) { return ficlStackPopInteger(stack); }
+FICL_PLATFORM_EXTERN void        stackPush     (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); }
+FICL_PLATFORM_EXTERN void        stackPushPtr  (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); }
+FICL_PLATFORM_EXTERN void        stackPushUNS  (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); }
+FICL_PLATFORM_EXTERN void        stackPushINT  (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); }
+FICL_PLATFORM_EXTERN void        stackReset    (ficlStack *stack) { ficlStackReset(stack); }
+FICL_PLATFORM_EXTERN void        stackRoll     (ficlStack *stack, int n) { ficlStackRoll(stack, n); }
+FICL_PLATFORM_EXTERN void        stackSetTop   (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); }
+FICL_PLATFORM_EXTERN void        stackStore    (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); }
+
+#if (FICL_WANT_FLOAT)
+FICL_PLATFORM_EXTERN ficlFloat   stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); }
+FICL_PLATFORM_EXTERN void        stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); }
+#endif
+
+FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); }
+FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); }
+
+
+FICL_PLATFORM_EXTERN void        vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); }
+FICL_PLATFORM_EXTERN ficlVm     *vmCreate       (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); }
+FICL_PLATFORM_EXTERN void        vmDelete       (ficlVm *vm) { ficlVmDestroy(vm); }
+FICL_PLATFORM_EXTERN void        vmExecute      (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); }
+FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict  (ficlVm *vm) { return ficlVmGetDictionary(vm); }
+FICL_PLATFORM_EXTERN char *      vmGetString    (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); }
+FICL_PLATFORM_EXTERN ficlString  vmGetWord      (ficlVm *vm) { return ficlVmGetWord(vm); }
+FICL_PLATFORM_EXTERN ficlString  vmGetWord0     (ficlVm *vm) { return ficlVmGetWord0(vm); }
+FICL_PLATFORM_EXTERN int         vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); }
+FICL_PLATFORM_EXTERN ficlString  vmParseString  (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); }
+FICL_PLATFORM_EXTERN ficlString  vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); }
+FICL_PLATFORM_EXTERN ficlCell    vmPop          (ficlVm *vm) { return ficlVmPop(vm); }
+FICL_PLATFORM_EXTERN void        vmPush         (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); }
+FICL_PLATFORM_EXTERN void        vmPopIP        (ficlVm *vm) { ficlVmPopIP(vm); }
+FICL_PLATFORM_EXTERN void        vmPushIP       (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); }
+FICL_PLATFORM_EXTERN void        vmQuit         (ficlVm *vm) { ficlVmQuit(vm); }
+FICL_PLATFORM_EXTERN void        vmReset        (ficlVm *vm) { ficlVmReset(vm); }
+FICL_PLATFORM_EXTERN void        vmThrow        (ficlVm *vm, int except) { ficlVmThrow(vm, except); }
+FICL_PLATFORM_EXTERN void        vmThrowErr     (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); }
+
+FICL_PLATFORM_EXTERN void        vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); }
+#if FICL_WANT_FLOAT
+FICL_PLATFORM_EXTERN void        vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); }
+#endif
+
+FICL_PLATFORM_EXTERN void        vmPushTib  (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); }
+FICL_PLATFORM_EXTERN void        vmPopTib   (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); }
+
+FICL_PLATFORM_EXTERN int        isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); }
+
+#if defined(_WIN32)
+/* #SHEESH
+** Why do Microsoft Meatballs insist on contaminating
+** my namespace with their string functions???
+*/
+#pragma warning(disable: 4273)
+#endif
+char       *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); }
+char       *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); }
+char       *strrev( char *string ) { return ficlStringReverse(string); }
+#if defined(_WIN32)
+#pragma warning(default: 4273)
+#endif
+FICL_PLATFORM_EXTERN char        digit_to_char(int value) { return ficlDigitToCharacter(value); }
+FICL_PLATFORM_EXTERN char       *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); }
+FICL_PLATFORM_EXTERN char       *caseFold(char *cp) { return ficlStringCaseFold(cp); }
+FICL_PLATFORM_EXTERN int         strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); }
+
+FICL_PLATFORM_EXTERN void        hashForget    (ficlHash *hash, void *where) { ficlHashForget(hash, where); }
+FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode  (ficlString string) { return ficlHashCode(string); }
+FICL_PLATFORM_EXTERN void        hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); }
+FICL_PLATFORM_EXTERN ficlWord   *hashLookup    (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); }
+FICL_PLATFORM_EXTERN void        hashReset     (ficlHash *hash) { ficlHashReset(hash); }
+
+
+FICL_PLATFORM_EXTERN void       *alignPtr(void *ptr) { return ficlAlignPointer(ptr); }
+FICL_PLATFORM_EXTERN void        dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); }
+FICL_PLATFORM_EXTERN void        dictAlign      (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); }
+FICL_PLATFORM_EXTERN int         dictAllot      (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; }
+FICL_PLATFORM_EXTERN int         dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; }
+FICL_PLATFORM_EXTERN void        dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); }
+FICL_PLATFORM_EXTERN void        dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); }
+FICL_PLATFORM_EXTERN ficlWord   *dictAppendWord (ficlDictionary *dictionary, 
+                           char *name,
+                           ficlPrimitive code,
+                           ficlUnsigned8 flags)
+							{ return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); }
+FICL_PLATFORM_EXTERN ficlWord   *dictAppendWord2(ficlDictionary *dictionary, 
+                           ficlString name,
+                           ficlPrimitive code,
+                           ficlUnsigned8 flags)
+						   { return ficlDictionaryAppendWord(dictionary, name, code, flags); }
+FICL_PLATFORM_EXTERN void        dictAppendUNS  (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); }
+FICL_PLATFORM_EXTERN int         dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); }
+FICL_PLATFORM_EXTERN int         dictCellsUsed  (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); }
+FICL_PLATFORM_EXTERN void        dictCheck      (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); }
+FICL_PLATFORM_EXTERN ficlDictionary  *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); }
+FICL_PLATFORM_EXTERN ficlDictionary  *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); }
+FICL_PLATFORM_EXTERN ficlHash  *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); }
+FICL_PLATFORM_EXTERN void        dictDelete     (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); }
+FICL_PLATFORM_EXTERN void        dictEmpty      (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); }
+#if FICL_WANT_FLOAT
+FICL_PLATFORM_EXTERN  void ficlPrimitiveHashSummary(ficlVm *vm);
+FICL_PLATFORM_EXTERN void        dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); }
+#endif
+FICL_PLATFORM_EXTERN int         dictIncludes   (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); }
+FICL_PLATFORM_EXTERN ficlWord  *dictLookup     (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); }
+#if FICL_WANT_LOCALS
+FICL_PLATFORM_EXTERN ficlWord  *ficlLookupLoc  (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); }
+#endif
+FICL_PLATFORM_EXTERN void        dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); }
+FICL_PLATFORM_EXTERN void        dictSetFlags   (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); }
+FICL_PLATFORM_EXTERN void        dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); }
+FICL_PLATFORM_EXTERN void        dictUnsmudge   (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); }
+FICL_PLATFORM_EXTERN ficlCell   *dictWhere      (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); }
+
+FICL_PLATFORM_EXTERN int  ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); }
+FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); }
+FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm);
+FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); }
+
+FICL_PLATFORM_EXTERN void       ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); }
+FICL_PLATFORM_EXTERN int        ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); }
+FICL_PLATFORM_EXTERN int        ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); }
+FICL_PLATFORM_EXTERN int        ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); }
+FICL_PLATFORM_EXTERN int        ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); }
+FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); }
+
+
+
+
+
+static void thunkTextOut(ficlCallback *callback, char *text)
+	{
+	ficlCompatibilityOutputFunction outputFunction;
+	if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL))
+		outputFunction = callback->system->thunkedTextout;
+	else if (callback->system->thunkedTextout != NULL)
+		outputFunction = callback->system->thunkedTextout;
+	else
+		{
+		ficlCallbackDefaultTextOut(callback, text);
+		return;
+		}
+	ficlCompatibilityTextOutCallback(callback, text, outputFunction);
+	}
+
+
+FICL_PLATFORM_EXTERN void    vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut)
+	{
+	vm->thunkedTextout = textOut;
+	ficlVmSetTextOut(vm, thunkTextOut);
+	}
+
+FICL_PLATFORM_EXTERN void        vmTextOut      (ficlVm *vm, char *text, int fNewline)
+	{
+	ficlVmTextOut(vm, text);
+	if (fNewline)
+		ficlVmTextOut(vm, "\n");
+	}
+
+
+FICL_PLATFORM_EXTERN void        ficlTextOut      (ficlVm *vm, char *text, int fNewline)
+	{
+	vmTextOut(vm, text, fNewline);
+	}
+
+extern ficlSystem *ficlSystemGlobal;
+static defaultStackSize = FICL_DEFAULT_STACK_SIZE;
+FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells)
+{
+	if (defaultStackSize < nStackCells)
+		defaultStackSize = nStackCells;
+	if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells))
+		ficlSystemGlobal->stackSize = nStackCells;
+	return defaultStackSize;
+}
+
+
+FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi)
+{
+	ficlSystem *returnValue;
+	ficlCompatibilityOutputFunction thunkedTextout;
+	ficlSystemInformation clone;
+
+	memcpy(&clone, fsi, sizeof(clone));
+	thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut;
+	clone.textOut = clone.errorOut = thunkTextOut;
+
+	returnValue = ficlSystemCreate(&clone);
+	if (returnValue != NULL)
+	{
+		returnValue->thunkedTextout = thunkedTextout;
+	}
+	return returnValue;
+}
+
+
+FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells)
+{
+	ficlSystemInformation fsi;
+	ficlSystemInformationInitialize(&fsi);
+	fsi.dictionarySize = nDictCells;
+	if (fsi.stackSize < defaultStackSize)
+		fsi.stackSize = defaultStackSize;
+	return ficlSystemCreate(&fsi);
+}
+
+
+
+
+FICL_PLATFORM_EXTERN ficlVm    *ficlNewVM(ficlSystem *system)
+{
+	ficlVm *returnValue = ficlSystemCreateVm(system);
+	if (returnValue != NULL)
+	{
+		if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut))
+		{
+			returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut;
+			returnValue->callback.textOut = thunkTextOut;
+		}
+		if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut))
+		{
+			if (returnValue->thunkedTextout == NULL)
+				returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut;
+			returnValue->callback.errorOut = thunkTextOut;
+		}
+	}
+	return returnValue;
+}
+
+
+
+FICL_PLATFORM_EXTERN ficlWord  *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); }
+FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); }
+FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); }
+FICL_PLATFORM_EXTERN void       ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); }
+FICL_PLATFORM_EXTERN void       ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value);  ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); }
+#if FICL_WANT_LOCALS
+FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); }
+#endif
+FICL_PLATFORM_EXTERN int        ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; }
+FICL_PLATFORM_EXTERN void       ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); }
+FICL_PLATFORM_EXTERN void       ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); }
+FICL_PLATFORM_EXTERN void       ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); }
+FICL_PLATFORM_EXTERN void       ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); }
+FICL_PLATFORM_EXTERN void       ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); }
+FICL_PLATFORM_EXTERN void       ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); }
+#if FICL_WANT_FLOAT
+FICL_PLATFORM_EXTERN void       ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); }
+FICL_PLATFORM_EXTERN int        ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); }
+#endif
+#if FICL_WANT_PLATFORM
+FICL_PLATFORM_EXTERN void       ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); }
+#endif
+FICL_PLATFORM_EXTERN int        ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); }
+
+FICL_PLATFORM_EXTERN int        ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); }
+FICL_PLATFORM_EXTERN void       ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); }
+FICL_PLATFORM_EXTERN void       parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); }
+
+FICL_PLATFORM_EXTERN int        isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); }
+
+
+FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); }
+
+

Copied: vendor/ficl/4.1.0/dictionary.c (from r282803, vendor/ficl/dist/dictionary.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ficl/4.1.0/dictionary.c	Tue May 12 03:29:50 2015	(r282804, copy of r282803, vendor/ficl/dist/dictionary.c)
@@ -0,0 +1,851 @@
+/*******************************************************************
+** d i c t . c
+** Forth Inspired Command Language - dictionary methods
+** Author: John Sadler (john_sadler@alum.mit.edu)
+** Created: 19 July 1997
+** $Id: dictionary.c,v 1.2 2010/09/12 15:14:52 asau Exp $
+*******************************************************************/
+/*
+** This file implements the dictionary -- Ficl's model of 
+** memory management. All Ficl words are stored in the
+** dictionary. A word is a named chunk of data with its
+** associated code. Ficl treats all words the same, even
+** precompiled ones, so your words become first-class
+** extensions of the language. You can even define new 
+** control structures.
+**
+** 29 jun 1998 (sadler) added variable sized hash table support
+*/
+/*
+** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu)
+** All rights reserved.
+**
+** Get the latest Ficl release at http://ficl.sourceforge.net
+**
+** I am interested in hearing from anyone who uses Ficl. If you have
+** a problem, a success story, a defect, an enhancement request, or
+** if you would like to contribute to the Ficl release, please
+** contact me by email at the address above.
+**
+** L I C E N S E  and  D I S C L A I M E R
+** 
+** Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions
+** are met:
+** 1. Redistributions of source code must retain the above copyright
+**    notice, this list of conditions and the following disclaimer.
+** 2. Redistributions in binary form must reproduce the above copyright
+**    notice, this list of conditions and the following disclaimer in the
+**    documentation and/or other materials provided with the distribution.
+**
+** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+** ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+** SUCH DAMAGE.
+*/
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ficl.h"
+
+#define FICL_SAFE_CALLBACK_FROM_SYSTEM(system)  (((system) != NULL) ? &((system)->callback) : NULL)
+#define FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary)  (((dictionary) != NULL) ? (dictionary)->system : NULL)
+#define FICL_DICTIONARY_ASSERT(dictionary, expression) FICL_SYSTEM_ASSERT(FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary), expression)
+
+/**************************************************************************
+                        d i c t A b o r t D e f i n i t i o n
+** Abort a definition in process: reclaim its memory and unlink it
+** from the dictionary list. Assumes that there is a smudged 
+** definition in process...otherwise does nothing.
+** NOTE: this function is not smart enough to unlink a word that
+** has been successfully defined (ie linked into a hash). It
+** only works for defs in process. If the def has been unsmudged,
+** nothing happens.
+**************************************************************************/
+void ficlDictionaryAbortDefinition(ficlDictionary *dictionary)
+{
+    ficlWord *word;
+    ficlDictionaryLock(dictionary, FICL_TRUE);
+    word = dictionary->smudge;
+
+    if (word->flags & FICL_WORD_SMUDGED)
+        dictionary->here = (ficlCell *)word->name;
+
+    ficlDictionaryLock(dictionary, FICL_FALSE);
+    return;
+}
+
+
+/**************************************************************************
+                        d i c t A l i g n
+** Align the dictionary's free space pointer
+**************************************************************************/
+void ficlDictionaryAlign(ficlDictionary *dictionary)
+{
+    dictionary->here = ficlAlignPointer(dictionary->here);
+}
+
+
+/**************************************************************************
+                        d i c t A l l o t
+** Allocate or remove n chars of dictionary space, with
+** checks for underrun and overrun
+**************************************************************************/
+void ficlDictionaryAllot(ficlDictionary *dictionary, int n)
+{
+    char *here = (char *)dictionary->here;
+    here += n;
+    dictionary->here = FICL_POINTER_TO_CELL(here);
+}
+
+
+/**************************************************************************
+                        d i c t A l l o t C e l l s
+** Reserve space for the requested number of ficlCells in the
+** dictionary. If nficlCells < 0 , removes space from the dictionary.
+**************************************************************************/
+void ficlDictionaryAllotCells(ficlDictionary *dictionary, int nficlCells)
+{
+    dictionary->here += nficlCells;
+}
+
+
+/**************************************************************************
+                        d i c t A p p e n d C e l l
+** Append the specified ficlCell to the dictionary
+**************************************************************************/
+void ficlDictionaryAppendCell(ficlDictionary *dictionary, ficlCell c)
+{
+    *dictionary->here++ = c;
+    return;
+}
+
+
+/**************************************************************************
+                        d i c t A p p e n d C h a r
+** Append the specified char to the dictionary
+**************************************************************************/
+void ficlDictionaryAppendCharacter(ficlDictionary *dictionary, char c)
+{
+    char *here = (char *)dictionary->here;
+    *here++ = c;
+    dictionary->here = FICL_POINTER_TO_CELL(here);
+    return;
+}
+
+
+/**************************************************************************
+                        d i c t A p p e n d U N S
+** Append the specified ficlUnsigned to the dictionary
+**************************************************************************/
+void ficlDictionaryAppendUnsigned(ficlDictionary *dictionary, ficlUnsigned u)
+{
+    *dictionary->here++ = FICL_LVALUE_TO_CELL(u);
+    return;
+}
+
+
+void *ficlDictionaryAppendData(ficlDictionary *dictionary, void *data, ficlInteger length)
+{
+    char *here    = (char *)dictionary->here;
+    char *oldHere = here;
+	char *from    = (char *)data;
+ 
+    if (length == 0)
+    {
+        ficlDictionaryAlign(dictionary);
+        return (char *)dictionary->here;
+    }
+
+    while (length)
+    {
+        *here++ = *from++;
+		length--;
+    }
+
+    *here++ = '\0';
+
+    dictionary->here = FICL_POINTER_TO_CELL(here);
+    ficlDictionaryAlign(dictionary);
+    return oldHere;
+}
+
+
+/**************************************************************************
+                        d i c t C o p y N a m e
+** Copy up to FICL_NAME_LENGTH characters of the name specified by s into
+** the dictionary starting at "here", then NULL-terminate the name,
+** point "here" to the next available byte, and return the address of
+** the beginning of the name. Used by dictAppendWord.
+** N O T E S :
+** 1. "here" is guaranteed to be aligned after this operation.
+** 2. If the string has zero length, align and return "here"
+**************************************************************************/
+char *ficlDictionaryAppendString(ficlDictionary *dictionary, ficlString s)
+{
+	void *data = FICL_STRING_GET_POINTER(s);
+	ficlInteger length = FICL_STRING_GET_LENGTH(s);
+
+    if (length > FICL_NAME_LENGTH)
+        length = FICL_NAME_LENGTH;
+    
+	return ficlDictionaryAppendData(dictionary, data, length);
+}
+
+
+ficlWord *ficlDictionaryAppendConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value)
+{
+	ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT);
+	if (word != NULL)
+		ficlDictionaryAppendUnsigned(dictionary, value);
+	return word;
+}
+
+
+ficlWord *ficlDictionaryAppend2ConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficl2Integer value)
+{
+	ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT);
+	if (word != NULL)
+	{
+	    ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_HIGH(value));
+		ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_LOW(value));
+	}
+	return word;
+}
+
+
+
+ficlWord *ficlDictionaryAppendConstant(ficlDictionary *dictionary, char *name, ficlInteger value)
+{
+    ficlString s;
+	FICL_STRING_SET_FROM_CSTRING(s, name);
+	return ficlDictionaryAppendConstantInstruction(dictionary, s, ficlInstructionConstantParen, value);
+}
+
+
+
+ficlWord *ficlDictionaryAppend2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value)
+{
+    ficlString s;
+	FICL_STRING_SET_FROM_CSTRING(s, name);
+	return ficlDictionaryAppend2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value);
+}
+
+
+
+ficlWord *ficlDictionarySetConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value)
+{
+    ficlWord *word = ficlDictionaryLookup(dictionary, name);
+
+    if (word == NULL)
+    {
+        word = ficlDictionaryAppendConstantInstruction(dictionary, name, instruction, value);
+    }
+    else
+    {
+		word->code = (ficlPrimitive)instruction;
+        word->param[0] = FICL_LVALUE_TO_CELL(value);
+    }
+    return word;
+}
+
+ficlWord *ficlDictionarySetConstant(ficlDictionary *dictionary, char *name, ficlInteger value)
+{
+    ficlString s;
+    FICL_STRING_SET_FROM_CSTRING(s, name);
+    return ficlDictionarySetConstantInstruction(dictionary, s, ficlInstructionConstantParen, value);
+}
+
+ficlWord *ficlDictionarySet2ConstantInstruction(ficlDictionary *dictionary, ficlString s, ficlInstruction instruction, ficl2Integer value)
+{
+    ficlWord *word;
+    word = ficlDictionaryLookup(dictionary, s);
+
+	/* only reuse the existing word if we're sure it has space for a 2constant */
+    if ((word != NULL) &&
+		((((ficlInstruction)word->code) == ficlInstruction2ConstantParen)
+#if FICL_WANT_FLOAT
+		  ||
+		(((ficlInstruction)word->code) == ficlInstructionF2ConstantParen)
+#endif /* FICL_WANT_FLOAT */
+		)
+		)
+    {
+		word->code = (ficlPrimitive)instruction;
+        word->param[0].u = FICL_2UNSIGNED_GET_HIGH(value);
+        word->param[1].u = FICL_2UNSIGNED_GET_LOW(value);
+    }
+    else
+    {
+        word = ficlDictionaryAppend2ConstantInstruction(dictionary, s, instruction, value);
+    }
+
+    return word;
+}
+
+
+ficlWord *ficlDictionarySet2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value)
+{
+    ficlString s;
+    FICL_STRING_SET_FROM_CSTRING(s, name);
+    return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value);
+}
+
+
+ficlWord *ficlDictionarySetConstantString(ficlDictionary *dictionary, char *name, char *value)
+{
+    ficlString s;
+    ficl2Integer valueAs2Integer;
+    FICL_2INTEGER_SET(strlen(value), (intptr_t)value, valueAs2Integer);
+    FICL_STRING_SET_FROM_CSTRING(s, name);
+
+	return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, valueAs2Integer);
+}
+
+
+
+/**************************************************************************
+                        d i c t A p p e n d W o r d
+** Create a new word in the dictionary with the specified
+** ficlString, code, and flags. Does not require a NULL-terminated
+** name.
+**************************************************************************/
+ficlWord *ficlDictionaryAppendWord(ficlDictionary *dictionary, 
+                           ficlString name, 
+                           ficlPrimitive code,
+                           ficlUnsigned8 flags)
+{
+    ficlUnsigned8 length  = (ficlUnsigned8)FICL_STRING_GET_LENGTH(name);
+    char *nameCopy;
+    ficlWord *word;
+
+    ficlDictionaryLock(dictionary, FICL_TRUE);
+
+    /*
+    ** NOTE: ficlDictionaryAppendString advances "here" as a side-effect.
+    ** It must execute before word is initialized.
+    */
+    nameCopy       = ficlDictionaryAppendString(dictionary, name);
+    word           = (ficlWord *)dictionary->here;
+    dictionary->smudge = word;
+    word->hash     = ficlHashCode(name);
+    word->code     = code;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505120329.t4C3Topf071873>