From: Helmut Eller Date: Wed, 4 Jan 2017 10:11:14 +0000 (+0100) Subject: Implement REQUIRE (Forth 2012) X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/5a30561336c83c45b348c1dc59fb9dc4dd15237c?hp=5a30561336c83c45b348c1dc59fb9dc4dd15237c Implement REQUIRE (Forth 2012) This turned out to be simpler than I had thought, as we can use the :::: marker to detected already included files. * fth/require.fth: New file * fth/loadp4th.fth: Load it. As REQUIRE uses FINDNFA.FROM, the file filefind.fth is no longer optional. * fth/system.fth (INCLUDE.MARK.START): Allocate a temporary buffer for the string. PAD was problematic because the interpreter versions of S" and C" also write to PAD, so something like C" foo.fth" $INCLUDE would created the marker "::::::::". Despite that, no standard words should write to PAD. Of course, neither S" and C" should use PAD. That's a problem for another day. * fth/t_file.fth: Restore tests for REQUIRE. * fth/t_required-helper1.fth, fth/t_required-helper2.fth: Files needed for tests. ---