summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-05-09 12:02:24 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-05-09 12:02:24 (GMT)
commitc5b10564f908b791be3830ae5338c8e66c11fa67 (patch)
treee8938a40cac280db4a19b30a53a5bffaec69ea3b
parent0b6c47f5b2f17fd35f8624c3c0eedd9d6af040bc (diff)
download2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.zip
2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.tar.gz
2iv55-c5b10564f908b791be3830ae5338c8e66c11fa67.tar.bz2
deleted reset app as it is obsoleted by db_demo
-rw-r--r--reset/Makefile15
-rwxr-xr-xreset/resetbin7985 -> 0 bytes
-rw-r--r--reset/reset.c43
-rw-r--r--reset/reset.h25
4 files changed, 0 insertions, 83 deletions
diff --git a/reset/Makefile b/reset/Makefile
deleted file mode 100644
index 9f796b7..0000000
--- a/reset/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# House of mozart statistic reseter (c) 2003 Oliver
-# -================================================-
-
-CC = gcc
-CFLAGS += -O2 -I`pg_config --includedir` -L`pg_config --libdir` -lpq
-
-DESTDIR = /usr/local/bin
-BIN = reset
-
-all:
- $(CC) $(CFLAGS) reset.c -o $(BIN)
-
-
-clean:
- rm -rf *~ *.o $(BIN)
diff --git a/reset/reset b/reset/reset
deleted file mode 100755
index 7c80129..0000000
--- a/reset/reset
+++ /dev/null
Binary files differ
diff --git a/reset/reset.c b/reset/reset.c
deleted file mode 100644
index 5a851ca..0000000
--- a/reset/reset.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * reset.c
- * House of Mozart statistic database reset app (c) 2003 oliver
- *
- * GNU public license *FIXME*
- */
-
-#include "reset.h"
-#include <stdio.h>
-#include <getopt.h>
-#include <time.h>
-#include <libpq-fe.h>
-
-int main(int argc, char *argv[]) {
- PGconn *conn;
- char SQL_query[512];
- PGresult *res;
-
- conn = PQsetdbLogin(PGHOST, PGPORT, PGOPTIONS, PGTTY, DBNAME, LOGIN, PWD);
-
-
- if(CONNECTION_BAD == PQstatus(conn)) {
- fprintf(stderr, "Connection to database '%s' failed.\n %s", DBNAME, PQerrorMessage(conn));
- PQfinish(conn);
- return 1;
- }
-
- sprintf(SQL_query, "");
- res = PQexec(conn, SQL_query);
-
-
- if((NULL == res) || (PGRES_COMMAND_OK != PQresultStatus(res))) {
- printf("Unable to execute query: %s\n %s\n", SQL_query, PQerrorMessage(conn));
- PQclear(res);
- PQfinish(conn);
- return 1;
- }
- PQclear(res);
-
- PQfinish(conn);
-
- return 0;
-}
diff --git a/reset/reset.h b/reset/reset.h
deleted file mode 100644
index 51dd0e0..0000000
--- a/reset/reset.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * reset.h
- * House of Mozart statistic database reset app (c) 2003 oliver
- *
- * GNU public license *FIXME*
- */
-
-#define VERSION 0.0.1
-
-#define PGHOST "matchblox.schinagl.nl"
-#define PGPORT "5432"
-#define PGOPTIONS "\0"
-#define PGTTY "\0"
-#define DBNAME "2iv55"
-#define LOGIN "2iv55"
-#define PWD "uhtfiwwp"
-
-#define SHORTHELP \
-"Not enough or incorrect arguments try -h for help\n"
-
-#define LONGHELP \
-" -h\tprint this help message\n \
- -d\tReset daily stats\n \
- -m\tReset monthly stats\n \
- -a\tReset All stats (month day)\n"