Commit Graph

149 Commits

Author SHA1 Message Date
Holger Vogt 5cb5d218c9 Remove the obsolete RETSIGTYPE, replace by void 2023-03-18 14:30:29 +01:00
Holger Vogt 3ff9643f49 Add a scale factor 'a' (atto, 1e-18) 2023-03-18 14:30:03 +01:00
Holger Vogt b798076415 make comment more verbose 2022-04-26 10:34:21 +02:00
Holger Vogt 9bb401d9cd Add a 'qsort' dummy according to current compiler standards.
Detected during the very rare condition of not finding a 'qsort'
during the ./configure step.
2021-07-05 14:31:08 +02:00
Holger Vogt e8aea4967c Remove some compiler warnings 2021-01-02 19:00:48 +01:00
holger 569bc228fd If code completetion is deselected, don't add keywords or key commands.
To prevent a crash in shared ngspice
2020-08-20 15:22:36 +02:00
Jim Monte 7f82a4e036 FALLTHROUGH 2020-04-27 10:22:58 +02:00
Jim Monte 1d62ae2d97 type casts 2020-04-27 10:22:40 +02:00
Holger Vogt ded6bbbe34 make declaration inline 2020-03-15 08:51:16 +01:00
Holger Vogt 8ff4c7cd3b just another remains of quote 2020-03-15 08:51:12 +01:00
Holger Vogt 7f085144a9 remove all the remains of quote() and strip() that had been
used to modify the eigths bit of a character or string.
The functions had been switched off some time ago.
We now need all bits of a char for extended ascii or utf8
2020-03-15 08:51:12 +01:00
Vogt e628fd8977 just use strcmp instead of wrapper function 2020-03-15 08:51:02 +01:00
Jim Monte a53cd3a3e9 fixed path created by ngdirname in Windows. Also added const to parameters whose arguments do not change and fixed some potential buffer overruns. 2020-03-15 08:51:02 +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 271afc87cf Made UI more consistent when comments are entered. 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
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
Jim Monte 873e4a8db0 Added no_histsubst option and related fixes 2020-03-15 08:50:52 +01:00
Jim Monte 0fbff063b8 bug #408: prevent invalid data or crash by not reading beyond end of string 2019-08-13 23:35:17 +02:00
Jim Monte b66412f517 [PATCH] Changed prototypes of some functions having parameters that
should not be changed to const and added assorted comments. Also two very
 minor efficiency improvements.
2019-08-13 23:20:21 +02:00
rlar b803b294b4 frontend/parser/lexical.c, cp_lexer(), allow # and * comment
Both, whether interactive or not.
Especially for command scripts.
2018-02-26 19:41:04 +01:00
h_vogt 31dca54eba input.c, don't use read() in __MINGW32__ 2017-02-22 19:28:22 +01:00
rlar d9e7ab2759 input.c, simplify #ifdef for the broken visual studio _read()
If we have _MSC_VER so we have either CONSOLE HAS_WINGUI or SHARED_MODULE
If we have SHARED_MODULE, then we most certainly don't need
  the unbuffered read(), which isn't unbuffered on _MSC_VER anyway.
Thus _MSC_VER is sufficient.
2017-02-22 19:26:48 +01:00
rlar 1475df2aa4 input.c, try to work around microsofts broken _read()
concerning the visual sudio variant of the "console" build.

Their _read() returns 0 when a linfeed is read.
Ironically the linefeed seems to be stored into the buffer nontheless.

Because the filehandle is in linebuffered mode anyway,
  (the read won't return up until the terminating newline is entered)
we can just as well use getc(), which doesn't seem to suffer
  from the same problem in their implementation.
2017-02-22 19:25:01 +01:00
rlar d9e0ae3504 parser/glob.c, bug fix, access to already freed memory 2016-07-30 21:04:11 +02:00
rlar d58fd306f3 input.c, inchar(), cleanup 2016-04-01 20:05:37 +02:00
h_vogt 0443a2690c glob.c, brac1(), fix a memory leak 2016-04-01 18:25:10 +02:00
h_vogt c332b33d23 parser/lexical.c, #10/10, add some comments 2016-03-22 15:51:58 +01:00
rlar a551f87652 parser/lexical.c, #9/10, use dynamic buffer allocation 2016-03-22 15:51:48 +01:00
rlar 2d480637c9 parser/lexical.c, #8/10, use a struct to store the buffer state 2016-03-22 15:51:36 +01:00
rlar 615b8a4598 parser/lexical.c, #7/10, use `copy_substring()' 2016-03-22 15:51:13 +01:00
rlar 9a7e915a9f parser/lexical.c, #6/10, cleanup 2016-03-22 15:51:04 +01:00
rlar 8f09c35c5a parser/lexical.c, #5/10, change buf/linebuf usage
properly '\0' terminate the buffers where needed
instead of an unspecific bzero() invocation
2016-03-22 15:50:52 +01:00
rlar b7f3dbc0fe parser/lexical.c, #4/10, rename `cw' --> `wlist_tail' 2016-03-22 15:50:48 +01:00
rlar 4cabf8fa6c parser/lexical.c, #3/10, move the `wlist' and `cw' resetting
to the label `nloop'
2016-03-22 15:50:09 +01:00
rlar a0f5111436 parser/lexical.c, #2/10, move the `wlist' and `cw' resetting
nearer to the `goto nloop'
2016-03-22 15:50:03 +01:00
rlar a2af93685f parser/lexical.c, #1/10, this condition is allways true 2016-03-22 15:26:33 +01:00
rlar 4c1c95e20f everywhere, use `TMALLOC()' instead of `alloc()' 2016-03-21 21:22:07 +01:00
rlar 71a7c3459b use char variants of the <ctype.h> isxxxx() family 2016-03-09 20:24:36 +01:00
rlar 192eeadb0b remove crufty comments which where used to support broken text editors 2015-09-24 18:23:54 +02:00
rlar 7bc6374138 cleanup, use '\0' instead of 0 in char context 2015-05-02 10:24:54 +02:00
rlar cc235294ec lexical.c, change semantics of an ESCAPE in a given input `string'
now simply skip it.

presumably and in accordance to what the comments seems to suggest
  ESCAPE never was really meant to be read as '['
  but was replaced just to get it out of way deeper in the for loop
  where an ESCAPE starts an ancient mechanism to reenter
    interactive input via a terminals TIOCSTI capability
2014-04-15 21:16:50 +02:00
rlar cb75a749b8 lexical.c, avoid to read beyond end of `string' 2014-04-15 21:16:49 +02:00
rlar f42b5b16c7 lexical.c, simplify 2014-04-15 21:16:48 +02:00
rlar 8c7ae0d61c lexical.c, simplify using cp_readchar() 2014-04-15 21:16:46 +02:00
rlar 448099ef94 lexical.c, new function cp_readchar() for abstraction 2014-04-15 21:12:46 +02:00
rlar 2555eeadef fix the csh-problem $foo[$bar] and $foo[$&baz] 2013-12-31 16:13:00 +01:00
rlar 909f087237 cp_variablesubst() and cp_bquote(), rewrite 2013-12-31 16:12:59 +01:00
rlar 9eab66131d cp_variablesubst() and cp_bquote(), rewrite 2013-12-31 16:12:58 +01:00
h_vogt d7e291c53a HAS_WINDOWS --> HAS_WINGUI
allow compilation on MS Windows without GUI
2013-12-31 12:56:57 +01:00