Commit Graph

38 Commits

Author SHA1 Message Date
Jim Monte 1d86e5a9c7 fixed singluar/plural agreement in an error message generated by the let command 2020-02-12 22:40:53 +01:00
Jim Monte 8ead6c1b77 Minor fix to end-of-index processing of let command 2020-02-12 22:27:29 +01:00
Jim Monte affa528cb5 Rework of let command. Added support for slices as described in feature #69 and fixed several crashes and issues described in bugs #443, #444, #446, #447, and #448. 2020-02-12 22:14:51 +01:00
Holger Vogt b9901a2569 [PATCH 47] Refactored ft_getnames() and used the new function in
com_let().
2019-08-13 23:27:49 +02:00
rlar 141ed61ec8 use memcpy() instead of deprecated bcopy() 2016-07-30 20:58:19 +02:00
rlar 059f2b6c0d fix garbage collection of vectors returned by ft_evaluate() 2016-03-26 18:48:50 +01:00
rlar 5e04924890 cleanup `skip_ws()' usage 2016-03-22 15:26:11 +01:00
rlar b1d8b99018 skip-ws, #6/6, rename to match inpcom.c 2016-03-22 15:26:10 +01:00
rlar 22875d056b skip-ws, #5/6, use functional style 2016-03-22 15:26:09 +01:00
rlar d12679fccd skip-ws, #4/6, drop `TEMPORARY_SKIP_WS_X0'
use TEMPORARY_SKIP_WS_X1 instead of TEMPORARY_SKIP_WS_X0
2016-03-22 15:26:08 +01:00
rlar a86f2068c8 skip-ws, #3/6, use TEMPORARY macros, obj-invariant 2016-03-22 15:26:06 +01:00
rlar 6d1171ad6f skip-ws, #2/6, introduce "ngspice/stringskip.h"
with some temporary macros to skip whitespace
2016-03-22 15:26:05 +01:00
rlar 1ad65120d5 skip-ws, #1/6, prepare for rewrite, obj-invariant 2016-03-22 15:26:04 +01:00
rlar 71a7c3459b use char variants of the <ctype.h> isxxxx() family 2016-03-09 20:24:36 +01:00
rlar 8243696338 dvec abstraction, #8/11, upgrade `dvec_alloc()' 2015-12-28 20:34:42 +01:00
rlar 8a4a37b5bb dvec abstraction, #4/11, emphasise `ZERO(dvec)' initialisation 2015-12-28 20:34:42 +01:00
rlar 908c650f72 dvec abstraction, #3/11, use `dvec_alloc()' 2015-12-28 20:34:42 +01:00
rlar 08ad3f6ab5 dvec abstraction, #1/11, reorder 2015-12-28 20:34:42 +01:00
rlar cab63eedd4 frontend/com_let.c, bug fix, "#302 Integer in Let Statement"
let 2foo = someexpression

was silently accepted, even though 2foo is an illegal identifier.
  (first letter is a digit)

This was especially irritating, since
  print 2foo
has a legal meaning, 2 femto oO, which is 2e-15
  (whatever Unit an oO might be)

Reported by Justin Fisher in
  http://sourceforge.net/p/ngspice/bugs/302/
2015-05-02 11:18:30 +02:00
rlar 7bc6374138 cleanup, use '\0' instead of 0 in char context 2015-05-02 10:24:54 +02:00
rlar 26bbb39a68 variable rename, unify the source
checked for object file invariance
2012-09-30 21:43:16 +02:00
rlar fe1acd3757 src/frontend/** remove superfluous `return' invocations 2012-09-22 19:33:55 +02:00
rlar 7454a6d486 src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...

checked for object file invariance on linux
2012-09-20 20:30:53 +02:00
rlar 10346e055c #1/4 #include <ngspice/...> --> #include "ngspice/..." 2011-12-11 18:05:00 +00:00
rlar d26015586c #1/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 17:27:09 +00:00
rlar 3ece54fb94 bug fix, avoid segfault when indexing a vector with a nonexistant variable 2011-06-02 19:34:47 +00:00
rlar e6c30efe46 Nr 4/5 (x = ...) != NULL , swallow warnings 2010-11-19 18:52:44 +00:00
rlar 01566f2b49 add casts to make `int' versus `size_t' conversions explicit 2010-11-02 17:07:57 +00:00
rlar 7b3960506f wrap tmalloc MALLOC etc, into two macros TMALLOC and TREALLOC 2010-10-28 19:32:34 +00:00
rlar 4622d0876e ngcomplex_t instead of complex, #1/2 2010-10-24 12:45:05 +00:00
rlar a120a5d049 drop the casts for pointer arguments of bcopy() and bzero() 2010-06-27 17:22:11 +00:00
rlar 4420a3ecdd add prototypes, remove some NULL casts 2010-06-23 17:40:56 +00:00
pnenzi 58347d932e Fixed a bug in let command for expressions like let vec[2]=5.0 2007-09-17 13:53:51 +00:00
pnenzi 531fb3575a Applied Vera Patch to correct bugs in shell code and re-enabling interpolate command. 2003-12-25 17:30:36 +00:00
pnenzi dd8929457e Code cleaning. 2003-08-06 18:37:51 +00:00
pnenzi 8362dec274 Integrated code from tclspice, brorson xspice and Vera memleak. 2003-07-23 19:36:39 +00:00
arno 6886b8793b * configure.in src/main.c src/frontend/com_let.c: Updates. 2000-05-13 11:02:40 +00:00
arno 8696a52e89 * src/Makefile.am src/main.c src/sconvert.c
src/analysis/cktdisto.c src/analysis/cktnoise.c
	src/analysis/noisean.c: Updates for the
	new header files.

	* src/maths/cmaths/cmath1.c src/maths/cmaths/cmath2.c
	src/maths/cmaths/cmath3.c src/maths/cmaths/cmath4.c: Updates
	for the new header files.

	* src/frontend/.cvsignore src/frontend/Makefile.am: Updates
	for the new files.

	* src/frontend/agraf.c src/frontend/aspice.c
	src/frontend/breakp.c src/frontend/breakp2.c
	src/frontend/circuits.c src/frontend/cpitf.c
	src/frontend/debugcom.c src/frontend/define.c
	src/frontend/diff.c src/frontend/dimens.c
	src/frontend/display.c src/frontend/doplot.c
	src/frontend/dotcards.c src/frontend/evaluate.c
	src/frontend/fourier.c src/frontend/graf.c
	src/frontend/grid.c src/frontend/inp.c src/frontend/inpcom.c
	src/frontend/interp.c src/frontend/linear.c
	src/frontend/misccoms.c src/frontend/misccoms.h
	src/frontend/miscvars.c src/frontend/mw_coms.c
	src/frontend/newcoms.c src/frontend/nutinp.c
	src/frontend/options.c src/frontend/outitf.c
	src/frontend/parse.c src/frontend/plotcurv.c
	src/frontend/points.c src/frontend/postcoms.c
	src/frontend/rawfile.c src/frontend/runcoms.c
	src/frontend/runcoms2.c src/frontend/shyu.c
	src/frontend/spec.c src/frontend/spiceif.c
	src/frontend/typesdef.c src/frontend/vectors.c
	src/frontend/where.c src/frontend/postcoms.c: Updates for the
	new header files.  Some commands have moved into the new files
	below.

	* src/frontend/README src/frontend/com_compose.c
	src/frontend/com_compose.h src/frontend/com_display.c
	src/frontend/com_display.h src/frontend/com_let.c
	src/frontend/com_let.h src/frontend/com_setscale.c
	src/frontend/com_setscale.h src/frontend/commands.c
	src/frontend/commands.h src/frontend/completion.h
	src/frontend/streams.h src/frontend/testcommands.c:
	Separation into different com_* commands.  This is a start.
	The rest of the subdirectory needs doing.

	* src/include/complex.h src/include/cpdefs.h
	src/include/cpextern.h src/include/cpstd.h
	src/include/fteconst.h src/include/ftedata.h
	src/include/ftedev.h src/include/fteext.h
	src/include/ftegraph.h src/include/fteparse.h
	src/include/dvec.h src/include/grid.h src/include/plot.h
	src/include/pnode.h src/include/sim.h src/include/variable.h
	src/include/wordlist.h src/include/bool.h: Separation of
	header files into smaller pieces.  This limits recompilation
	to only the affected source files.  The original header
	files have a warning message embedded to flag obsoleted use.

	* src/frontend/compose.c src/frontend/compose.h
	src/frontend/nutctab.c src/frontend/nutctab.h
	src/frontend/plot5.c src/frontend/plot5.h
	src/frontend/spcmdtab.c src/frontend/x11.c
	src/frontend/x11.h src/frontend/xgraph.c
	src/frontend/xgraph.h: Moved these files into
	src/frontend/plotting subdirectory.

	* src/frontend/plotting/.cvsignore
	src/frontend/plotting/Makefile.am
	src/frontend/plotting/plot5.c src/frontend/plotting/plot5.h
	src/frontend/plotting/plotting.c
	src/frontend/plotting/plotting.h
	src/frontend/plotting/pvec.c src/frontend/plotting/pvec.h
	src/frontend/plotting/x11.c src/frontend/plotting/x11.h
	src/frontend/plotting/xgraph.c
	src/frontend/plotting/xgraph.h: The new libplotting library
	with automake and CVS infrastructure.
2000-05-06 14:12:51 +00:00