From 1ce5a676fb20ca55ea92c68ac3c37086c156bf71 Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 4 May 2024 15:47:32 +0000 Subject: [PATCH] here git-svn-id: file:///raid/svn-main/nishi-clover/trunk@2 cc13bd98-b292-b64a-ad22-c0789b689ca7 --- Makefile | 20 ++++++++++++++++++++ clover.c | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Makefile create mode 100644 clover.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..117d9a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# $Id$ + +CC = cc +CFLAGS = -g -std=c99 +LDFLAGS = +LIBS = + +CLOVER_OBJS = clover.o + +.PHONY: all + +all: ./clover + +.SUFFIXES: .c .o + +./clover: $(CLOVER_OBJS) + $(CC) $(LDFLAGS) -o $@ $(CLOVER_OBJS) $(LIBS) + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< diff --git a/clover.c b/clover.c new file mode 100644 index 0000000..4366fc3 --- /dev/null +++ b/clover.c @@ -0,0 +1,18 @@ +/* $Id$ */ +#include +#include + +#define CLOVER_VERSION "0.00" + +int parse_config(const char* path){ + FILE* f = fopen(path, "r"); + if(f == NULL) return 1; +} + +int main(int argc, char** argv){ + if(argv[1] == NULL){ + return parse_config("clover.conf"); + }else{ + return parse_config(argv[1]); + } +} -- 2.43.0