George Koehler
ddf9de3f49
strcpy() is in <string.h>
2017-11-13 17:57:02 -05:00
George Koehler
3463f0c944
bts2str(), long2str() are in <ack_string.h>
2017-11-10 18:00:00 -05:00
George Koehler
ca4bd38206
Delete old "assert.h" files; use libc <assert.h>.
...
Edit build.lua for programs losing their private assert.h, so they
depend on a list of .h files excluding assert.h.
Remove modules/src/assert; it would be a dependency of cpp.ansi but we
didn't build it, so cpp.ansi uses the libc assert.
I hope that libc <assert.h> can better report failed assertions. Some
old "assert.h" files didn't report the expression. Some reported a
literal "x", because traditional C expanded the macro parameter x in
"x", but ANSI C89 doesn't expand macro parameters in string literals.
2017-11-09 22:22:13 -05:00
George Koehler
59b3c10563
Use (arith) 1 << ... when getting the sign bit.
...
This prevents an overflow reported by @hexcoder- in
https://github.com/davidgiven/ack/issues/56
lang/cem/cpp.ansi/LLlex.c used a plain 1 << ... and caused an overflow
on machines where sizeof(int) < sizeof(long). Using 1L << ... would
work for now but might fail later if arith became long long.
C doesn't specify whether negative integers use 2's complement or some
other format. Therefore, (arith) 1 << ... has an undefined value. It
should still work because the value is some integer where the sign bit
is set and all other bits are clear.
(unsigned arith) 1 << ... would also get the sign bit, but casting it
from unsigned back to signed would make the same undefined value.
(arith) -1 << ... would assume 2's complement.
2017-10-29 17:45:10 -04:00
George Koehler
1ab1306baa
Always use unsigned long in lang/cem
...
Same reason as commit 649410b
.
2017-10-29 17:01:29 -04:00
David Given
3e69d1185a
Fix a whole lot more stray prototypes.
2016-11-24 21:47:40 +01:00
David Given
4d7c27391f
Merge.
2016-11-10 22:06:08 +01:00
David Given
fd91851005
Add enough return types to the K&R C that the ACK builds (on Linux) using clang
...
now.
2016-11-10 22:04:18 +01:00
David Given
57cb99ade1
Remove sys_time in favour of directly calling time().
2016-11-09 21:52:04 +01:00
David Given
f67c98e239
Distributions are a pain --- let's not bother any more. Instead, we just tag
...
the repository and download a complete snapshot, old and ancient stuff and all.
2016-09-02 23:00:38 +02:00
David Given
612e38f1c6
Remove the old make-based build system, plus some big chunks of horribly
...
obsolete protomake build system.
2016-09-02 22:17:51 +02:00
David Given
262c5fedcf
Biggish refactor to break cycles; my build rules were full of them. cpm builds,
...
which requires top and topgen.
2016-08-14 01:39:40 +02:00
David Given
b50dc4214a
Add check for undefined variables. Find undefined variables. Fix undefined
...
variables.
2016-08-05 00:01:55 +02:00
David Given
5e84be70fd
Massive ackbuilder refactor --- cleaner and more expressive. Lists
...
are automatically flattened (leading to better build files), and the
list and filename functions are vastly more orthogonal.
2016-08-04 23:51:19 +02:00
David Given
b2bb4ce3b2
Builds libend (the simplest library). Becoming obvious I need to rework the way
...
ackbuilder deals with lists.
2016-07-30 00:39:22 +02:00
David Given
363d13cc2f
C preprocessor; tabgen; now the pc86 boot.s builds using the ack
...
toolchain.
2016-07-29 00:22:49 +02:00
David Given
88bd7ce126
Remove defunct pmfiles.
...
--HG--
branch : default-branch
2016-06-03 13:56:50 +02: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
11377070fd
Update distribution files.
...
--HG--
branch : dtrg-buildsystem
2013-05-15 23:46:15 +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
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
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
b611731ec3
Updated .distr files for the new release.
2007-02-25 12:51:55 +00:00
dtrg
611bc73043
Changed to no longer include /usr/include by default.
2007-02-20 00:36:15 +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
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
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
e859ef2491
Rationalised use of #includes to be more standards-compliant.
2006-07-19 10:28:43 +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
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
7b207deeb7
use stdarg when compiling with ANSI C compiler
1995-08-17 16:43:36 +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
c7b707c266
SkipToNewLine() fixed: did not work with a / at the end of a line
1994-10-28 15:26:36 +00:00
ceriel
1db6a3029b
Header --> Id
1994-06-24 14:02:31 +00:00
ceriel
f06b39f112
removed wrong assertion
1994-04-19 10:46:08 +00:00
ceriel
b8b3054bba
Fix: prevent unintentional token pasting
1994-03-01 15:04:52 +00:00
ceriel
37ab68909b
Added void for some functions
1993-11-10 12:42:25 +00:00
ceriel
c9ec055176
Define NDEBUG if you don't want assertions
1993-10-22 14:30:43 +00:00
ceriel
7a26259981
Fixed make.hfiles; some "shells" did not accept it
1993-08-05 12:30:57 +00:00
ceriel
6fc94eb375
Improved constant arithmetic: had several bugs
1993-03-18 13:24:20 +00:00
ceriel
cf7095f8cc
Fix small bug: space following a replacement list was included in the list
1993-01-26 11:49:23 +00:00
ceriel
3ac24b282b
Removed # in commands
1992-06-26 12:01:31 +00:00
ceriel
1de983200b
Fixed bug in '#ifdef FALSE || 1 (garbage)
1992-05-26 18:09:11 +00:00
ceriel
baf10676a3
Fix proto.make and initialize inctable better
1992-02-25 11:07:45 +00:00
ceriel
929a0025ca
Do not use '#endif/#else xxx'; it is not allowed for ANSI C
1991-12-17 14:11:15 +00:00