initial commit .. just some basics
authorChristian Thaeter <ct@pipapo.org>
Sun, 30 Sep 2007 01:39:38 +0000 (03:39 +0200)
committerChristian Thaeter <ct@pipapo.org>
Sun, 30 Sep 2007 01:39:38 +0000 (03:39 +0200)
rxpd.c [new file with mode: 0644]
rxpd.h [new file with mode: 0644]

diff --git a/rxpd.c b/rxpd.c
new file mode 100644 (file)
index 0000000..23a2557
--- /dev/null
+++ b/rxpd.c
@@ -0,0 +1,8 @@
+
+
+
+#define RXPD_CMD(cmd) #cmd":"
+enum RXPD_COMMANDS;
+#undef RXPD_CMD
+
+//       int stat(const char *path, struct stat *buf);
diff --git a/rxpd.h b/rxpd.h
new file mode 100644 (file)
index 0000000..782157b
--- /dev/null
+++ b/rxpd.h
@@ -0,0 +1,55 @@
+#ifndef RXPD_H
+#define RXPD_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <regex.h>
+#include <>
+#include "llist.h"
+
+#define RXPD_COMMANDS                           \
+{                                               \
+  RXPD_CMD(CHECK),                              \
+  RXPD_CMD(APPEND),                             \
+  RXPD_CMD(PREPEND),                            \
+  RXPD_CMD(REMOVE),                             \
+  RXPD_CMD(REPLACE),                            \
+  RXPD_CMD(LOAD),                               \
+  RXPD_CMD(SAVE),                               \
+  RXPD_CMD(DUMP),                               \
+  RXPD_CMD(LIST),                               \
+  RXPD_CMD(END)                                 \
+}
+
+#define RXPD_CMD(cmd) RXPD_CMD_##cmd
+enum RXPD_COMMANDS;
+#undef RXPD_CMD
+
+struct base
+{
+  char* rulesdir;
+  void* files;
+};
+
+
+struct file
+{
+  char* filename;
+  struct stat last_stat;
+  llist rules;
+};
+
+
+struct rule
+{
+  char* string;
+  char* regex;
+  regex_t rx;
+  llist node;
+};
+
+
+
+
+#endif