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
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
11579d9369
cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones)
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
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
rlar
af0a0c2c03
lexical #9/19, aproach the `append'
cw has never been NULL here,
because we used to survive an update of cw->wl_next here
wlist hasn't been NULL either,
because there is no place where wlist becomes NULL without
setting cw to NULL as well. yet cw isn't NULL (see above)
aproach the `append'
14 years ago
rlar
74cc38f67a
lexical #8/19, express where `wlist' and `cw' start being != NULL
14 years ago
rlar
3cbc4b0773
lexical #7/19, express verbosely where `wlist' and `cw' are NULL
14 years ago
rlar
ecb2eec279
lexical #6/19, express cp_ccom() property
14 years ago
rlar
3b575d5e3d
lexical #5/19, collapse into `newword'
14 years ago
rlar
348dc2d7d1
lexical #4/19, the `else' can take that job (unconditionally)
14 years ago
rlar
80191f3d44
lexical #3/19, attach and instantly remove a NULL wl_word here
this modification is faithful iff cw != NULL and cw->wl_next == NULL
cw != NULL because we have just survived an update of cw->wl_word
cw->wl_next == NULL is witnessed by:
1) cw either NULL or pointing to a wl_cons(,NULL)
2) cw not being modified, and no wl_next being modified
3) check of all function invocations with wlist/cw argument
not to modify any wl_next slot
which are:
1) cp_ccom(wlist, ...)
2) wl_free() always followed by goto nloop, which does a cw = wl_cons(,NULL)
and cp_ccom() doesn't modify any wl_next slot
the first part of the patch is intentionally similar to newword
`i' and `buf' can be modified here, because we will inevitably `goto done'
attach and instantly remove a NULL wl_word here
14 years ago
rlar
ddebb63425
lexical #2/19, rewrite the `else if'
14 years ago
rlar
f2f43bcce7
lexical #1/19, use wl_cons
14 years ago
rlar
f36772419a
Revert "cleanup, use wl_cons()"
This reverts parts of commit 7a7250cdbd .
There is a cleaner way to rewrite lexical.c
14 years ago
rlar
7a7250cdbd
cleanup, use wl_cons()
14 years ago
rlar
9655b9885a
cleanup, use wl_cons(), wl_append_word() and wl_chop_rest()
14 years ago
rlar
4ca58067a2
#2/6 config.h --> ngspice/config.h, #include's
14 years ago
rlar
10346e055c
#1/4 #include <ngspice/...> --> #include "ngspice/..."
14 years ago
rlar
d26015586c
#1/7 use a subdirectory "ngspice" for includes to create a uniq namespace
15 years ago
rlar
dd34b783cf
minor rewrite, a local variable type change
16 years ago
rlar
6e3bbd49ae
casts, to make int <-> char conversions explicit
16 years ago
rlar
4cdd842cd8
muffle compiler warnings
16 years ago
dwarning
586af63f36
changed the declarator to new format
17 years ago
h_vogt
1e5720a23f
double array size in cp_lexer()
17 years ago
pnenzi
72482f964e
Fixed segfaults when redirecting output < > -- Espice
18 years ago
pnenzi
531fb3575a
Applied Vera Patch to correct bugs in shell code and re-enabling interpolate command.
23 years ago
pnenzi
937e3db647
Holger Vogt Windows port for Ngspice.
25 years ago