Removed static buffer in gen_idf

This commit is contained in:
ceriel
1992-10-22 16:56:28 +00:00
parent d687237b30
commit 8c801ca268
3 changed files with 12 additions and 9 deletions

View File

@@ -47,11 +47,12 @@ gen_idf()
anonymous name.
*/
static int name_cnt;
char buff[100];
char *s = Malloc(strlen(dot.tk_file) + 50);
sprint(buff, "#%d in %s, line %u",
sprint(s, "#%d in %s, line %u",
++name_cnt, dot.tk_file, dot.tk_line);
return str2idf(buff, 1);
s = Realloc(s, strlen(s)+1);
return str2idf(s, 0);
}
int