Modified Files:
Tag: TCLSPICE src/frontend/ChangeLog src/frontend/quote.c fix returned pointer
This commit is contained in:
parent
29b8f46f0a
commit
e861f336b3
|
|
@ -1,3 +1,6 @@
|
|||
2003-07-08 Stefan Jones <stefan.jones@multigig.com>
|
||||
* quote.c: return the pointer to the start of malloced
|
||||
memory so it can be freeded
|
||||
2003-05-02 Stuart Brorson <SDB@cloud9.net>
|
||||
* Major changes in subckt.c to handle POLY attributes in
|
||||
dependent sources. Added new case to switch in "translate" to
|
||||
|
|
|
|||
|
|
@ -78,14 +78,15 @@ cp_unquote(char *string)
|
|||
char *s;
|
||||
int l;
|
||||
if (string) {
|
||||
s = copy(string);
|
||||
l = strlen(string);
|
||||
s = MALLOC(l+1);
|
||||
|
||||
if (*s == '"')
|
||||
s++;
|
||||
if (*string == '"' && string[l-1] == '"') {
|
||||
strncpy(s,string+1,l-2);
|
||||
s[l-2] = '\0';
|
||||
} else
|
||||
strcpy(s,string);
|
||||
|
||||
l = strlen(s) - 1;
|
||||
if (s[l] == '"')
|
||||
s[l] = '\0';
|
||||
return (s);
|
||||
} else
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue