Commit Graph

7854 Commits

Author SHA1 Message Date
Holger Vogt 966b69090d use only TMALLOC and TREALLOC for memory allocation 2020-03-15 08:50:56 +01:00
Holger Vogt a39808d880 update to Visual Studio 2019 2020-03-15 08:50:56 +01:00
Holger Vogt 53613f4e69 deprecated gets() -> fgets() 2020-03-15 08:50:56 +01:00
Holger Vogt 85e0a08cff error message even if pNAME is not defined 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 2040d45b1d O1 -> O0 for debug
Patch #71 provided by Taras Rosa
2020-03-15 08:50:56 +01:00
Holger Vogt 09f829b863 Further improvement of error message im 'meas' 2020-03-15 08:50:56 +01:00
Holger Vogt 94d5ad312e Improve error messages for the 'meas' command. 2020-03-15 08:50:56 +01:00
Jim Monte d4088c896a Restored command arguments accidentally deleted. 2020-03-15 08:50:56 +01:00
Jim Monte 4b145ddf5e Added #include <stdio.h> to define FILE. 2020-03-15 08:50:55 +01:00
Jim Monte 06ebf80983 Modified search for init file so that it searches both <HOME> and <USERPROFILE> if both are defined. 2020-03-15 08:50:55 +01:00
Jim Monte 2068c4fffb Added -D/--define option to define a variable from the command line. 2020-03-15 08:50:55 +01:00
Jim Monte 372fe2a5e7 Opened binary files for writing using "wb" in all cases 2020-03-15 08:50:55 +01:00
Jim Monte 21f3eb74b8 Added basic help messages in addtion to reference to web pages 2020-03-15 08:50:55 +01:00
Jim Monte de4788cfe5 Added conjugate function conj(). 2020-03-15 08:50:55 +01:00
Jim Monte a7946474fa Additional freeing of device-dependent information for bug #419 and related bugs. 2020-03-15 08:50:55 +01:00
Jim Monte d3343b1791 Removed redundant macro 2020-03-15 08:50:55 +01:00
Jim Monte b274366287 Minor formatting and punctuation change. 2020-03-15 08:50:55 +01:00
Jim Monte 0cf53a34b2 Fixed resolution of ~ to home directory. (Bug #405) Also fixed potential buffer overruns in glob expansion 2020-03-15 08:50:54 +01:00
Jim Monte ce5410d33f Fixed checking for redirection tokens 2020-03-15 08:50:54 +01:00
Jim Monte cec6a8edd3 Fixed access of freed memory when reporting an error. 2020-03-15 08:50:54 +01:00
Jim Monte 8141a634d7 Fixed several issues related to plotting and vector lifetimes and made ownership of vectors clearer. The issues in bugs 419, 423, 425, and 426 were related and were addressed here. 2020-03-15 08:50:54 +01:00
Jim Monte 57ffe1769f Fixed "phantom vector" issue with plots and crash when plots are resized. See bugs #419 and #423 for details. Also several parameters were changed from char * to const char * in the plotting functions. 2020-03-15 08:50:54 +01:00
Jim Monte 9d2c105942 Fixed bug with 255 card deck entered using circbyline 2020-03-15 08:50:54 +01:00
Jim Monte e1ec2a21dd Added error recovery when invalid foreach statement found 2020-03-15 08:50:54 +01:00
Jim Monte 690b7730fe Fixed memory leak when empty word found. 2020-03-15 08:50:54 +01:00
Jim Monte 7617bbfae9 Reduced the number of configuration changes that must be made when a new version of ngspice is released. 2020-03-15 08:50:54 +01:00
Jim Monte b120e7bd21 Fixed reporting of system information in Windows. 2020-03-15 08:50:53 +01:00
Jim Monte 271afc87cf Made UI more consistent when comments are entered. 2020-03-15 08:50:53 +01:00
Jim Monte 2df00ad8c9 Cleaned up defintions of macro constants 2020-03-15 08:50:53 +01:00
Jim Monte 2f3b9d0f2d Used Win32 function PathIsRelativeA() to identify an absolute path instead of checking the string since the system function may handle more cases (network shares, etc.). Also reviewed formatting that was done on inpcom.c by a code beautifier in an earlier commit. Nearly all of it was an improvement, but a few cases were reverted back to closer to the original form. One particular instance was comments where a list of steps was given one per line. 2020-03-15 08:50:53 +01:00
Jim Monte 70600258bb Made checking for single-character words faster. The testing now also uses less memory and works for 8-bit characters, which would have previously caused buffer overruns. It is also more modular and has additional documentation. 2020-03-15 08:50:53 +01:00
Holger Vogt 77763a181d Fixed some comments that appear to have been missed when compile_min.sh was used to create compile_linux.sh 2020-03-15 08:50:53 +01:00
Jim Monte 92725594f3 Used the new capabilities of ft_numparse() to allow the creation of variables and list items of type CP_NUM 2020-03-15 08:50:53 +01:00
Jim Monte ad970ae4e7 Made cp_enqvar() mode modular by adding a separate function to handle the case of a vector. Lists are more efficiently handled by moving common comparisons out of the loop over elements. The first argument of cp_enqvar() is changed from char * to const char * since the name of the variable being found is not altered by the function. 2020-03-15 08:50:53 +01:00
Jim Monte 72801b1ab1 Fixed buffer resizing, made string utilities more modular, and added several new utilities, some which do not require a null termination, potentially avoiding the need to copy a string. Also some substring utilities using the Rabin-Karp algorithm were added. 2020-03-15 08:50:52 +01:00
Jim Monte f7951af50b Fixed locating vectors like V(node) 2020-03-15 08:50:52 +01:00
Jim Monte 66e79e1b39 Modified regression tests for library processing to make indication of failures more robust 2020-03-15 08:50:52 +01:00
Jim Monte 81fa829b7d Fixed potential infinite loop (until memory is exhausted) and added several utility functions for processing strings. 2020-03-15 08:50:52 +01:00
Jim Monte 068df274bf Made ft_numparse() thread-safe (no internal static variables) and prepared to support ngspice variable type CP_NUM. 2020-03-15 08:50:52 +01:00
Holger Vogt 89411e2fe4 Fixed merge conflict. Also made readifile() static and removed an unnecessary string duplication there. 2020-03-15 08:50:52 +01:00
Jim Monte 873e4a8db0 Added no_histsubst option and related fixes 2020-03-15 08:50:52 +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
Holger Vogt 74a1a0b211 Update to Visual Studio 2019 2020-03-15 08:50:52 +01:00
Jim Monte 75d233c40d If the prompt variable was set to a value that is not a string, memory that has been freed would be used when displaying the command prompt. This could lead to strange prompts and possible access violations, although it may appear to work OK if the freed memory has not been modified. This issue is fixed. Some useless duplications of strings when defining variables are also removed. 2020-03-15 08:50:51 +01:00
Jim Monte b677ae1611 The check for the scale vector was not comparing the name in a case-insensitive manner, so unlet Yes would delete the default yes scale vector, for example. That issue was corrected. The code was also made more modular and descriptive regarding the check for the scale vector. Also, the warning now prints the scale vector as it is stored to make clear that vector names are not case sensitive. 2020-03-15 08:50:51 +01:00
Jim Monte b7d8c61cd9 Cleaned up code to locate a vector in a plot by name. The code was made more modular, and special names like allv are handled more efficiently 2020-03-15 08:50:51 +01:00
Jim Monte c7b95587de Fixed compiler warnings regarding type of argument passed 2020-03-15 08:50:51 +01:00
Jim Monte c368f32039 Added a macro R_MIN to define the minimum resistance value aS 0.01 and replaced the numeric value with the macro in the sourc code. 2020-03-15 08:50:51 +01:00
Jim Monte 89efe5aeae Dynamic string (dstring) rework 2020-03-15 08:50:51 +01:00