]>
git.gag.com Git - debian/pforth/log
Phil Burk [Fri, 25 Nov 2022 15:57:04 +0000 (07:57 -0800)]
Add VERSION_CODE and print normal version
This will make pForth more consistent with other packages
that use version names like "2.0.0"
Fixes #99
Phil Burk [Sun, 1 Jan 2023 00:23:57 +0000 (16:23 -0800)]
Zero initialize BYE-CODE (#139)
Phil Burk [Sun, 1 Jan 2023 00:04:57 +0000 (16:04 -0800)]
Return error code from tests (#137)
Use new BYE-CODE to pass an error back to the shell.
Use test tools for t_alloc.fth
Fixes #82
Phil Burk [Mon, 12 Dec 2022 01:18:58 +0000 (17:18 -0800)]
Change tests for S" (#133)
Fixes #81
Phil Burk [Mon, 12 Dec 2022 00:40:06 +0000 (16:40 -0800)]
Add CR to tick (#132)
Fixes #126
Phil Burk [Mon, 5 Dec 2022 15:58:51 +0000 (07:58 -0800)]
Add ANS structure support (#128)
BEGIN-STRUCTURE and END-STRUCTURE
+FIELD FIELD: and CFIELD:
FFIELD: for float members
Phil Burk [Sun, 4 Dec 2022 21:25:39 +0000 (13:25 -0800)]
Add [DEFINED] and [UNDEFINED] (#127)
Also add tests.
Fixes #111
Phil Burk [Sun, 27 Nov 2022 22:01:46 +0000 (14:01 -0800)]
Implement (MSEC) using usleep() (#125)
Use Sleep() on Windows.
Need platform specific code for embedded systems.
Check to see is (SLEEP) is implemented.
If not then use old busy loop code.
Fixes #112
Phil Burk [Sun, 27 Nov 2022 20:02:22 +0000 (12:02 -0800)]
Update release notes (#124)
Move releases.txt to RELEASES.md
Phil Burk [Sun, 27 Nov 2022 19:36:00 +0000 (11:36 -0800)]
Delete readme.txt
Use README.md instead.
Phil Burk [Sun, 27 Nov 2022 19:28:23 +0000 (11:28 -0800)]
tweak README
Phil Burk [Sun, 27 Nov 2022 19:25:27 +0000 (11:25 -0800)]
Updated README with better build info
Moved readme.txt to README.md
Phil Burk [Sun, 27 Nov 2022 18:40:18 +0000 (10:40 -0800)]
Change True to true in Makefile (#123)
It was failing on Linux.
Phil Burk [Sat, 26 Nov 2022 17:46:59 +0000 (09:46 -0800)]
Makefile now handles spaces in the path (#122)
Use quotes, not spaces.
Fixes #121
Phil Burk [Fri, 25 Nov 2022 23:46:08 +0000 (15:46 -0800)]
Avoid including csrc/pfdicdat.h (#120)
Remove pfdicdat_arm.h
Fixes #119
Phil Burk [Thu, 17 Nov 2022 19:26:51 +0000 (19:26 +0000)]
WORDS no longer shows SMUDGED words
Phil Burk [Thu, 17 Nov 2022 19:37:45 +0000 (19:37 +0000)]
Add pforthdic Makefile target
This will allow quicker testing without
generating the standalone image.
make clean pforthdic
jpellegrini [Mon, 4 Apr 2022 00:23:55 +0000 (21:23 -0300)]
Make sure terminal output is unbuffered on POSIX systems (#110)
Call setvbuf on terminal initialization in
csrc/posix/pf_io_posix.c. At least on one platform (OpenWRT),
pForth was buffering the characters while the user typed,
instead of echoing them immediately; this fixes that issue.
Fixes #109
Fixes #87
Phil Burk [Mon, 21 Feb 2022 19:56:46 +0000 (12:56 -0700)]
Add MAP.FILENAME for HMSL ASSIGNS (#108)
Allow filename remapping in $INCLUDE
Phil Burk [Mon, 29 Nov 2021 02:19:49 +0000 (19:19 -0700)]
add s\" (#105)
This ANS word was missing.
Use ANS reference implementation.
Fixes #95
Phil Burk [Mon, 29 Nov 2021 01:01:37 +0000 (18:01 -0700)]
test: show test output (#104)
Also test t_locals.fth and t_alloc.fth
Phil Burk [Mon, 29 Nov 2021 00:30:01 +0000 (17:30 -0700)]
Add GitHub Action to build and test (#102)
Fixes #97
Phil Burk [Sun, 31 Oct 2021 23:51:04 +0000 (16:51 -0700)]
pforth: fix FROUND (#101)
It used to push the result to the integer data stack.
That was wrong. It should go to the float stack.
Fixes #69
Phil Burk [Sun, 31 Oct 2021 23:42:57 +0000 (16:42 -0700)]
cmake: add float support (#100)
Phil Burk [Sun, 31 Oct 2021 23:13:08 +0000 (16:13 -0700)]
cmake: add cmake support (#92)
Support builds on Linux and MacOS.
Needs testing on Windows.
See CMakeLists.txt for instructions.
Builds:
* fth/pforth
* fth/pforth.dic
* fth/pforth_standalone
Based on a contribution from Robin Rowe.
cmake .
make
Max Barraclough [Sun, 14 Mar 2021 21:12:36 +0000 (21:12 +0000)]
Add definition of 2CONSTANT
Part of DOUBLE NUMBER word set.
Phil Burk [Sun, 21 Feb 2021 20:18:05 +0000 (12:18 -0800)]
move build folder to platforms
Update Travis and README
Phil Burk [Sun, 21 Feb 2021 17:52:11 +0000 (09:52 -0800)]
csrc: fix stack diagram for BIN
Fixes #89
Tim Gates [Mon, 28 Dec 2020 00:52:25 +0000 (11:52 +1100)]
docs: fix simple typo, complier -> compiler
There is a small typo in csrc/pfcompil.c.
Should read `compiler` rather than `complier`.
Phil Burk [Sun, 13 Sep 2020 21:06:55 +0000 (14:06 -0700)]
Merge pull request #75 from SeekingMeaning/0BSD
relicense to 0BSD
Phil Burk [Sun, 13 Sep 2020 20:36:19 +0000 (13:36 -0700)]
Merge pull request #80 from letoh/use-pattern-rules
use pattern rules instead of suffix rules in the Makefile
Phil Burk [Sun, 13 Sep 2020 19:50:46 +0000 (12:50 -0700)]
Merge pull request #79 from philburk/fix20
Simplify VALUE
Phil Burk [Sun, 13 Sep 2020 00:47:13 +0000 (17:47 -0700)]
test the compile time behavior of a VALUE
From 2012 test suite.
letoh [Wed, 9 Sep 2020 07:30:29 +0000 (15:30 +0800)]
use pattern rules instead of suffix rules in the Makefile
Both the two suffix rules in current Makefile include prerequisites, so a make
with POSIX mode enabled will treat them as rules to build two normal files with
strange names (.c.o and .c.eo), rather than create pattern rules implicitly.
According to the release note from make 4.3, the POSIX behavior will be adopted
as the only behavior in a future release, so use the pattern rules instead.
Phil Burk [Sun, 6 Sep 2020 01:25:27 +0000 (18:25 -0700)]
Simplify VALUE
Now it does not produce an IMMEDIATE word.
This allows it to pass some standard tests.
Fixes #20
Phil Burk [Sat, 5 Sep 2020 00:16:20 +0000 (17:16 -0700)]
Merge pull request #77 from philburk/privatize
Add PRIVATIZE to history.fth
Phil Burk [Sat, 5 Sep 2020 00:10:27 +0000 (17:10 -0700)]
Add PRIVATIZE to history.fth
This will hide the internal words for HISTORY.
Also added some error checks to detect when we forget to call PRIVATIZE.
Fixes #54
Seeker [Thu, 2 Jul 2020 22:08:11 +0000 (15:08 -0700)]
relicense to 0BSD
Phil Burk [Thu, 13 Feb 2020 14:56:14 +0000 (06:56 -0800)]
Merge pull request #71 from frankpolte/master
fixes mixed declarations and code warning
Frank Polte [Thu, 13 Feb 2020 09:39:41 +0000 (10:39 +0100)]
fixes mixed declarations and code
../../csrc/pfcompil.c:1161:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1161 | ThrowCode throwCode;
| ^~~~~~~~~
Phil Burk [Tue, 5 Nov 2019 16:36:40 +0000 (08:36 -0800)]
Merge pull request #70 from philburk/ignoreds
gitignore DS_Store and pforth.dic
Phil Burk [Tue, 5 Nov 2019 16:35:18 +0000 (08:35 -0800)]
gitignore DS_Store and pforth.dic
Phil Burk [Thu, 4 Jul 2019 21:15:34 +0000 (14:15 -0700)]
Merge pull request #66 from robdaemon/ataritos
Adding Atari TOS support
Robert Roland [Thu, 4 Jul 2019 05:10:06 +0000 (22:10 -0700)]
Adding Atari TOS support
Adding a simple Makefile based on the Amiga Makefile to use VBCC to compile for Atari TOS.
In the Amiga and Atari Makefile, I made a small change to ensure the LDFLAGS (-lm) end up at the end of the link command, otherwise they will fail
Phil Burk [Sat, 15 Jun 2019 19:31:58 +0000 (12:31 -0700)]
Merge pull request #64 from stutonk/header_size_fix
Correct definition of PF_DEFAULT_HEADER_SIZE
stutonk [Thu, 13 Jun 2019 10:21:35 +0000 (06:21 -0400)]
Correct definition of PF_DEFAULT_HEADER_SIZE
Phil Burk [Wed, 29 May 2019 00:18:18 +0000 (17:18 -0700)]
Merge pull request #63 from philburk/removedebug
c_struct: remove debug statements
Phil Burk [Wed, 29 May 2019 00:16:34 +0000 (17:16 -0700)]
c_struct: remove debug statements
Phil Burk [Mon, 27 May 2019 14:09:06 +0000 (07:09 -0700)]
Merge pull request #62 from philburk/codesize
pforth: allow header and code size to be controlled
Phil Burk [Mon, 27 May 2019 14:03:10 +0000 (07:03 -0700)]
pforth: allow header and code size to be controlled
Header and code size can now be set at compile time by defining
PF_DEFAULT_HEADER_SIZE or PF_DEFAULT_CODE_SIZE.
Size is in bytes.
Phil Burk [Sun, 26 May 2019 14:08:16 +0000 (07:08 -0700)]
Merge pull request #61 from philburk/docansi
history: document ANSI escape sequences used
Phil Burk [Sun, 26 May 2019 14:06:03 +0000 (07:06 -0700)]
history: document ANSI escape sequences used
Phil Burk [Sat, 25 May 2019 23:24:13 +0000 (16:24 -0700)]
Merge pull request #60 from philburk/usefromjuce
Use from juce
Phil Burk [Sat, 25 May 2019 23:21:25 +0000 (16:21 -0700)]
hmsl: support EOT to force BYE
Force Forth to exit when an ASCII EOT character is received.
Also fix some indentation.
Phil Burk [Mon, 20 May 2019 01:22:04 +0000 (18:22 -0700)]
pforth: use extern "C" for IO functions
So we can implement them in C++.
Phil Burk [Sun, 19 May 2019 22:32:45 +0000 (15:32 -0700)]
Merge pull request #59 from philburk/build64
pforth: improve 64-bit support
Phil Burk [Sun, 19 May 2019 21:55:10 +0000 (14:55 -0700)]
Merge branch 'master' into build64
Phil Burk [Sun, 19 May 2019 21:42:53 +0000 (14:42 -0700)]
pforth: improve 64-bit support
Use CELL instead of 4 in various places.
Fix broken members in c_struct.fth
Phil Burk [Thu, 3 May 2018 03:40:21 +0000 (20:40 -0700)]
Merge pull request #50 from linuxuser27/win64_warnings
Windows and 64-bit
arr [Wed, 2 May 2018 05:39:55 +0000 (22:39 -0700)]
Review feedback on types
Removed some tabs
arr [Sat, 28 Apr 2018 07:18:03 +0000 (00:18 -0700)]
The MSVC x86_64 compiler defines long as 32-bits.
This means '1L' is 32-bits and a 62 bit shift on a 32-bit
value is UB which resulted in a 0 for the FP_DHI1 value.
arr [Sat, 28 Apr 2018 07:02:02 +0000 (00:02 -0700)]
Address various compiler warnings about precision loss
arr [Sat, 28 Apr 2018 07:00:39 +0000 (00:00 -0700)]
Update VS solution to support 64-bit build
Phil Burk [Wed, 25 Apr 2018 04:32:07 +0000 (21:32 -0700)]
Merge pull request #49 from philburk/v28
Bump to V28
Phil Burk [Wed, 25 Apr 2018 04:28:37 +0000 (21:28 -0700)]
fix date
Phil Burk [Wed, 25 Apr 2018 04:24:18 +0000 (21:24 -0700)]
Bump to V28
Update README
Phil Burk [Wed, 25 Apr 2018 03:53:16 +0000 (20:53 -0700)]
Merge pull request #48 from philburk/fixbye
Add CR to BYE
Phil Burk [Wed, 25 Apr 2018 03:51:23 +0000 (20:51 -0700)]
Add CR to BYE
Phil Burk [Wed, 25 Apr 2018 03:44:55 +0000 (20:44 -0700)]
Merge pull request #47 from philburk/ignorevs
Delete Windows vs2005 build because the git repo was corrupted.
Phil Burk [Wed, 25 Apr 2018 03:40:44 +0000 (20:40 -0700)]
Delete Windows vs2005 build because the git repo was corrupted.
Phil Burk [Wed, 25 Apr 2018 03:24:33 +0000 (20:24 -0700)]
Merge pull request #44 from philburk/fix_11_off_t
Replace off_t with file_offset_t
Phil Burk [Tue, 24 Apr 2018 04:03:17 +0000 (21:03 -0700)]
Make FILE-SIZE more consistent with FILE-POSITION.
Phil Burk [Sun, 22 Apr 2018 18:16:20 +0000 (11:16 -0700)]
pforth: use long for off_t
Check for attempt to use position values that are too large.
Remove use of fseeko() and ftello().
Phil Burk [Sun, 15 Apr 2018 19:41:33 +0000 (12:41 -0700)]
Merge pull request #45 from linuxuser27/support2017
Support VS 2017
arr [Sun, 15 Apr 2018 19:25:36 +0000 (12:25 -0700)]
Address compiler warnings
arr [Sun, 15 Apr 2018 19:25:06 +0000 (12:25 -0700)]
Add support for vs2017 and update .gitignore to ignore vs cruft
Phil Burk [Sun, 25 Mar 2018 21:28:34 +0000 (14:28 -0700)]
Replace off_t with file_offset_t
Define as long for compatibility with stdio.h
Phil Burk [Sun, 18 Mar 2018 23:36:39 +0000 (16:36 -0700)]
Merge pull request #43 from philburk/ticket_39_qm
added ? word as a convenience
Phil Burk [Sun, 18 Mar 2018 23:33:32 +0000 (16:33 -0700)]
added ? word as a convenience
Fixes #39
Phil Burk [Sat, 17 Mar 2018 19:36:14 +0000 (12:36 -0700)]
Merge pull request #41 from letoh/fix-linux-build-2
Fixes #40: add _DEFAULT_SOURCE back for Linux build
letoh [Mon, 12 Mar 2018 14:25:58 +0000 (22:25 +0800)]
Fixes #40: add _DEFAULT_SOURCE back for Linux build
This commit fixes the improper patch in the pull request #7.
When building pforth on the Linux system with glibc version before
2.19, defining _GNU_SOURCE is needed for using ECHOCTL in the
source. However, the later version of glibc uses _DEFAULT_SOURCE
instead of _GNU_SOURCE for the same purpose, we will need both symbols
for both older glibc and newer glibc.
Phil Burk [Mon, 16 Jan 2017 04:28:45 +0000 (20:28 -0800)]
Merge pull request #36 from ellerh/resize-file-limit
This introduces a RESIZE-FILE-LIMIT
Phil Burk [Thu, 12 Jan 2017 17:37:44 +0000 (09:37 -0800)]
Merge pull request #35 from ellerh/implement-require
Implement REQUIRE (Forth 2012)
Phil Burk [Thu, 12 Jan 2017 17:36:35 +0000 (09:36 -0800)]
Merge pull request #34 from ellerh/implement-file-status
Implement FILE-STATUS
Helmut Eller [Sun, 8 Jan 2017 21:07:38 +0000 (22:07 +0100)]
Rename files t_required-helperX to t_required_helperX
* fth/t_file.fth: Use new filenames.
Helmut Eller [Sun, 8 Jan 2017 20:55:00 +0000 (21:55 +0100)]
Consistently return x=0.
* fth/file.fth (FILE-STATUS): Explicity return 0 instead of some
unspecified fileid.
Helmut Eller [Sun, 8 Jan 2017 20:27:28 +0000 (21:27 +0100)]
This introduces a RESIZE-FILE-LIMIT
The intention is to protect the user from a presumably common mistake:
passing the size as single cell number instead of a double cell
number. This would create a very big file that is written in many
small chunks.
I also changed sdResizeFile to use uint64_t instead of Lo/Hi pairs.
* csrc/pfcompil.c (pfBuildDictionary): Rename RESIZE-FILE
to (RESIZE-FILE).
* fth/file.fth (RESIZE-FILE-LIMIT): New variable.
(RESIZE-FILE): Use it.
* fth/system.fth (D<, D>): Implemented. Needed for compare the limit.
* csrc/pf_io.h, csrc/pf_io.c (sdResizeFile): Use uint64_t.
* csrc/stdio/pf_fileio_stdio.c (sdResizeFile): Use uint64_t.
(IsGreaterThanLongMax): Deleted.
* csrc/pf_inner.c (ID_FILE_RESIZE): Convert the Lo/Hi pair to uint64_t.
(UdToUint64, UdIsUint64): New helpers.
Helmut Eller [Thu, 5 Jan 2017 15:24:03 +0000 (16:24 +0100)]
Simplify
* fth/require.fth (INCLUDED?): What was I thinking? Just use FIND
instead of exotic stuff like FINDNFA.FROM.
* fth/loadp4th.fth: Restore filefind.fth to its original position.
Helmut Eller [Wed, 4 Jan 2017 10:11:14 +0000 (11:11 +0100)]
Implement REQUIRE (Forth 2012)
This turned out to be simpler than I had thought, as we can use the
::::<filename> 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.
Helmut Eller [Tue, 3 Jan 2017 21:13:53 +0000 (22:13 +0100)]
Implement FILE-STATUS
This implements FILE-STATUS on top of OPEN-FILE: FILE-STATUS succeeds
if we can open the file in read-only mode. This way we avoid adding
yet another primitive.
* fth/file.fth (FILE-STATUS): New
* fth/t_file.fth (FILE-STATUS): Delete stub
Phil Burk [Thu, 5 Jan 2017 02:32:48 +0000 (18:32 -0800)]
Merge pull request #33 from ellerh/implement-resize-file
Implement RESIZE-FILE
Phil Burk [Wed, 4 Jan 2017 02:50:40 +0000 (18:50 -0800)]
Merge pull request #32 from ellerh/multi-line-comment
Add support for multi-line ( comments
Helmut Eller [Tue, 3 Jan 2017 09:31:36 +0000 (10:31 +0100)]
Implement RESIZE-FILE
On Unix, the easiest way to implement RESIZE-FILE would be to call
ftruncate, but in ANSI C alone it's quite difficult. As this takes a
bit more code, I created a new file pf_fileio_stdio.c and moved it
there. The idea is that somebody could replace that with say a
pf_fileio_posix.c and use ftruncate there.
Because there's a new file I had to change the Makefiles. I did not
fix the VisualStudio project file, as I don't know how to do that.
* csrc/stdio/pf_fileio_stdio.c: New file.
* csrc/pf_guts.h (cforth_primitive_ids): ID_FILE_RESIZE added,
ID_RESERVED10 removed.
(THROW_RESIZE_FILE): New.
* csrc/pf_io.h (sdResizeFile): New prototype.
* csrc/pf_io.c (sdResizeFile): Define stub,
(sdDeleteFile): Fix type.
* csrc/pf_inner.c (pfCatch): Add case for ID_FILE_RESIZE.
* csrc/pfcompil.c (pfBuildDictionary): Define RESIZE-FILE.
* build/unix/Makefile,
build/linux-crossbuild-amiga/Makefile
build/mingw-crossbuild-linux/Makefile: Compile and link with pf_fileio_stdio.
* fth/t_file.fth: Remove stub.
Helmut Eller [Tue, 3 Jan 2017 07:20:06 +0000 (08:20 +0100)]
Minor tweaks
Helmut Eller [Mon, 2 Jan 2017 11:33:55 +0000 (12:33 +0100)]
Add support for multi-line ( comments
* fth/file.fth ((): Redefine.
(MULTI-LINE-COMMENT): New helper.
* fth/t_file.fth: Uncomment test for multi line comments.
Phil Burk [Mon, 2 Jan 2017 21:00:44 +0000 (13:00 -0800)]
Merge pull request #31 from ellerh/implement-rename-file
Implement RENAME-FILE
Helmut Eller [Mon, 2 Jan 2017 20:44:41 +0000 (21:44 +0100)]
Improvements from review
* csrc/pf_io.c (sdRenameFile): Return cell_t as per prototype.
* fth/file.fth (THROW_RENAME_FILE): Add link to standard throw codes.
(PLACE-CSTR): New factor.
(RENAME-FILE): Use it.
Helmut Eller [Mon, 2 Jan 2017 18:28:25 +0000 (19:28 +0100)]
Implement RENAME-FILE
This introduces a primitive (RENAME-FILE) which takes C-strings as
arguments. The conversion from Forth-strings to C-strings is done in
Forth code as it doesn't seem to be any easier to do it in C.
* csrc/pf_io.h (sdRenameFile): New. It has the same semantics as
rename(2) from <stdio.h>
* csrc/pf_io.c (sdRenameFile): New stub.
* csrc/pf_guts.h (cforth_primitive_ids): ID_FILE_RENAME added,
ID_RESERVED12 removed
* csrc/pf_inner.c: Add case for ID_FILE_RENAME.
* csrc/pfcompil.c (pfBuildDictionary): Create entry for (RENAME-FILE).
* fth/file.fth (RENAME-FILE): New.
(THROW_RENAME_FILE): New constant.
* fth/t_file.fth: Remove stub and uncomment some tests.
Phil Burk [Mon, 2 Jan 2017 16:28:10 +0000 (08:28 -0800)]
Merge pull request #30 from ellerh/implement-flush-file
Implement FLUSH-FILE
Phil Burk [Mon, 2 Jan 2017 16:25:03 +0000 (08:25 -0800)]
Merge pull request #29 from ellerh/fix-save-input
Fix SAVE-INPUT