Commit Graph

576 Commits

Author SHA1 Message Date
Holger Vogt c891bf846c reduce precision to avoid false rounding 2021-01-20 16:46:59 +01:00
Holger Vogt 059e869754 free the wordlist wle to avoid memory leaks 2021-01-20 16:42:33 +01:00
Holger Vogt 5af7f0ff78 sort instance list entries: RHS numbers (like nf=2) come first,
expression then follow.
2021-01-20 16:41:25 +01:00
Holger Vogt 98eb5bf475 bug #537: remove memcopy with overlapping strings
Bug reported by Ronan BARZIC
2021-01-02 19:02:29 +01:00
Holger Vogt c112279555 new compatibility handling with struct compat newcompat:
simplify the compatibility handling, better readability
make it easily extendable
add new flag 'ki' for KiCad compatibility
2020-08-20 15:38:43 +02:00
Jim Monte 1d62ae2d97 type casts 2020-04-27 10:22:40 +02:00
Holger Vogt 87101cd26d no double parens 2020-04-21 19:56:55 +02:00
h_vogt 22f4e8f82d return extended ascii as alpha 2020-03-15 08:51:05 +01:00
Holger Vogt 85142709fc For UNICODE use char in comparison to ' '
only as unsigned char
2020-03-15 08:51:05 +01:00
Jim Monte 4bd4a6e9be Fixed usage of new dstring functions. Also added const to some parameters that did not change. 2020-03-15 08:50:52 +01:00
Jim Monte 89efe5aeae Dynamic string (dstring) rework 2020-03-15 08:50:51 +01:00
Holger Vogt 71917744a8 remove superfluous double parentheses 2019-11-30 11:35:56 +01:00
Jim Monte 7e0dd64ce5 [PATCH 33 1/6] Fixed Visual Studio C4028 compiler warnings related to
mismatches between prototypes and function definitions

Signed-off-by: Holger Vogt <holger.vogt@uni-due.de>
2019-08-13 23:14:49 +02:00
Holger Vogt 75d1e45737 consider all PSPICE containing compatibility settings
for the evaluation of the pwr function
or allowing '-' in a subcircuit name
2018-10-20 23:54:02 +02:00
dwarning 561fdd805c rm unused variables 2018-08-21 13:18:24 +02:00
Holger Vogt 2786fcb86e New .option seed=[val|random] 2018-07-22 15:11:44 +02:00
Holger Vogt 09c876550f prevent string overflow by adding the string length
to the cp_getvar parameters. Used only with CP_STRING
2018-07-22 14:57:49 +02:00
Holger Vogt b07ae3123e use only internal memory functions,
replace strdup by copy
2018-07-21 23:54:51 +02:00
Holger Vogt d991bbc470 ngconfig.sh is no more available 2018-05-20 12:48:31 +02:00
h_vogt d89eab99d5 add dicoS->linecount to safely delete dynrefptr[i],
linecount may change if circuits are changed or deleted.
2018-05-19 17:49:17 +02:00
h_vogt 1066bf0a7b Store the numparam dicoS structure for each circuit in a list.
Functions to add, remove, retrive dicoS from the list
and to update dicoS, if the circuit has been changed.
Keeping dicoS is necessary because it may be used by measure.
This patch prevents (huge) memory leaks by overwriting
dicoS if multiple calls to the 'source' command are executed.
2018-05-19 17:45:45 +02:00
Holger Vogt cbe4b31d4b do not delete symbols that have not been created here 2018-05-19 16:53:04 +02:00
Holger Vogt 1426f66967 use global variable inp_compat_mode 2018-05-18 18:39:15 +02:00
Holger Vogt 04059e5426 enable '-' as valid character in a subcircuit name 2018-05-18 17:35:05 +02:00
h_vogt 3dd2115291 frontend/subckt.c, do not put model names into numparam hash table
nobody seems to make use of these entries.
see nupa_type which shrinks to four enum's
2018-03-01 18:13:01 +01:00
rlar 95ef5e79d9 numparam/*, use `pscopy()' 2018-02-20 21:34:06 +01:00
rlar 9ad63cc2c0 numparam/*, plug memory leaks 2018-02-20 21:33:55 +01:00
rlar ea1b83698f numparam/*, drop case conversions
inpcom.c is supposed to convert everything to lower case.
Thus we can work case sensitive in numparam,
  which is easier compared to a whole set of local case conversions.
2018-02-20 21:33:32 +01:00
rlar 0200d5c7e9 numparam/*, drop "old style" '&' syntax
Probably an artefact of the external preprocessor implementation
  of numparam.
This syntax seems to have been a non spice macro expansion facility.
2018-02-20 21:30:52 +01:00
rlar 8022aa09a6 spicenum.c, cleanup dicoS usage 2018-02-20 21:30:41 +01:00
rlar aa0dbd20ad spicenum.c, drop putlogfile() 2018-02-20 21:30:15 +01:00
rlar 15c00a9d42 spicenum.c, drop dologfileS, logfileS and nblogS
which are never set
2018-02-20 21:29:50 +01:00
rlar 112f35cc96 nupa_copy(), use skip_back_ws() 2018-02-20 21:29:29 +01:00
rlar 9218b76583 nupa_copy(), cleanup 2018-02-20 21:28:56 +01:00
rlar ec24c1ded7 nupa_copy(), fix lvalue 2018-02-20 21:28:03 +01:00
rlar 06708f1ed1 nupa_copy(), ls ==> s_end - (const) s 2018-02-20 21:27:38 +01:00
rlar 751d377d3e pscopy(), pscopy_up(), use `char *stop' argument
instead of `int length' argument
2018-02-20 21:13:16 +01:00
rlar e21d48a267 pscopy(), pscopy_up(), use _spice_dstring_setlength() return value
instead of invoking spice_dstring_value()
2018-02-20 21:13:05 +01:00
rlar 2ce91b0821 pscopy(), pscopy_up(), expand spice_dstring_reinit() macro
and inline the resulting spice_dstring_setlength() invocation
2018-02-20 21:12:56 +01:00
rlar 2cb579cd9f pscopy(), pscopy_up(), drop `start' argument
which is always zero
2018-02-20 21:12:44 +01:00
rlar 3bd9c1c858 scopyd(), return void 2018-02-20 20:51:30 +01:00
rlar 5164c16a1b numparam/mystring.c, drop unused nadd(), cins(), sins() and spos_() 2018-02-17 19:15:55 +01:00
rlar 468f7580ad nupa_subcktcall(), cleanup using skip_ws() 2018-02-17 19:15:55 +01:00
rlar a38b19bc0e nupa_subcktcall(), reintroduce search for last occurence of the subckt name 2018-02-17 19:15:55 +01:00
rlar c2f519c191 nupa_subcktcall(), drop `p_subname' 2018-02-17 19:15:55 +01:00
rlar 3f5ea23c71 nupa_subcktcall(), drop `ls_ptr'
valid because
neither `jp' nor `gp' will ever be incremented beyond end of string
2018-02-17 19:15:55 +01:00
rlar 437f92385a nupa_subcktcall(), avoid `jp' pointing beyond end of string
The skip whitespace loop in the following line shall
  safely swallow the delimiting space instead
2018-02-17 19:15:55 +01:00
rlar bb9689139b nupa_subcktcall(), drop `parsebuf' and `buf' 2018-02-17 19:15:55 +01:00
rlar 8b1e4fc32c nupa_subcktcall(), introduce search_isolated_identifier()
the functionality is a bit different though,
  because the previous code searched for the *last* occurence of the identifier
  yet the new code searches for the first occurence.
2018-02-17 19:15:55 +01:00
rlar 6a57023ced nupa_subcktcall(), drop `hp' 2018-02-17 19:15:55 +01:00