Modified Files:

Tag: TCLSPICE
 	src/frontend/ChangeLog src/frontend/quote.c

	fix returned pointer
This commit is contained in:
stefanjones 2003-07-08 14:46:09 +00:00
parent 29b8f46f0a
commit e861f336b3
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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;