j1: input file as argumnet

This commit is contained in:
2020-11-04 21:31:47 +01:00
parent 8d6c0c7440
commit 1a2ab09673
2 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -16,9 +16,11 @@ void pointerCheck(void *pointer) {
}
}
int main() {
int main(int argc, char *argv[]) {
if(argc != 2) printf("file argument required");
bool sucess;
char *woerterText = acl_ReadTextFile("wörter.txt", &sucess);
FILE *fp = fopen(argv[1], "rb");
char *woerterText = acl_ReadTextFile(fp, &sucess);
if(!sucess) perror("Error: ");
unsigned len = strlen(woerterText);
uintptr_t dest = (uintptr_t)woerterText + len;