From 7e8bef2ff6fcec4812a6075cd7e690d9b13bec0d Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 2 May 2010 09:29:08 +0200 Subject: [PATCH] action graph: Initial code. --- Makefile | 4 +++- action_graph.c | 21 +++++++++++++++++++++ action_graph.h | 7 +++++++ test.fcgi.c | 2 ++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 action_graph.c create mode 100644 action_graph.h diff --git a/Makefile b/Makefile index beef56c..54c269a 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,14 @@ graph_list.o: graph_list.c graph_list.h utils_params.o: utils_params.c utils_params.h +action_graph.o: action_graph.c action_graph.h + action_list_graphs.o: action_list_graphs.c action_list_graphs.h test: test.c utils_params.o test.fcgi: LDLIBS = -lfcgi -test.fcgi: test.fcgi.c common.o graph_list.o utils_params.o action_list_graphs.o +test.fcgi: test.fcgi.c common.o graph_list.o utils_params.o action_graph.o action_list_graphs.o .PHONY: clean diff --git a/action_graph.c b/action_graph.c new file mode 100644 index 0000000..afad488 --- /dev/null +++ b/action_graph.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include + +#include +#include + +#include "action_graph.h" +#include "graph_list.h" +#include "utils_params.h" + +int action_graph (void) +{ + printf ("Content-Type: text/plain\n\n" + "Hello, this is %s\n", __func__); + + return (0); +} /* }}} int action_graph */ + +/* vim: set sw=2 sts=2 et fdm=marker : */ diff --git a/action_graph.h b/action_graph.h new file mode 100644 index 0000000..712f398 --- /dev/null +++ b/action_graph.h @@ -0,0 +1,7 @@ +#ifndef ACTION_GRAPH_H +#define ACTION_GRAPH_H 1 + +int action_graph (void); + +#endif /* ACTION_GRAPH_H */ +/* vim: set sw=2 sts=2 et fdm=marker : */ diff --git a/test.fcgi.c b/test.fcgi.c index d8edea7..e8d9bcb 100644 --- a/test.fcgi.c +++ b/test.fcgi.c @@ -16,6 +16,7 @@ #include "graph_list.h" #include "utils_params.h" +#include "action_graph.h" #include "action_list_graphs.h" struct action_s @@ -38,6 +39,7 @@ static int action_usage (void); static const action_t actions[] = { + { "graph", action_graph }, { "list_graphs", action_list_graphs }, { "usage", action_usage } }; -- 2.30.2