basic j2 setup
This commit is contained in:
4
j2-Baulwuerfe/CMakeLists.txt
Normal file
4
j2-Baulwuerfe/CMakeLists.txt
Normal 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
14
j2-Baulwuerfe/src/main.c
Normal 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);
|
||||
Reference in New Issue
Block a user