Merge pull request #39 from Klairm/multilang_experiment_C

This commit is contained in:
Kreyren 2020-02-07 13:38:44 +01:00 committed by GitHub
commit 6e18eb316e
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 5 deletions

8
src/bin/Makefile Normal file

@ -0,0 +1,8 @@
OBJS = main.c
CC = gcc
C_FLAGS = -w -pedantic
OBJ_NAME = main
all: $(OBJS)
$(CC) $(OBJS) $(C_FLAGS) -o $(OBJ_NAME)

@ -1,7 +1,19 @@
#include <stdio.h>
int main() {
// Refer to the documentation
printf("FIXME: %s\n", "Translate zernit into C lang");
return 1;
}
// FIXME: Does not build on clang
// FIXME-QA: Outputs warnings
int main(int argc, char ** argv[]) {
if(argc < 2) {
// FIXME: Add better help message
// FIXME: Source from po depending on language used
printf("%s\n", "Argument(s) required, use -h for display help");
return 2;
} else if(strcmp(argv[1], "-h") == 0) {
printf("FIXME: %s\n", "Add optionsi");
return 1;
} else {
printf("FATAL: %s\n", "Unexpected happend while processing arguments");
return 256;
}
}