added a funny, a test file, and the program

This commit is contained in:
Audy 2022-05-17 09:02:05 -06:00
commit ed495aa83b
5 changed files with 38 additions and 0 deletions

BIN
balls.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

35
george_interpreter.c Normal file
View File

@ -0,0 +1,35 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
char s_toin[260];
char toin[260];
FILE *filein;
int unin[1024];
int in[1024];
void openfile() {
printf("file to open...\n"); //open the file
scanf("%260s", s_toin);
printf("opening %s...\n",&toin);
snprintf(toin, sizeof(toin), "%s", s_toin); //put filename in string that fopen likes
if (access(toin, F_OK) == 0) { //does file exsist?
filein = fopen(toin, "r"); //file exsists, open it
} else {
printf("error opening %s, press any key to exit...", &toin); //file doesnt exsist, exit
getch();
exit(1);
}
fprintf(filein,"%s",*unin);
printf("fprintf\n");//debug
for (int j = 0; j < 1024; j++) {
printf()//maybe just printf a string
}
}
int main() {
openfile();
exit(0);
}

BIN
george_interpreter.exe Normal file

Binary file not shown.

BIN
george_interpreter.o Normal file

Binary file not shown.

3
test.george Normal file
View File

@ -0,0 +1,3 @@
test
balls
george