New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 2.24. #12

Merged
merged 41 commits into from Sep 13, 2018
Commits
Jump to file or symbol
Failed to load files and symbols.
+238 −96
Diff settings

Always

Just for now

View
@@ -1,3 +1,4 @@
_UAEFSDB.___
bin/bef
bin/befprof
bin/bef2c
View
@@ -1,5 +1,6 @@
syntax: glob
_UAEFSDB.___
bin/bef
bin/befprof
bin/bef2c
View
@@ -0,0 +1,33 @@
# NMAKE Makefile for bef.
PROGS=bin\bef.exe bin\befprof.exe bin\bef2c.exe
CC=cl
O=.obj
RM_F=del
WARNS= -Wall -wd4820 -wd4131 -wd4459 -wd4242 -wd4244 -wd4996 \
-wd4668 -wd4255 -wd4710 -wd4706 -wd4702 -wd4711 -wd4456 -wd5045
CFLAGS=$(CFLAGS) -Ox -nologo
CFLAGS=$(CFLAGS) $(WARNS) $(EXTRA_CFLAGS)
!ifdef DEBUG
CFLAGS=$(CFLAGS) -Zi
!endif
all: $(PROGS)
bin\bef.exe: src\bef.c
$(CC) $(CFLAGS) src\bef.c -Fe:bin\bef
bin\befprof.exe: src\befprof.c
$(CC) $(CFLAGS) src\befprof.c -Fe:bin\befprof
bin\bef2c.exe: src\bef2c.c
$(CC) $(CFLAGS) src\bef2c.c -Fe:bin\bef2c
clean:
$(RM_F) *$(O) src\*$(O)
distclean:
$(RM_F) $(PROGS)
View
@@ -1,9 +1,10 @@
Welcome to the NEW Befunge-93 Reference Distribution
====================================================
Welcome to the Befunge-93 Reference Distribution
================================================
Since `bef` is a reference implementation (so far as it goes) of Befunge-93,
we saw fit to once again combine the specification and implementation into a
single distribution.
This is the reference distribution for the Befunge-93 programming language.
It contains the specification and reference implementation (`bef`), which
are direct descendants of the originals, along with a few related tools and
many example programs.
About Befunge-93
----------------
@@ -21,19 +22,20 @@ Contents
* `README.markdown`: these post-modernist existential rants
* `LICENSE`: a bedtime story written to give your lawyer sweet dreams
* `doc/Befunge-93.markdown`: the specification for Befunge-93, such as it is
* `src/bef.c`: Befunge-93 reference interpreter/debugger v2.23 source code
* `src/bef2c.c`: Befunge-93 to ANSI C compiler v0.94 source code
* `src/befprof.c`: Befunge-93 profiler v0.94 source code
* `src/bef.c`: Befunge-93 reference interpreter/debugger v2.24 source code
* `src/bef2c.c`: Befunge-93 to ANSI C compiler v1.0 source code
* `src/befprof.c`: Befunge-93 profiler v1.0 source code
* `eg/*`: Various and sundry contributed Befunge-93 programs
For More Information
--------------------
See Cat's Eye Technologies' official [Befunge-93 Project Page][].
See the official entry for [Befunge-93][] at [Cat's Eye Technologies][].

This comment has been minimized.

@j4james

j4james Sep 14, 2018

I'm not sure if this is too late to fix, but this link text change to Befunge-93 has caused the link to break.

@j4james

j4james Sep 14, 2018

I'm not sure if this is too late to fix, but this link text change to Befunge-93 has caused the link to break.

This comment has been minimized.

@cpressey

cpressey Sep 17, 2018

Member

Thanks. Too late to make it into the official release I guess, but I've fixed it on master which is where most people are going to see it anyway (and anyone reading the README locally as a text file is surely smart enough to figure out what URL to paste into their browser.)

@cpressey

cpressey Sep 17, 2018

Member

Thanks. Too late to make it into the official release I guess, but I've fixed it on master which is where most people are going to see it anyway (and anyone reading the README locally as a text file is surely smart enough to figure out what URL to paste into their browser.)

[Befunge-93 Project Page]: http://catseye.tc/projects/befunge93/
[Befunge-93 Project Page]: http://catseye.tc/node/Befunge-93
[Cat's Eye Technologies]: http://catseye.tc/
Happy Befunging!
Chris Pressey
Winnipeg, Manitoba
August 25, 2012
London, England
September 13, 2018
View
@@ -0,0 +1,10 @@
@echo off
rem --------------------------------------------------------------
rem Batchfile that compiles the bef sources under Borland C++ 3.1.
rem Uses "large" memory model for befprof b/c it uses >64K data.
rem --------------------------------------------------------------
@echo on
bcc -ebin\bef.exe src\bef.c
bcc -ml -ebin\befprof.exe src\befprof.c
bcc -ebin\bef2c.exe src\bef2c.c
View
@@ -0,0 +1,12 @@
;
; To build the Befunge-93 reference executables using DICE C
; under AmigaDOS 1.3, you can either run
;
; protect build.seq srwd
; build.seq
;
; or you can simply type the following commands into the shell:
;
dcc src/bef.c -o bin/bef
dcc src/befprof.c -o bin/befprof
;dcc src/bef2c.c -o bin/bef2c ; DICE C can't handle this one.
View
@@ -1,9 +1,9 @@
/* ******************************************************************
bef.c - The Original Befunge-93 Interpreter/Debugger in ANSI C
v2.23-and-then-some-TODO-describe-the-changes-then-bump-this
v2.24
Copyright (c)1993-2015, Chris Pressey, Cat's Eye Technologies.
Copyright (c)1993-2018, Chris Pressey, Cat's Eye Technologies.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -39,12 +39,13 @@
Usage :
bef [-d] [-o] [-q] [-i] [-=] [-l] [-t]
bef [-d] [-o] [-u] [-q] [-i] [-=] [-l] [-t]
[-r input-file] [-w output-file]
[-s stack-file] [-y delay] <befunge-source>
-d: visual ANSI debugging display
-o: do not fix off-by-one error (for old sources)
-u: & on error or EOF is undefined, not -1 (backwards compat)
-q: produce no output except Befunge program output ('quiet')
-i: ignore unsupported instructions
-=: use b97-ish = directives
@@ -55,13 +56,30 @@
-s: write contents of stack to log file
-y: specify debugging delay in milliseconds
Compiles Under:
Known to Compile Under :
Borland C++ v3.1 (16-bit MS-DOS)
DJGPP v2.952 (32-bit Protected-Mode MS-DOS)
gcc 5.4.0 (Ubuntu 16.04)
gcc 4.5.3 (NetBSD 6.1.5)
DICE C 3.15 (AmigaDOS 1.3)
DJGPP 2.05 gcc 8.1.0 (32-bit Protected-Mode, FreeDOS 1.1)
Borland C++ v3.1 (16-bit, FreeDOS 1.1)
Microsoft Visual C++ 14.15 (see NMakefile)
Has, in the Past, been Known to Compile Under:
Metrowerks CodeWarrior (MacOS)
******************************************************************
History:
v2.24: Sep 2018, Chris Pressey
when & encounters an error or EOF condition it pushes
-1 onto the stack instead of an undefined value;
added -u option to retain old behaviour in this case
(thanks to James Holderness for noticing and suggesting)
support for compiling with MSVC (also by James Holderness)
v2.23: Aug 2012, Chris Pressey
delay given with -y now actually happens when compiled
with compilers other than Borland C++; it's implemented
@@ -86,7 +104,7 @@
v2.20, Jul 2000, Chris Pressey
prettied up preprocessor directives a bit
added defines for Metroworks CodeWarrior
added defines for Metrowerks CodeWarrior
so that bef will build on MacOS
relicensed under BSD
@@ -123,6 +141,7 @@
v2.00: Jun 1997, Chris Pressey
combines interpreter and debugger.
fixes ANSI error in debugger.
v1.02: Feb 1996, Chris Pressey
@ now pushes '@' onto the stack in stringmode instead of quitting.
@@ -160,6 +179,9 @@
# include <console.h>
# define CONSOLE 1
#endif /* __MWERKS__ */
#ifdef _MSC_VER
# define sleep(s) _sleep(1000 * s)
#endif /* _MSC_VER */
/********************************************************** #DEFINE'S */
@@ -192,6 +214,7 @@ int stackfile = 0, sa; /* flag : use stack log file, & assoc arg? */
int stringmode = 0; /* flag : are we in string mode? */
int quiet = 0; /* flag : are we quiet? */
int v10err_compat = 0; /* flag : emulate v1.0 off-by-one err? */
int undef_input_int = 0; /* flag : undefined value on "&" err/EOF? */
int deldur = 25; /* debugging delay in milliseconds */
int ignore_unsupported = 0; /* flag : ignore unsupported instructions? */
int use_b97directives = 0; /* flag : use b97-esque directives? */
@@ -233,6 +256,7 @@ int main (argc, argv)
{
if (argv[i][0] == '-') {
if (!strcmp(argv[i], "-o")) { v10err_compat = 1; }
else if (!strcmp(argv[i], "-u")) { undef_input_int = 1; }
else if (!strcmp(argv[i], "-d")) { debug = 1; }
else if (!strcmp(argv[i], "-r")) { infile = 1; ia = i + 1; }
else if (!strcmp(argv[i], "-w")) { outfile = 1; oa = i + 1; }
@@ -252,7 +276,7 @@ int main (argc, argv)
}
if (!quiet)
{
printf ("Befunge-93 Interpreter/Debugger v2.23\n");
printf ("Befunge-93 Interpreter/Debugger v2.24\n");
}
memset(pg, ' ', LINEWIDTH * PAGEHEIGHT);
@@ -661,6 +685,9 @@ int main (argc, argv)
case '&': /* Input Integer */
{
signed long b;
if (!undef_input_int) {
b = -1;
}
if (infile)
{
fscanf (fi, "%ld", &b);
@@ -677,6 +704,9 @@ int main (argc, argv)
int x, y;
long int p;
char t[172];
if (!undef_input_int) {
p = -1;
}
x = wherex();
y = wherey();
gettext(10, DEBUGROW, 80, DEBUGROW, t);
@@ -905,7 +935,7 @@ signed long pop ()
void usage ()
{
printf ("USAGE: bef [-d] [-o] [-q] [-i] [-=] [-l] [-t]\n");
printf ("USAGE: bef [-d] [-o] [-u] [-q] [-i] [-=] [-l] [-t]\n");
printf (" [-r input] [-w output] [-s stack] [-y delay] foo.bf\n");
exit (1);
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.