Commit graph

1908 commits

Author SHA1 Message Date
David Given 391cb0f2cd Fix checkin into wrong hg branch.
--HG--
branch : default-branch
2016-03-17 20:53:45 +01:00
David Given 863b610144 Fix use-after-free. 2016-03-17 20:52:27 +01:00
David Given ff0c78cc78 Merge from default.
--HG--
branch : dtrg-videocore-branch-branch
2016-03-13 21:13:09 +01:00
David Given 3d5e72e20b Newer versions of GNU Make have a new function which collides with a
variable we're using; change the name of the variable.
2015-03-22 12:09:46 +01:00
David Given d94c1c8150 Updated distr files.
--HG--
branch : dtrg-videocore
rename : mach/i80/.distr => mach/vc4/.distr
rename : plat/cpm/.distr => plat/rpi/.distr
2013-06-21 23:38:21 +01:00
David Given 55be35a68a Add a stub malloc.h.
--HG--
branch : dtrg-videocore
rename : lang/cem/libcc.ansi/headers/stdlib.h => lang/cem/libcc.ansi/headers/malloc.h
2013-06-20 00:15:14 +01:00
David Given d273497077 Add some missing libc functions: setenv, unsetenv, strdup.
--HG--
rename : lang/cem/libcc.ansi/stdlib/getenv.c => lang/cem/libcc.ansi/stdlib/setenv.c
rename : lang/cem/libcc.ansi/string/strlen.c => lang/cem/libcc.ansi/string/strdup.c
extra : source : 64d6e6eec18d76bf8f3947ec5d171db94acdb282
2013-05-29 21:41:58 +01:00
David Given 074b42aa97 Add some missing libc functions: setenv, unsetenv, strdup.
--HG--
branch : dtrg-videocore
rename : lang/cem/libcc.ansi/stdlib/getenv.c => lang/cem/libcc.ansi/stdlib/setenv.c
rename : lang/cem/libcc.ansi/string/strlen.c => lang/cem/libcc.ansi/string/strdup.c
2013-05-29 21:41:58 +01:00
David Given f522aba4af Add support for snprintf and vsnprintf. Try and make the return value a bit
more standards-compliant.

--HG--
extra : source : a19eb606871f918e3d9e195b487b5276855edc8e
2013-05-29 17:10:58 +01:00
David Given 69953d016c Add support for snprintf and vsnprintf. Try and make the return value a bit
more standards-compliant.

--HG--
branch : dtrg-videocore
2013-05-29 17:10:58 +01:00
David Given d3e3e72860 Update from trunk.
--HG--
branch : dtrg-videocore
2013-05-29 15:03:48 +01:00
David Given 98e745d04c Fix awful bug where uint32_t was sometimes defined as a short.
--HG--
branch : dtrg-videocore
2013-05-25 00:33:01 +01:00
David Given c18a82ec40 Apply build system fixes for OpenBSD contributed by George Koehler. 2013-05-18 12:15:53 +01:00
David Given 9a513e8ef3 Fix warning. 2013-05-17 00:04:54 +01:00
David Given 11377070fd Update distribution files.
--HG--
branch : dtrg-buildsystem
2013-05-15 23:46:15 +01:00
David Given f6c43b95ef Modula-2 now works.
--HG--
branch : dtrg-buildsystem
rename : lang/pc/build.mk => lang/m2/build.mk
rename : lang/pc/libpc/build.mk => lang/m2/comp/build.mk
rename : lang/pc/libpc/build.mk => lang/m2/libm2/build.mk
2013-05-14 22:24:38 +01:00
David Given 66aebcdd91 Pascal compiler now runs.
--HG--
branch : dtrg-buildsystem
rename : lang/basic/build.mk => lang/pc/build.mk
rename : lang/cem/cemcom.ansi/build.mk => lang/pc/comp/build.mk
rename : lang/basic/lib/build.mk => lang/pc/libpc/build.mk
2013-05-14 20:47:04 +01:00
David Given a6ebaeabd0 Basic compiler now runs.
--HG--
branch : dtrg-buildsystem
2013-05-14 18:01:38 +01:00
David Given d5f0107746 Build the Basic run-time library (after some modernisation).
--HG--
branch : dtrg-buildsystem
2013-05-14 16:11:29 +01:00
David Given 07453d184a Top, topgen, aelflod. Moved the libraries back into the platform-specific
directories --- wrangling descr files was too hard. C programs can be built
for cpm, pc86, linux386, linux68k!

--HG--
branch : dtrg-buildsystem
rename : util/ack/build.mk => util/led/build.mk
rename : util/LLgen/build.mk => util/topgen/build.mk
2013-05-13 23:26:15 +01:00
David Given af0dedeb6e Fix typo.
--HG--
branch : dtrg-buildsystem
2013-05-13 11:14:10 +01:00
David Given b0c238eb5d Made a start on building the runtimes for each platform and language; the
Linuxes all build.

--HG--
branch : dtrg-buildsystem
rename : modules/src/em_mes/build.mk => modules/src/read_em/build.mk
rename : plat/pc86/build.mk => plat/linux386/build.mk
rename : plat/pc86/build.mk => plat/linux68k/build.mk
rename : plat/pc86/build.mk => plat/linuxppc/build.mk
rename : util/ack/build.mk => util/misc/build.mk
2013-05-12 23:51:55 +01:00
David Given c1aca7dae5 First milestone of replacing the build system.
--HG--
branch : dtrg-buildsystem
rename : lang/cem/cpp.ansi/Parameters => lang/cem/cpp.ansi/parameters.h
2013-05-12 20:45:55 +01:00
George Koehler 7ef9b79c11 Merge deletion of many undead files. 2012-09-23 15:31:16 -04:00
George Koehler 0131ca4d46 Delete 689 undead files.
These files "magically reappeared" after the conversion from CVS to
Mercurial.  The old CVS repository deleted these files but did not
record *when* it deleted these files.  The conversion resurrected these
files because they have no history of deletion.  These files were
probably deleted before year 1995.  The CVS repository begins to record
deletions around 1995.

These files may still appear in older revisions of this Mercurial
repository, when they should already be deleted.  There is no way to fix
this, because the CVS repository provides no dates of deletion.

See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
2012-09-20 22:26:32 -04:00
George Koehler 800d4ae032 Fix cemcom.ansi for 64-bit hosts.
Hosts with sizeof(arith) == sizeof(long) == 8 need to set full_mask[1]
through full_mask[8].  Because MAXSIZE == 8, we only had full_mask[0]
through full_mask[7].  This fix declares arith full_mask[MAXSIZE + 1]
and prevents a fatal error: "array full_mask too small for this machine"
2012-09-07 15:53:13 -04:00
dtrg 45ee287136 Replaced dis and new with modern implementations donated by erik@backerud.se. 2010-10-02 21:52:29 +00:00
dtrg 075cb488a3 Call the correct kill() and getpid() syscalls rather than _kill() and _getpid(). 2010-10-02 21:51:40 +00:00
dtrg a33473e0a5 Now call creat() and open() instead of _creat() and _open(). 2010-09-27 20:47:32 +00:00
dtrg a8ecb11013 Fixed very old bug where Streams.GetStreamPosition would return the wrong position --- thanks to Jan Verhoeven for finding this. 2010-09-01 19:55:15 +00:00
dtrg 51b41f72f8 Invoke genfiles explicitly with sh --- CVS doesn't store executable bits. 2010-08-01 10:35:33 +00:00
dtrg 54ce3f451b Configured distr system for the 6.0pre3 release. 2007-04-29 23:09:24 +00:00
dtrg 9d0f0a8fdd Disabled the code to throw signals on EM traps; this is the platform's job (and requires working signal support, which we may not have). 2007-04-29 20:46:48 +00:00
dtrg 013f58f94e Added the stdint.h header file. 2007-04-27 22:42:02 +00:00
dtrg 0d8578410c Cleaned up and enabled the support for conditionally emitting the floating-point stdio code. 2007-04-27 22:41:39 +00:00
dtrg 7f266d6b4e Removed a completely pointless 128-byte buffer. 2007-04-27 22:41:05 +00:00
dtrg 24ea8aee3d Updated for the 6.0pre2 release. 2007-04-24 20:45:58 +00:00
dtrg bfeb736c35 Stripped down the library to something approaching the ANSI C minimum and replaced most of the header files, to provide a reasonably consistent base to work up from. 2007-04-24 19:42:24 +00:00
dtrg 1c83baa702 Adapted for ANSI C and our pseudo-Posix syscall interface. 2007-04-21 23:18:14 +00:00
dtrg b66d66b597 Fixed a bug where the preprocessor would occasionally lose whitespace at the beginning of lines immediately after a #endif, which was confusing the assembler. 2007-04-21 23:10:13 +00:00
dtrg 2a367fa192 Disabled Terminal as it uses hard-coded ioctls and appears to be non-standard anyway. 2007-04-21 23:07:57 +00:00
dtrg f4e37e1319 Changed to call the isatty() syscall directly, rather than fiddling around with non-portable ioctls. 2007-04-21 23:07:05 +00:00
dtrg d77b4ce97c Renamed the language libraries and runtimes to have more
conventional names.
2007-02-26 22:36:56 +00:00
cvs2hg 2d80c1d2c8 fixup commit for tag 'release-6-0-pre-1' 2007-02-25 22:49:23 +00:00
dtrg b611731ec3 Updated .distr files for the new release. 2007-02-25 12:51:55 +00:00
dtrg f05f9de3ed Moved sys/timeb.h from include/_tail_mon. 2007-02-25 12:44:13 +00:00
dtrg 5c5f711cbb Done a major overhaul of the way target include files are installed and
how platform libraries are built. The ARCH pm variable has now been
renamed PLATFORM (which is more accurate) and a different ARCH
variable added, which represents the CPU family rather than the
hardware platform.
2007-02-20 00:46:10 +00:00
dtrg 39689a4de9 Tweaked to allow _ as a leading character in identifier names (if
use of underscores in identifiers has been turned on).
2007-02-20 00:40:00 +00:00
dtrg e4292486a3 Added some missing #includes. 2007-02-20 00:38:49 +00:00
dtrg 08431edbdb Now uses fd 0 instead of trying to explicitly open /dev/tty. 2007-02-20 00:38:13 +00:00
dtrg 611bc73043 Changed to no longer include /usr/include by default. 2007-02-20 00:36:15 +00:00
dtrg f9ddb860a9 Fixed some reentrant comments. 2007-02-20 00:35:37 +00:00
dtrg dbe10d2c19 Updated to the version 0.1 of Prime Mover (which involves some syntax changes). 2006-10-15 00:28:12 +00:00
dtrg 708a83ef22 ack expects the tail_ libraries not to have the .a extension. 2006-07-30 23:45:48 +00:00
dtrg 606012371e Added support for the ANSI C language runtime and preprocessor. 2006-07-30 23:45:18 +00:00
dtrg 45b4fef7d6 Rationalised use of #includes to be more standards-compliant. 2006-07-30 23:40:35 +00:00
dtrg d3b557e0db Adjusted to only check the module name against the leaf of the filename, to prevent unnecessary warnings if the source file isn't in the current directory. 2006-07-30 23:38:41 +00:00
dtrg 67733b9d3c Added the correct shell script magic. (Some platforms insist on this.) 2006-07-30 23:37:15 +00:00
dtrg c1725577a7 Worked around a mysterious preprocessor oddness causing some
crucial whitespace to be removed.
2006-07-30 23:36:19 +00:00
dtrg 7826e03427 Added support for the K&R C language runtime. 2006-07-27 22:51:38 +00:00
dtrg c5acfe7919 Added support for the Modula-2 language runtime. 2006-07-27 22:14:55 +00:00
dtrg 5a8968ae4f Added support for the Pascal language runtime. 2006-07-27 22:07:38 +00:00
dtrg f3a9a3bc40 Added support for the Basic and Occam language runtimes. 2006-07-27 21:58:13 +00:00
dtrg d29b1ef7d0 Added support for the Basic compiler. 2006-07-26 23:08:09 +00:00
dtrg 1caa63775f Rationalised use of #includes to be more standards-compliant. 2006-07-26 23:06:56 +00:00
dtrg 4c65324e11 Adjusted to allow the path of the Lpars.h file to be given on the
command line.
2006-07-26 23:05:52 +00:00
dtrg 2cfb9afac8 Added support for the Occam compiler. 2006-07-26 18:23:32 +00:00
dtrg 30e34f493f Rationalised use of #includes to be more standards-compliant. 2006-07-26 18:22:02 +00:00
dtrg 4fd0f0dba4 Renamed em.h to occam-em.h to avoid a clash with an ACK module
header file.
2006-07-26 18:20:38 +00:00
dtrg c65c560acd Tweaked the CVS settings. 2006-07-26 18:19:15 +00:00
dtrg 2d2ee38770 Added support for the Modula-2 compiler. 2006-07-26 17:12:19 +00:00
dtrg 26b17074a1 Rationalised use of #includes to be more standards-compliant. 2006-07-26 17:10:30 +00:00
dtrg 8558656665 Now avoids piping shell scripts into a new instance of sh, instead
using a subshell.
2006-07-26 12:29:47 +00:00
dtrg 014be56fb0 Replaced calls to the custom strindex() and strrindex() functions with the
exactly equivalent and standard strchr() and strrchr() functions instead.
2006-07-23 20:01:02 +00:00
dtrg f1386f3aa5 Added support for the Pascal compiler. 2006-07-22 21:03:07 +00:00
dtrg 2dbc112117 Rationalised use of #includes to be more standards-compliant. 2006-07-22 21:01:15 +00:00
dtrg 097c640a6c First version in CVS. 2006-07-20 23:24:28 +00:00
dtrg b6757337b3 Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 2006-07-19 10:30:26 +00:00
dtrg e859ef2491 Rationalised use of #includes to be more standards-compliant. 2006-07-19 10:28:43 +00:00
dtrg 4cb0ab8a63 Rationalised use of #includes to be more standards-compliant. 2006-07-18 18:05:47 +00:00
dtrg 454bdae81f Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 2006-07-18 16:45:57 +00:00
cvs2hg 5cb054f106 fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
dtrg e0846f63be Removed duplicate and inconsistent function declarations. 2005-06-25 15:52:19 +00:00
dtrg 9bc8c07deb Replaced references to /usr/tmp with references to /tmp. 2005-06-24 22:08:47 +00:00
ceriel df46c5e165 Fix for union initializers 2001-07-03 10:10:56 +00:00
ceriel 910316cfde Fix: parameter name same as function name not dealt with properly 2001-07-03 08:55:16 +00:00
ceriel 91cb060d10 Replaced a couple of UnGetChar calls with ChPushBack calls. The
UnGetChar call is wrong after skipspaces().
1998-02-09 09:49:00 +00:00
ceriel 4ec7d8bf7f Bug fix: copied wrong size to destination in structure returns 1997-07-01 08:33:13 +00:00
ceriel 6db931eee6 Link em_data.a as well (needed when producing readable EM 1997-04-01 13:58:58 +00:00
ceriel 2382ef1a27 Additions for non-correcting error recovery 1997-02-21 17:22:42 +00:00
ceriel 99ac23b4b4 Additions for non-correcting error recovery 1997-02-21 17:11:04 +00:00
ceriel ae0cde301d Bug fix: conversion is OK if arg = 0.0 1997-01-27 14:06:51 +00:00
ceriel 63e0b36b41 renamed _len to _length: conflict with name in minix lib 1996-11-26 15:02:36 +00:00
ceriel 322c1c1b4c Some fixes 1996-11-19 09:12:36 +00:00
ceriel efacd02ffd Added LONGCARD as a local extension 1996-08-14 07:42:40 +00:00
ceriel 1592c3638c Moved TryToString call into ChkAssCompat 1996-06-06 07:47:00 +00:00
ceriel 7f7f5f187f Fix: compatibility check in RETURN statement 1996-06-06 07:37:02 +00:00
ceriel 6ec3dd7ebd fix in flushbuf: make sure it does not return EOF when it actually succeeds 1996-04-24 13:06:00 +00:00
ceriel 73b54a2326 fixed bug with %[] in doscan.c 1996-04-01 09:08:59 +00:00
ceriel 3895a59e03 Fix to fix in idf.c 1996-02-19 12:19:47 +00:00
ceriel 67cb729554 Fixed bug: crashed when parameter has same name as function 1995-12-20 09:58:56 +00:00
ceriel d0288b673b Some improvements 1995-12-19 09:30:48 +00:00
ceriel 7442852cad Removed unclear test 1995-12-18 11:02:18 +00:00
ceriel e5894e0f5a removed 1995-12-06 13:28:04 +00:00
ceriel 6576498776 removed MakeVersion 1995-12-06 13:26:54 +00:00
ceriel d224889b8d removed Makefile 1995-12-06 13:26:03 +00:00
ceriel a6ea80436b removed Makefile, added README 1995-12-06 13:25:23 +00:00
ceriel 0ea8200a57 added file 1995-12-06 13:23:09 +00:00
ceriel 4a5e3f42d3 removed 1995-12-06 13:21:54 +00:00
ceriel 550095a5d0 Removed Version.c 1995-12-06 09:52:54 +00:00
ceriel 0a643bb9d0 Improved the pow() function to give more exact results 1995-12-05 12:29:36 +00:00
ceriel 812b6f2158 Fixed obscure bug in setvbuf 1995-12-04 17:11:54 +00:00
ceriel 6d39052c12 Corrected nested function info 1995-12-04 16:42:11 +00:00
ceriel d4abf57904 Fixed warnings, recognize -gdb 1995-12-04 15:29:42 +00:00
ceriel a9df108116 Made to work; how did this get into the repository??? 1995-12-04 15:20:46 +00:00
ceriel c97f79454d Fixed a bug with local character arrays initialized with a string 1995-11-15 09:42:25 +00:00
ceriel 4565576021 Fixed bug with labels 1995-11-07 10:37:59 +00:00
ceriel 0bf45ac757 Get() parameter is optional 1995-11-01 16:54:17 +00:00
ceriel 29e457c381 Fix by Charles Lindsey 1995-09-25 08:09:55 +00:00
ceriel 4c73887050 use stdarg when compiling with ANSI C compiler 1995-08-17 16:51:09 +00:00
ceriel 7b207deeb7 use stdarg when compiling with ANSI C compiler 1995-08-17 16:43:36 +00:00
ceriel 53eb117563 use stdarg when compiling with ANSI C compiler 1995-08-17 16:34:29 +00:00
ceriel 0dc2d5a625 use stdarg when compiling with ANSI C compiler 1995-08-17 16:14:45 +00:00
ceriel b7396a7cd4 use stdarg when compiling with ANSI C compiler 1995-08-17 15:20:35 +00:00
ceriel 0509996f7f use stdarg when compiling with ANSI C compiler 1995-08-17 15:01:56 +00:00
ceriel e41c75c1bc Some minor changes 1995-08-17 10:03:43 +00:00
ceriel 65cd309c08 'ed -' is no longer supported by some systems. Use 'ed -s' 1995-08-15 08:43:10 +00:00
ceriel c833d93d2d Some fixes 1995-06-12 14:28:36 +00:00
ceriel a0bd098f98 Fix: got into infinite loop 1995-05-02 12:23:28 +00:00
ceriel 15d2949b88 Fix: opaque types my only be defined in the CORRESPONDING implementation 1995-04-26 13:54:56 +00:00
ceriel 5edfb9eccf Fix: had a semicolon too much (KJB) 1995-04-18 13:56:20 +00:00
ceriel f069cba449 Made arith_sign more portable 1995-03-28 09:10:31 +00:00
ceriel 86cb2d66d7 Fixed: % and / were interchanged 1995-03-27 11:46:47 +00:00
ceriel d801356f1e Fixed typo 1995-03-27 11:22:57 +00:00
ceriel bcb4a75630 free WorkingDir only if including cpp 1995-03-24 13:56:20 +00:00
ceriel 0ae5288ab7 Fix for membership test with constant LHS 1994-12-20 16:00:57 +00:00
ceriel e10145ba2e exit with erno+1, because otherwise exit status is 0 with array bound error 1994-11-14 11:51:24 +00:00
ceriel e441b2f658 disabled a warning 1994-11-01 11:45:23 +00:00
ceriel c7b707c266 SkipToNewLine() fixed: did not work with a / at the end of a line 1994-10-28 15:26:36 +00:00
ceriel 8061bab6a9 removed warning and fixed two problems:
- remove_def was wrong, and parameter defs should not be removed at the
  end of a scope
1994-10-27 14:57:48 +00:00
ceriel d992ed4935 mark file parameters as used in reads/writes 1994-10-25 15:41:59 +00:00
ceriel 29a640446a Remove prototype idfs in casts! 1994-10-18 13:43:50 +00:00
ceriel d1e4c3d930 Fixed: union initialization did not work properly 1994-10-03 12:57:39 +00:00
ceriel c3ad2ccc5e Improved driver, handles quotes better 1994-09-16 12:41:55 +00:00
ceriel 8636e9d10a Changed Header into Id 1994-06-27 08:03:14 +00:00
ceriel 1db6a3029b Header --> Id 1994-06-24 14:02:31 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 77c44b0f04 Minor fix in error message 1994-06-02 10:54:13 +00:00
ceriel 96172158e5 Fix: dit not handle multiple POINTER TO constructs right 1994-05-25 12:10:59 +00:00
ceriel f06b39f112 removed wrong assertion 1994-04-19 10:46:08 +00:00