duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit 6172175a48c19fc9d50c2b64ef04c72718637da4
parent ba8c097f27fee341fcf288eb722ae5095b0481fe
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Tue, 29 Nov 2022 22:28:47 -0500

comp/c: new departure from ANSI C

Diffstat:
Mfs/ar/puff.c | 6+-----
Mfs/doc/cc/usage.txt | 4++++
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/ar/puff.c b/fs/ar/puff.c @@ -188,11 +188,7 @@ static int decode(state *s, huffman *h) int count; /* number of codes of length len */ int index; /* index of first code of length len in symbol table */ - // TODO: support chained assigns - // code = first = index = 0; - code = 0; - first = 0; - index = 0; + code = (first = (index = 0)); for (len = 1; len <= MAXBITS; len++) { code |= bits(s, 1); /* get next bit */ count = h->count[len]; diff --git a/fs/doc/cc/usage.txt b/fs/doc/cc/usage.txt @@ -48,6 +48,10 @@ are a few differences: only to parse them and generate them correctly, but also to do so in an efficient manner. The plan is to port code using bit fields with manual masking/unmasking code. +* No right-associativity rules. All binops have left associativity. This means + that chained assignments such as "a = b = c = 42" must be expressed as + "a = (b = (c = 42))" and "a ? b ? c : d : e ? f : g" (seriously, you wanted + to write that?!?) must be written as "a ? (b ? c : d) : (e ? f : g)" ## Calling Forth words