rlar
2d480637c9
parser/lexical.c, #8/10, use a struct to store the buffer state
10 years ago
rlar
615b8a4598
parser/lexical.c, #7/10, use `copy_substring()'
10 years ago
rlar
9a7e915a9f
parser/lexical.c, #6/10, cleanup
10 years ago
rlar
8f09c35c5a
parser/lexical.c, #5/10, change buf/linebuf usage
properly '\0' terminate the buffers where needed
instead of an unspecific bzero() invocation
10 years ago
rlar
b7f3dbc0fe
parser/lexical.c, #4/10, rename `cw' --> `wlist_tail'
10 years ago
rlar
4cabf8fa6c
parser/lexical.c, #3/10, move the `wlist' and `cw' resetting
to the label `nloop'
10 years ago
rlar
a0f5111436
parser/lexical.c, #2/10, move the `wlist' and `cw' resetting
nearer to the `goto nloop'
10 years ago
rlar
a2af93685f
parser/lexical.c, #1/10, this condition is allways true
10 years ago
rlar
4c1c95e20f
everywhere, use `TMALLOC()' instead of `alloc()'
10 years ago
rlar
71a7c3459b
use char variants of the <ctype.h> isxxxx() family
10 years ago
rlar
192eeadb0b
remove crufty comments which where used to support broken text editors
11 years ago
rlar
7bc6374138
cleanup, use '\0' instead of 0 in char context
11 years ago
rlar
cc235294ec
lexical.c, change semantics of an ESCAPE in a given input `string'
now simply skip it.
presumably and in accordance to what the comments seems to suggest
ESCAPE never was really meant to be read as '['
but was replaced just to get it out of way deeper in the for loop
where an ESCAPE starts an ancient mechanism to reenter
interactive input via a terminals TIOCSTI capability
12 years ago
rlar
cb75a749b8
lexical.c, avoid to read beyond end of `string'
12 years ago
rlar
f42b5b16c7
lexical.c, simplify
12 years ago
rlar
8c7ae0d61c
lexical.c, simplify using cp_readchar()
12 years ago
rlar
448099ef94
lexical.c, new function cp_readchar() for abstraction
12 years ago
rlar
2555eeadef
fix the csh-problem $foo[$bar] and $foo[$&baz]
13 years ago
rlar
909f087237
cp_variablesubst() and cp_bquote(), rewrite
13 years ago
rlar
9eab66131d
cp_variablesubst() and cp_bquote(), rewrite
13 years ago
h_vogt
d7e291c53a
HAS_WINDOWS --> HAS_WINGUI
allow compilation on MS Windows without GUI
13 years ago
rlar
4184aa8c10
cleanup, use array operator
checked for object file invariance on linux with
./configure --enable-debug=no --enable-maintainer-mode --with-readline=yes --enable-cider --enable-ndev --enable-pss --enable-xspice
13 years ago
rlar
6c8f002eea
unify #ifndef include wrapper
13 years ago
Francesco Lannutti
08ec219417
remove all .cvsignore files
14 years ago
rlar
11579d9369
cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones)
14 years ago
h_vogt
c0bc0de4b5
prototype for controlled_exit()
14 years ago
rlar
f52ae6eccd
bug fix, invalid read when the title line is the empty
14 years ago
rlar
fe1acd3757
src/frontend/** remove superfluous `return' invocations
14 years ago
rlar
7454a6d486
src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...
checked for object file invariance on linux
14 years ago
rlar
3d7ab6a297
cleanup keyword databases on proram termination
14 years ago
rlar
ef37252155
lexical, use wl_append_word()
14 years ago
rlar
62a4ee77d5
lexical #6/6, whitespace
14 years ago
rlar
ea558fbc7f
lexical #5/6, cleanup
14 years ago
rlar
aa188c0766
lexical #4/6, parentheses and braces
14 years ago
rlar
c73c0f4318
lexical #3/6, rewrite
14 years ago
rlar
5656203a6c
lexical #2/6, linewrap
14 years ago
rlar
5d245c9dab
lexical #1/6, cleanup
14 years ago
rlar
64d00a6b43
lexical #3/3, collapse append(NULL) into cp_ccom()
the sequence
orig_wlist = wlist;
append(NULL);
cp_ccom(wlist, ...);
is transformed.
expressions to care about in cp_ccom()
C1 := (wlist->wl_next != NULL)
C2 := (wlist->wl_word != NULL)
C3 := wl_length(wlist)
D1 := (orig_wlist != NULL)
D2 := (orig_wlist->wl_word != NULL)
D3 := wl_length(orig_wlist);
cases and their significance in cp_ccom():
orig_wlist = NULL;
wlist = wl_cons(NULL, NULL);
C1 == false
D1 == false
C2,C3 dont care
orig_wlist = wl_cons(E1, wl_cons(E2, ... wl_cons(En, NULL)))
wlist = wl_cons(E1, wl_cons(E2, .... wl_cons(En, wl_cons(NULL, NULL))))
C1 == true
D1 == true
C2 === D2
C3 === D3 + 1
14 years ago
rlar
fec5b00a0d
lexical #2/3, fix memory leaks
14 years ago
rlar
042311d0c3
lexical #1/3, move append(NULL) invokations into position
14 years ago
rlar
1195498978
lexical #19/19, rewrite
14 years ago
rlar
5b67ecda79
lexical #18/19, rewrite
`cw' won't be looked at, thus the append + removal can be dropped
`wl_word' is already NULL
14 years ago
rlar
f990e517b5
lexical #17/19, rewrite
14 years ago
rlar
fa9be4336a
lexical #16/19, transform append --> append(word)
14 years ago
rlar
43a6d59c72
lexical #15/19, drop `delayed' which is never zero ...
14 years ago
rlar
47b5e9576d
lexical #14/19, drop `delayed = 0' wherever its effect isn't visible
without effect, because we return or will overwrite it anyway
14 years ago
rlar
01df4e9437
lexical #13/19, delay `append'
delay its execution, until
either `wlist' or `cw' will be accessed,
or
a return or goto nloop is inevitable
14 years ago
rlar
cff6188fe3
lexical #12/19, use `append'
some `assumption' are no longer valid
14 years ago
rlar
5ad8382cf1
lexical #11/19, aproach `append' here
14 years ago
rlar
d61f3c10a0
lexical #10/19, split off `append' from `newword'
14 years ago