Prototype duplication fixes; split out engine.js into multiple components

This commit is contained in:
2023-09-07 21:46:35 +00:00
parent acecf2fde9
commit a4111b01a5
17 changed files with 1379 additions and 1367 deletions

View File

@@ -177,7 +177,7 @@ unsigned char *slurp_file(const char *filename, size_t *size)
return slurp;
}
char *slurp_text(const char *filename)
char *slurp_text(const char *filename, size_t *size)
{
size_t len;
char *str = slurp_file(filename, &len);
@@ -185,6 +185,7 @@ char *slurp_text(const char *filename)
memcpy(retstr, str, len);
retstr[len] = 0;
free(str);
if (size) *size = len;
return retstr;
}