basic j2 setup

This commit is contained in:
2020-11-05 16:24:35 +01:00
parent b0428dfe78
commit b85ef617d0
4 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,4 @@
file(GLOB J2SOURCES "src/*.c")
file(GLOB ACLSOURCES "../lib/acl/src/*.c")
add_executable(j2 ${J1SOURCES} ${ACLSOURCES})
target_link_libraries(j2 PRIVATE m)

14
j2-Baulwuerfe/src/main.c Normal file
View File

@ -0,0 +1,14 @@
#include <stdio.h>
void pointerCheck(void *pointer) {
if(pointer == NULL) {
perror("Error: ");
exit(-1);
}
}
int main(int argc, char *argv[]) {
if(argc != 2) printf("file argument required");
bool sucess;
FILE *fp = fopen(argv[1], "rb");
char *input = acl_ReadTextFile(fp, &sucess);