git @ Cat's Eye Technologies Befunge-93 / 7ce2a0a
Bump version numbers of these programs, add history and credits. Chris Pressey 3 years ago
2 changed file(s) with 19 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
00 /********************************************************************
11
22 bef2c.c - Befunge-93 to ANSI C Compiler in ANSI C
3 v0.94 Sep 20 2004 Chris Pressey, Cat's-Eye Technologies
4
5 Copyright (c)1997-2012, Chris Pressey, Cat's Eye Technologies.
3
4 Copyright (c)1997-2018, Chris Pressey, Cat's Eye Technologies.
65 All rights reserved.
76
87 Redistribution and use in source and binary forms, with or without
4847 Known to Compile Under :
4948
5049 Borland C++ v3.1 (DOS)
50 gcc 5.4.0 (Ubuntu 16.04)
5151
5252 History:
53
54 v1.0: circa Jun 2018
55 fixes submitted by https://github.com/serprex (thanks!):
56 - avoid double free due to double fclose
57 - handle trampoline at leftmost/topmost edges
58 - don't load NULs into playfield
59 - use %% instead of %c with '%' being passed in
60 - avoid freeing fo/fi on failure to open
5361
5462 v0.94: Sep 2004, Chris Pressey
5563 display correct version number
135143
136144 srand (time (0));
137145
138 printf ("Befunge-93 to ANSI C Compiler v0.94\n");
146 printf ("Befunge-93 to ANSI C Compiler v1.0\n");
139147
140148 if (argc < 3)
141149 {
00 /********************************************************************
11
22 befprof.c - Befunge-93 Profiler
3 v0.94 Sep 20 2004 Chris Pressey, Cat's-Eye Technologies
4
5 Copyright (c)1998-2012, Chris Pressey, Cat's Eye Technologies.
3
4 Copyright (c)1998-2018, Chris Pressey, Cat's Eye Technologies.
65 All rights reserved.
76
87 Redistribution and use in source and binary forms, with or without
5554 so too many repetitions may cause them to wrap back to 0.
5655
5756 ******************************************************************
57
58 v1.0: circa Jun 2018
59 handle trampoline at leftmost/topmost edges
60 (thanks to https://github.com/serprex for this fix!)
5861
5962 v0.94: Sep 2004, Chris Pressey
6063 cleanup only, no functional changes
210213 if (!strcmp(argv[i], "-w")) { strcpy(mapfilename, argv[i + 1]); }
211214 }
212215
213 printf ("Befunge-93 Profiler v0.94\n");
216 printf ("Befunge-93 Profiler v1.0\n");
214217
215218 if ((f = fopen (filename, "r")) != NULL) /*** Input Phase */
216219 {