Implement __sysremove for sim65

This will allow using unlink()/remove() in sim65 programs
Use it to unlink fgets' test output file
This commit is contained in:
Colin Leroy-Mira
2024-01-25 09:12:46 +01:00
parent 65937684a0
commit 0dd7b0c3a5
5 changed files with 106 additions and 5 deletions

View File

@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
FILE *in, *out;
char buf[32];
@@ -34,6 +35,7 @@ int main(int argc,char **argv)
printf("Error: file pointer should be in error state\n");
}
fclose(out);
unlink(outfile_path);
in = fopen(INFILE, "rb");
if (in == NULL) {