- another unused function.

This commit is contained in:
Christoph Oelckers 2020-09-13 09:45:37 +02:00
parent 19a26f7959
commit aac87fc2cf
2 changed files with 0 additions and 19 deletions

View file

@ -22,7 +22,6 @@ int32_t scriptfile_getlinum(const scriptfile *sf, const char *ptr);
int32_t scriptfile_getbraces(scriptfile *sf, char **braceend);
scriptfile *scriptfile_fromfile(const char *fn);
scriptfile *scriptfile_fromstring(const char *string);
void scriptfile_close(scriptfile *sf);
int scriptfile_eof(scriptfile *sf);

View file

@ -317,24 +317,6 @@ scriptfile *scriptfile_fromfile(const char *fn)
return sf;
}
scriptfile *scriptfile_fromstring(const char *string)
{
if (!string) return nullptr;
uint32_t flen = strlen(string);
char * tx = (char *)Xmalloc(flen + 2);
scriptfile *sf = (scriptfile *)Xmalloc(sizeof(scriptfile));
memcpy(tx, string, flen);
tx[flen] = tx[flen+1] = 0;
scriptfile_preparse(sf,tx,flen);
sf->filename = NULL;
return sf;
}
void scriptfile_close(scriptfile *sf)
{
if (!sf) return;