From fb1970e25a7935d75d9f80e6074d2d4fb1fe621c Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 11 Nov 2018 13:54:22 +0100 Subject: [PATCH] add gc functions to replace MIFgettok and MIFget_token --- src/xspice/mif/mif_inp2.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/xspice/mif/mif_inp2.c b/src/xspice/mif/mif_inp2.c index 569caf583..a7c36290c 100644 --- a/src/xspice/mif/mif_inp2.c +++ b/src/xspice/mif/mif_inp2.c @@ -88,7 +88,11 @@ static void MIFget_port( Mif_Status_t *status); +static char *MIFgettok_gc(char **line); +static char *MIFget_token_gc(char **s, Mif_Token_Type_t *type); +#define MIFgettok MIFgettok_gc +#define MIFget_token MIFget_token_gc /* ********************************************************************* */ @@ -232,7 +236,6 @@ MIF_INP2A ( line = current->line; tmp_token = MIFgettok(&line); /* read instance name again . . . .*/ - tfree(tmp_token); /* OK -- now &line points to the first token after the instance name and we are ready to process the connections @@ -966,6 +969,19 @@ MIFget_port( } +#undef MIFgettok +#undef MIFget_token + +static char *MIFgettok_gc(char **line) +{ + return MIFgettok(line); +} + +static char *MIFget_token_gc(char **s, Mif_Token_Type_t *type) +{ + return MIFget_token(s, type); +} +