Giles Atkinson
84821a4cf5
Add support for including analog node changes in VCD file output,
...
and an option to explicitly set the VCD timestep. Correct the
output value for high-impedance nodes.
2023-07-31 14:28:29 +02:00
Giles Atkinson
576f218945
Fix the NAND and NOR variants of XSPICE code model multi_input_pwl
...
and add an example of its use with the E-source NAND variant.
2023-07-31 14:25:40 +02:00
Giles Atkinson
3a260fd4d9
Fix Bug 584 - "XSPICE dac_bridge model shows incorrect output timing."
...
Remove reliance on exact breakpoint timing and tidy code.
2023-07-31 14:25:31 +02:00
Giles Atkinson
e5a931e537
Improve commands for vector scales. "setscale" can now change
...
or clear the scale of an individual vector and "compose" can
explicitly create a vector from XSPICE event node history.
2023-07-15 11:28:48 +02:00
Giles Atkinson
d31568bd83
Add parsing and translation of the FREQ form of E-source devices,
...
integrated with the existing parsing of AND/NAND/OR/NOR forms (inpcom.c).
For the implementation, add a new analog XSPICE code model, xfer.
Add an example to examples/sp.
2023-07-15 11:15:08 +02:00
Giles Atkinson
eeb912228a
When creating a plot vector from XSPICE event history, add a
...
final point at the end of the vector, so that a plotted line
does not end at the last event, leaving an odd spike.
2023-07-15 11:13:19 +02:00
Giles Atkinson
9099a922fd
Apply a patch from Aleksey Morozov to fix a bug that he identified
...
and reproduced. It is the same as Bug #331 -
"XSpice skips digital output point" except that it applies to the
instance queue, not the event queue.
2023-07-15 11:12:31 +02:00
Holger Vogt
678a6582f6
A preliminary fix to reduce the amount of missing pulses considerably.
...
Probably not yet the final solution.
2023-05-27 10:40:32 +02:00
Giles Atkinson
5aa48cab0b
Do not generate netlist lines that use non-existent libraries.
...
To support that, give global scope to function inp_pathresolve()
in inpcom.c. Update internal documentation (long comment).
2023-04-01 13:56:12 +02:00
Holger Vogt
062785319a
When '.probe alli' is set, disable auto bridging and set a flag
2023-03-24 22:10:18 +01:00
Giles Atkinson
5197200fb3
Fix crash reported by Brian Taylor. If "source" is used after
...
analysis, the circuit is both deleted and destroyed. Beware of
double frees.
2023-03-22 14:30:18 +01:00
Giles Atkinson
98333ee89a
Fix a memory leak reported by Brian Taylor that was introduced
...
by commit 4d8e17487b .
2023-03-22 14:30:11 +01:00
Giles Atkinson
e25f8bd522
Add inertial delay to missed d_xnor and tidy blank lines in d_xor.
2023-03-22 14:29:03 +01:00
Giles Atkinson
cecce5163e
Inertial delay for remaining simple gates and buffers:
...
nand or xor open_c open_e, but not tristate.
2023-03-22 14:28:51 +01:00
Giles Atkinson
db38d4ad54
Correct timing of transitions to UNKNOWN.
2023-03-22 14:28:37 +01:00
Giles Atkinson
4623a04615
Interim version of inertial delay for tristate buffer.
...
This does not handle three-way or mixed transitions.
2023-03-22 14:28:15 +01:00
Giles Atkinson
e3b4df6a51
First group of digital code models with improved implementation
...
of inertial delay: buffer, inverter, and, nor. Also adds
utility function cm_is_inertial(().
2023-03-22 14:27:54 +01:00
Giles Atkinson
2643e3b17f
New code-model library functions cm_schedule_output() and cm_getvar().
...
To be used in the inertial delay code for digital code models.
2023-03-22 14:27:35 +01:00
Giles Atkinson
c1659a64c3
Change output event setup in evtload.c so that, when making an event call
...
to a code model, there is no longer a reference to the value of the event
at the head of the free list. That allows all such free lists (with the
same data type) to be combined, probably improving performance.
This is in preparation for full implementation of inertial delay for
digital nodes.
2023-03-22 14:27:19 +01:00
Giles Atkinson
2d0561f386
Allow string-valued parameters to XSPICE device models with no default.
...
The code model then sees the value NULL. Needed for the "family"
parameter on logic models, used by automatic bridge insertion.
2023-03-22 14:27:06 +01:00
Giles Atkinson
06aa693852
A new fix for Bug #331 : "XSpice skips digital output point".
...
The problem was caused by removing an output queue from the "modified"
list when it had been modified by processing one of its events.
2023-03-18 14:33:02 +01:00
Giles Atkinson
7457a2684b
Revert "Fixes bug #331"
...
This reverts commit 6d9876229c , because
it was found to break examples/xspice/various/xspice_c3.cir
(see discussion in bug report for February 2023) and an alternative
fix is available.
2023-03-18 14:32:53 +01:00
Holger Vogt
5924ae2dfb
bug report 619 by Hanspeter Niederstrasser
...
remove double inclusion of stdlib.h
Correction of commit 9e432838c ("Patch by Robert Turnbull: remove warning messages", 2023-02-05)
2023-03-18 14:30:56 +01:00
Holger Vogt
3ff9643f49
Add a scale factor 'a' (atto, 1e-18)
2023-03-18 14:30:03 +01:00
holger
f9ed3fd080
Patch by Robert Turnbull: remove warning messages
2023-02-05 11:25:42 +01:00
Giles Atkinson
7ead974a5a
Prevent crash when cm_analog_set_temp_bkpt() is called during OPtran().
2022-12-11 15:35:31 +01:00
Giles Atkinson
73e8fed0fc
Fix warnings from gcc 10.2.1.
2022-12-11 15:35:14 +01:00
Holger Vogt
ba6ff75dab
Trim trailing spaces
2022-12-11 15:22:30 +01:00
Holger Vogt
f26c9146f5
Don't allocate memory for control array at every time step
...
Use loc instead, setting it up once during INIT
2022-12-11 15:22:01 +01:00
Holger Vogt
e47049f31a
Add STATIC_VAR_TABLE locdata
...
Add CALLBACK cm_d_pwm_callback
Reserve memory for x, y arrays only once during INIT
2022-12-11 15:15:22 +01:00
Holger Vogt
ed6f802948
Add a guard on parameter 'position', limit to
...
1e-9 to 0.999999999
FIXME: the given parameter limits from ifspec.ifs are not recognized.
2022-10-22 15:54:12 +02:00
Holger Vogt
2d8ea17d65
Update on author
2022-10-22 15:54:01 +02:00
Holger Vogt
61d23b99ff
Patch required to allow compiling at Fedora with -Werror=format-security
...
Provided by Mamoru Tasaka
2022-10-22 15:53:45 +02:00
Giles Atkinson
01c4a5dff2
Fix memory leak reported by Brian Taylor.
2022-10-14 13:52:34 +02:00
Holger Vogt
9166f202a6
Streamline the simple diode model.
2022-10-08 16:50:47 +02:00
Holger Vogt
ec6a902fb9
Fix a bug in simple diode, when ilimit is set, but not epsilon.
...
Make model more similar to LTSPICE
Add an example
2022-10-08 16:50:38 +02:00
Giles Atkinson
d9952575dd
Correct the digital state resolution table, that was previously asymmetric.
...
An equivalent change is mentioned in the SPICE OPUS change history.
2022-10-08 16:48:20 +02:00
Giles Atkinson
372d9b2c87
Add bidirectional digital/analog bridge.
2022-10-08 16:48:11 +02:00
Giles Atkinson
e80b724460
Add two functions to the Code Model Library: cm_get_node_name()
...
makes circuit node names available to diagnostics, while
cm_probe_node() is needed for a bidirectional A/D bridge.
2022-10-08 16:47:50 +02:00
Giles Atkinson
06131d8107
Rewrite code with Visual Studio complaints.
2022-10-08 16:47:09 +02:00
Holger Vogt
519ce44227
safeguard against circuit not being abvailable,
...
avoid crash
2022-10-08 16:43:41 +02:00
Holger Vogt
1d026475a2
pwlts: a pwl v/i source with time input, smoothing and limiting functions
2022-10-07 13:39:16 +02:00
Holger Vogt
0af4932c6f
Prevent a crash if (due to input error) the node_table is not available.
2022-10-07 13:37:57 +02:00
Holger Vogt
2126230b64
Prevent crashes when nodes or tables are not available,
...
e.g. due to missing input file.
2022-10-07 13:22:59 +02:00
Giles Atkinson
a0357b3432
Remove search for "family" parameters on subcircuits in XSPICE
...
automatic bridging support as string-valued parameter support is
not yet intgrated.
2022-10-07 13:20:34 +02:00
Giles Atkinson
4115064fd5
Latest auto-bridge code from development branch.
2022-10-07 13:20:17 +02:00
Giles Atkinson
b1341c8e30
Insert XSPICE bridging devices automatically when an analogue node
...
has the same name as an XSPICE event node (including digital nodes).
The function Evtcheck_nodes() is replaced by a new version in its
own file.
2022-10-07 13:19:59 +02:00
Holger Vogt
c8ed9590b7
Handle the case when control voltages on and off are equal.
...
Update the linear switch: add the limits to resistance ron, roff
Update the log switch: correct the resistance calculation for
von < voff
Add some examples for the pswitch.
2022-10-07 13:12:56 +02:00
Giles Atkinson
8038021369
Remove some dead code in the dec_bridge code model.
2022-10-07 13:09:36 +02:00
Giles Atkinson
88d5e723ed
Fix double free in XSPICE CALLBACK functions as desribed here:
...
https://sourceforge.net/p/ngspice/mailman/message/37677362/
and add missing CALLBACKs in models that use STATIC_VARs with
pointer values.
2022-10-07 13:09:15 +02:00
Giles Atkinson
10d3e1b754
Extend the output and partial derivatives of the output from the 2/3-D
...
table lookup models (XSPICE) continuously outside the defined
rectangle or cube, as it may help convergence and avoid ambiguity caused
by rounding at the boundaries. See bug #591 "Wrong 2D table model output".
The value is that of the nearest point in the region while the reported
derivative is ramped to zero outside the boundaries.
Also fixes incorrect output at the upper limit in each dimension.
2022-10-07 13:09:00 +02:00
Giles Atkinson
8ef2d8dec8
Fix memory leak by moving the state transition table to a STATIC_VAR
...
whose memory can be recovered by a call back. Also make cfunc.mod
less ugly.
2022-10-07 13:08:42 +02:00
Giles Atkinson
dbf4c16bc0
Fix XSPICE memory leaks found by valgrind.
2022-05-09 10:07:57 +02:00
Holger Vogt
246f9f5e9e
d_pwm: Add a hybrid oscillator (analg control in, digital out) with PWM
...
(pulse width modulation) capability, oscillation frequency is a parameter.
The model has been derived from the d_osc example.
2022-04-25 21:27:26 +02:00
Holger Vogt
7130097710
Prevent crash when no simulation has been run and
...
asking for plotting an event node
2022-02-19 17:23:36 +01:00
Giles Atkinson
16f586b65e
Respect the "tstart" parameter when saving event node data (XSPICE).
...
Fixes Support Request #47 : "XSpice memory usage (TRAN TSTART effect)".
2022-01-28 12:25:36 +01:00
Brian Taylor
08bc3ccdd6
Remove compiler warnings (writ_ifs.c ipcsockets.c).
2022-01-13 14:54:16 +01:00
Holger Vogt
f0e9a35eb6
Add 'esave' command to save only specific event nodes.
...
Add a prompt for esave/eprint/eprvcd.
2022-01-09 10:58:38 +01:00
Holger Vogt
9308c6b077
Reuse memory for queued events.
...
Patch #109 - 2 provided by Giles Atkinson
2022-01-03 22:11:03 +01:00
Holger Vogt
8263e2a4da
The AD and DA hybrid XSPICE bridges consume a lot of
...
memory (one state per time step added). Memory of
previous time steps is not recovered.
Patch #109 by Giles Atkinson reduces memory consumption
dramatically (> factor of 10).
2022-01-01 16:14:48 +01:00
Holger Vogt
9be9f46f96
Remove unused function Evt_Data_destroy()
2021-12-16 08:04:44 +01:00
Holger Vogt
2f98a5b305
evtprint: prevent a crash when eprint has been called
...
but there is no simulation run.
2021-12-13 21:44:02 +01:00
Holger Vogt
6b41ad433a
Remove memory leak
...
Free some tokens generated by CNVget_token
Initialize reset and clk
Still missing: free 'states'
2021-12-13 21:32:15 +01:00
Holger Vogt
36fa47a8a0
Remove memory leak
...
Add callback function free_local_data
Free some tokens generated by CNVget_token
2021-12-13 21:31:49 +01:00
Holger Vogt
c895ca33f7
Pswitch: Fix a bug in resistance calculation when cntl_on < cntl_off
...
Correct setting of parens
2021-10-29 16:35:47 +02:00
Holger Vogt
eee639d98d
Rename the capacitor and inductor code models to capacitoric and inductoric
...
8e4db9109 ("adms bsimbulk and bsimcmg implementation based on work from Robert Larice", 2020-12-17)
changed inptypelk.c, line 37 from strcmp to strcasecmp.
Thus Capacitor (model for C) and code model capacitor are no longer
distinguished. Model parsing for the code models fails.
These code models are used very infrequently, thus renaming them
is a valid fix.
2021-10-29 16:28:25 +02:00
Holger Vogt
4ce4f52938
XSPICE d_source: prevent a crash when the input file is not found
2021-09-29 20:30:10 +02:00
Holger Vogt
d4c559421e
prevent crash if info.node_table has not been defined,
...
caused by some preceding error.
2021-09-29 20:29:54 +02:00
Holger Vogt
6aac403ab0
XSPICE delay: add some more safeguards
2021-08-03 15:53:42 +02:00
Holger Vogt
028dd0ab88
Remove unused
...
Add a delay of half a time step to reduce error
2021-07-05 14:24:46 +02:00
Holger Vogt
abc6eb56f3
Plausibility checking
...
Enforce out=in when delay == 0
2021-07-05 14:24:29 +02:00
Holger Vogt
fbab9a0fe2
Add an analog delay source for transient simulation
...
Internal circular memory of size tstop/tstep or user defined.
(aprox.) every tstep a value is stored.
Delay time in multiples of tstep, by control voltage or user defined.
Dc or ac sim will simply connect input to output.
2021-07-05 14:24:06 +02:00
Holger Vogt
93f6a50553
New author
2021-07-05 14:20:14 +02:00
Holger Vogt
22a516bc4d
New author
2021-07-05 14:19:56 +02:00
Holger Vogt
d36fcaf34c
Neew pswitch with patch 0001-pswitch-fix.patch from Jube 3rd, 21 at
...
https://sourceforge.net/p/ngspice/discussion/127605/thread/d55d2322f2/#c966/b802/4764/2540/3b3f/04a4/bc51/3a68
Input resistance, numerically computed derivatives with auto-partial, reasonable limits.
2021-07-05 14:19:43 +02:00
Holger Vogt
f12592871a
Set derivative d out/d contrl to 0 if outside of switching range.
...
Disable auto derivatives.
Enable algorithmic derivatives.
2021-07-05 14:18:08 +02:00
Holger Vogt
6d9876229c
Fixes bug #331
...
Bug detected and analysed by Arsen Liash
Patch provided by Yurii Demchyna
2021-07-05 14:16:35 +02:00
Holger Vogt
19ddeb8fe6
formatting (not complete)
2021-07-02 11:54:59 +02:00
Holger Vogt
545d2f9177
Report an error when trying to define ports
...
'v', 'vd', 'i', and 'id' as 'inout'
Parch 105 provided by Giles Atkinson
2021-07-02 11:54:34 +02:00
Holger Vogt
d7feec20fe
enable parameter 'gain'
...
patch provided by Bohdan Tkhir
2021-02-21 16:48:28 +01:00
Holger Vogt
d45e95aa4c
We no longer want to install cmpp or other XSPICE files.
...
The manual describes making code models from inside
the ngspice build process, and that's what we support
right now.
2021-01-23 12:43:51 +01:00
Holger Vogt
a5eac333bb
Revert "When installing ngspice, do not install the headers"
...
This reverts commit 5a0d213fec .
2021-01-22 16:05:14 +01:00
Holger Vogt
176023f470
Remove compiler warnings
2021-01-03 14:28:22 +01:00
Holger Vogt
3c354092ff
Line endings from \r\n to \n
2021-01-02 19:06:58 +01:00
Holger Vogt
5a0d213fec
When installing ngspice, do not install the headers
...
(all *.h), nor install dlmain.c and cmpp. Nearly all
users are not interested in creating code models, it is
not documated, and a much better way to create (and test)
code models is from within the ngspice sources (as is
documented in the manual).
2020-12-22 17:56:18 +01:00
Holger Vogt
68e14ad519
cross compile: -lshlwapi not hard-coded,
...
but via $(cmpp_LDADD)
Patch suggested by Érico Rolim
2020-12-22 17:56:18 +01:00
Holger Vogt
5c4af54be1
Windows.h -> windows.h
2020-12-22 17:56:18 +01:00
Holger Vogt
92c6ff26f5
add a flag 'LIMIT' to pwl code model. If set true,
...
the output is kept constant at y[0] when x is less then
x[0], or at y[xmax] when x > xmax.
Default is FALSE, then the output beyond the x bounds is
extrapolated linearly, as usual up to now.
2020-12-22 11:11:03 +01:00
Holger Vogt
a95700799d
install the callback function
2020-10-16 18:15:05 +02:00
dwarning
75228612c0
few fixes for prototypes
2020-10-15 18:25:25 +02:00
Holger Vogt
4d062ecc92
fix a bug in the derivative
2020-10-10 13:54:39 +02:00
Holger Vogt
1f6c4d6338
Add a new code model pswitch, behaviour directly compatible
...
to PSPICE (rounded corner at cntl_on)
2020-10-10 13:53:47 +02:00
Holger Vogt
fdc143ce16
Add a limit capability to the code model aswitch
...
Example switch-oscillators_inc.cir showed currents up to 3GA
2020-10-10 13:53:36 +02:00
dwarning
5f7f54d961
cleaning prototypes
2020-10-10 12:30:40 +02:00
dwarning
5d999be998
rm redundant redeclaration
2020-10-10 12:30:22 +02:00
Holger Vogt
a3380903be
Fix a bug in the comment of the file headers
2020-10-10 12:22:43 +02:00
Holger Vogt
1bcfe886f3
GPL instead of BSD
2020-10-10 12:22:27 +02:00
Holger Vogt
468769df16
Update on various licences for XSPICE code models
2020-10-10 12:22:12 +02:00
Holger Vogt
2335639848
License 3-clause BSD
...
Update to license information
2020-10-10 12:22:01 +02:00
Holger Vogt
df0ffcfc2b
XSPICE is Public Domain
...
Update to license info
2020-10-10 12:21:35 +02:00
Holger Vogt
cc5369816b
XSPICE is in the public domain.
...
Update to the license information.
2020-10-10 12:21:22 +02:00
Holger Vogt
617ed01a5b
licensi info:
...
Public Domain
Georgia Tech Research Corporation
Atlanta, Georgia 30332
PROJECT A-8503
2020-10-10 12:21:10 +02:00
Carsten Schoenert
5a0ed18907
Small fixup for misspelled words
2020-08-20 15:22:48 +02:00
Holger Vogt
8051a3c351
remove calling MIFdestroy() that is empty
2020-08-20 15:19:49 +02:00
Holger Vogt
6f03ac77af
add missing library info
2020-05-08 00:00:12 +02:00
Mamoru TASAKA
fe207966d7
Fix compilation with gcc10 wrt multiple definitions issue
...
gcc10 now defaults to -fno-common (ref: https://gcc.gnu.org/gcc-10/changes.html ). Now with compiled with gcc10, multiple definitions are found which causes linker error as:
* --with-tcl:
```
/usr/bin/ld: table/table3D/cfunc.o:/builddir/build/BUILD/ngspice-32/ngspice/tclspice/src/xspice/icm/../../../src/include/../xspice/icm/dlmain.h:8: multiple definition of `coreitf'; table/dlmain.o:/builddir/build/BUILD/ngspice-32/ngspice/tclspice/src/xspice/icm/dlmain.c:45: first defined here
```
* --enable-oldapps
```
/bin/ld: frontend/com_history.o:(.data+0x4): multiple definition of `cp_maxhistlength'; ngsconvert.o:(.bss+0xa4): first defined here
collect2: error: ld returned 1 exit status
```
This commit fixes these issues.
2020-05-06 01:15:53 +09:00
Holger Vogt
3c8a2d914d
enable MINGW compilation by adding path information for config.h
2020-05-01 18:47:32 +02:00
Holger Vogt
3c2bece87f
prevent MINGW compiler warnings
2020-05-01 18:38:45 +02:00
Jim Monte
004b27bd92
remove path error, fix file extension
2020-04-27 10:25:35 +02:00
Jim Monte
18d825e9c1
#includes modified
2020-04-27 10:24:22 +02:00
Jim Monte
381d4ec43d
#includes modified
2020-04-27 10:23:59 +02:00
Jim Monte
ed8221afde
Initialize pointer
2020-04-27 10:22:24 +02:00
Jim Monte
68e34f5a94
error messages, callback function moved
2020-04-27 10:21:14 +02:00
Jim Monte
2cac192814
initialize variables, add 'default:'
2020-04-27 10:20:48 +02:00
Holger Vogt
050cea146e
correct zeroing of allnodes array
2020-04-25 10:24:25 +02:00
Holger Vogt
833751ab3f
fix typo
2020-04-25 10:24:02 +02:00
Holger Vogt
bad2a4e467
Guard XSPICE plot switching against circuit being removed already
2020-04-21 20:01:49 +02:00
Holger Vogt
ae2d207344
don't forget to free jobs->statistics[i]
2020-04-21 20:01:06 +02:00
Holger Vogt
3b5c272096
free mor data in jobs struct. Avoid memory leak upon 'quit' command.
2020-04-21 20:00:49 +02:00
Holger Vogt
bc0cef9371
remove all data enlisted in the jobs structure
2020-04-21 20:00:35 +02:00
Holger Vogt
bbb0007466
add function EVTswitch_plot() to switch the event data
...
according tothe (analog) plot. Called from plot_setcur()
in vetors.c, when command 'setplot xxx' is given.
2020-04-21 20:00:17 +02:00
Holger Vogt
d72b4c415f
get the plot name into the event job
2020-04-21 19:59:58 +02:00
Holger Vogt
b356b00014
Fixes bugs 476, 486: Reset code model init flag,
...
required when any run is called a second time.
2020-04-21 19:59:43 +02:00
dwarning
f19da3bd79
case correction for library name
2020-04-04 14:18:38 +02:00
Holger Vogt
c076c932b4
enable MINGW linking to -lShlwapi,
...
which failed during making 32 bit shared lib
2020-04-04 14:17:54 +02:00
Holger Vogt
96976ee49d
prevent non-English characters (e.g. Umlaute),
...
which gtkwave does not understand
2020-04-04 14:12:05 +02:00
Holger Vogt
2f23c58585
plug a memory leak (pll-xspice.cir)
2020-03-15 08:51:16 +01:00
dwarning
5e4c7a255e
update .gitignore and make clean
2020-03-15 08:51:15 +01:00
Holger Vogt
eab10ee065
prevent double closing of file (Linux does not NULL fp during fclose)
2020-03-15 08:51:14 +01:00
Holger Vogt
57e647c704
enable "null allowed" for reset input
2020-03-15 08:51:13 +01:00
Holger Vogt
28c0fbf397
Zero fp, this fixes bug no #475
2020-03-15 08:51:04 +01:00
Holger Vogt
c77da1870d
Fixed compiler warnings related to const, unreachable code, and an empty translation unit.
2020-03-15 08:51:03 +01:00
Holger Vogt
5bd45c0451
make path to dstring.c independent from build directory
2020-03-15 08:51:03 +01:00
Holger Vogt
5bc9a320eb
Revert "correct the path to dstring.c"
...
This reverts commit 28002be150 .
2020-03-15 08:51:03 +01:00
dwarning
129b219ed2
correct the path to dstring.c
2020-03-15 08:51:03 +01:00
Holger Vogt
5e76758e57
update to cmpp by J. Monte
2020-03-15 08:51:02 +01:00
Jim Monte
955dda749d
Jim Monte's update to cmpp
2020-03-15 08:51:02 +01:00
Holger Vogt
375a92d788
Fix of buffer overrun in interpolation at endpoint of interval.
...
Made cfunc.mod for tables more modular.
Prevented buffer overrun when building file name.
Added error checking for allocation failures in many locations.
Made binary search for interpolation more efficient.
2020-03-15 08:51:02 +01:00
Jim Monte
1867f5b727
Fix of buffer overrun in interpolation at endpoint of interval. Made cfunc.mod for tables more modular. Prevented buffer overrun when building file name. Added error checking for allocation failures in many locations. Made binary search for interpolation more efficient.
2020-03-15 08:51:02 +01:00
Jim Monte
b4757f934b
Added support for DSTRING in code modules with makefile builds
2020-03-15 08:51:02 +01:00
Jim Monte
b967caaabb
File path built more efficiently and now allows an arbitrary length. Prevented strdup() of NULL if path too long. Similarly prevented fopen with a NULL file name. Added function to determine Windows absolute paths properly. Fixed numerous issues that were caused by including Windows system header due to conflicting names. Generally a CMPP_ prefix was added as a "namespace". Also used the standard C bool type instead of defining one.
2020-03-15 08:51:01 +01:00
Jim Monte
7990a82f02
Formatting and comments added
2020-03-15 08:51:01 +01:00
Jim Monte
3a2a05f7b0
Removed unnecessary comparisons when lowercasing a string.
2020-03-15 08:51:01 +01:00
Holger Vogt
53613f4e69
deprecated gets() -> fgets()
2020-03-15 08:50:56 +01:00
Holger Vogt
39ce1f77d2
patch provided by Vito (see
...
https://sourceforge.net/p/ngspice/discussion/133842/thread/31aa24261e/ )
2020-03-15 08:50:56 +01:00
Holger Vogt
9452121954
Remove memory leaks in cmpp.
...
Two small ones (a few bytes) are still there, difficult to assess.
2020-03-15 08:50:51 +01:00
Holger Vogt
29b2799c22
plug a memory leak by CALLBACK,
...
deleting locally malloced memory
2020-03-15 08:50:51 +01:00
Holger Vogt
e89a92f944
prevent referencing a NULL pointer
...
free the loc pointer and NULL its origin STATIC_VAR (locdata)
(that translates to mif_private->inst_var[0]->element[0].pvalue)
2020-03-15 08:50:51 +01:00
Holger Vogt
2f396187fa
Better indentation of message
2019-10-05 13:17:30 +02:00
Holger Vogt
0575481206
Better info in case of error
...
Initited by a patch from Bohdan Tkhir
2019-10-05 13:17:22 +02:00