Do not set Bit 8 in an ANSI char, when \ or ^ occured in a string.
Thus the full ANSI set is now available in ngspice strings. The setting of Bit 8 was not exploitet anywhere, but did not allow using the characters from extended ANSI.
This commit is contained in:
parent
237406fb02
commit
360d1d7985
|
|
@ -185,13 +185,13 @@ nloop:
|
||||||
|
|
||||||
if (c != EOF) /* Don't need to do this really. */
|
if (c != EOF) /* Don't need to do this really. */
|
||||||
c = strip(c);
|
c = strip(c);
|
||||||
|
#ifdef QUOTE_CHAR
|
||||||
/* if '\' or '^', add following character to linebuf */
|
/* if '\' or '^', add following character to linebuf */
|
||||||
if ((c == '\\' && DIR_TERM != '\\') || (c == '\026') /* ^V */ ) {
|
if ((c == '\\' && DIR_TERM != '\\') || (c == '\026') /* ^V */ ) {
|
||||||
c = quote(cp_readchar(&string, cp_inp_cur));
|
c = quote(cp_readchar(&string, cp_inp_cur));
|
||||||
push(&linebuf, strip(c));
|
push(&linebuf, strip(c));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* if reading from fcn backeval() for backquote subst. */
|
/* if reading from fcn backeval() for backquote subst. */
|
||||||
if ((c == '\n') && cp_bqflag)
|
if ((c == '\n') && cp_bqflag)
|
||||||
c = ' ';
|
c = ' ';
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,16 @@ wordlist *wl_chop_rest(wordlist *wlist);
|
||||||
wordlist *wl_find(const char *string, const wordlist *wlist);
|
wordlist *wl_find(const char *string, const wordlist *wlist);
|
||||||
void wl_delete_slice(wordlist *from, wordlist *to);
|
void wl_delete_slice(wordlist *from, wordlist *to);
|
||||||
|
|
||||||
|
#ifdef QUOTE_CHAR
|
||||||
/* For quoting individual characters. '' strings are all quoted, but
|
/* For quoting individual characters. '' strings are all quoted, but
|
||||||
* `` and "" strings are maintained as single words with the quotes
|
* `` and "" strings are maintained as single words with the quotes
|
||||||
* around them. Note that this won't work on non-ascii machines. */
|
* around them. Note that this won't work on non-ascii machines. */
|
||||||
#define quote(c) ((c) | 0200)
|
#define quote(c) ((c) | 0200)
|
||||||
#define strip(c) ((c) & 0177)
|
#define strip(c) ((c) & 0177)
|
||||||
|
#else
|
||||||
|
#define quote(c) (c)
|
||||||
|
#define strip(c) (c)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue