add gc functions to replace MIFgettok and MIFget_token

This commit is contained in:
Holger Vogt 2018-11-11 13:54:22 +01:00
parent ccb7fa410b
commit fb1970e25a
1 changed files with 17 additions and 1 deletions

View File

@ -88,7 +88,11 @@ static void MIFget_port(
Mif_Status_t *status); 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; line = current->line;
tmp_token = MIFgettok(&line); /* read instance name again . . . .*/ tmp_token = MIFgettok(&line); /* read instance name again . . . .*/
tfree(tmp_token);
/* OK -- now &line points to the first token after /* OK -- now &line points to the first token after
the instance name and we are ready to process the connections 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);
}