summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58d184e)
raw | patch | inline | side by side (parent: 58d184e)
author | Florian Forster <ff@octo.it> | |
Sun, 2 May 2010 07:29:08 +0000 (09:29 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 2 May 2010 07:29:08 +0000 (09:29 +0200) |
Makefile | patch | blob | history | |
action_graph.c | [new file with mode: 0644] | patch | blob |
action_graph.h | [new file with mode: 0644] | patch | blob |
test.fcgi.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index beef56c1a4911f0ce43f9c61b2a95b76bb850cf3..54c269ad9934466c50be78ae21501178f0114321 100644 (file)
--- a/Makefile
+++ b/Makefile
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
--- /dev/null
+++ b/action_graph.c
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <fcgiapp.h>
+#include <fcgi_stdio.h>
+
+#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
--- /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 d8edea73aa3007b9ff85bd7d872a33df71b2968c..e8d9bcb87ccd54f1a327f1f122f4f6421651c1df 100644 (file)
--- a/test.fcgi.c
+++ b/test.fcgi.c
#include "graph_list.h"
#include "utils_params.h"
+#include "action_graph.h"
#include "action_list_graphs.h"
struct action_s
static const action_t actions[] =
{
+ { "graph", action_graph },
{ "list_graphs", action_list_graphs },
{ "usage", action_usage }
};