diff --git a/make-db/.gitignore b/make-db/.gitignore deleted file mode 100644 index 29bb07d..0000000 --- a/make-db/.gitignore +++ /dev/null @@ -1 +0,0 @@ -make-db \ No newline at end of file diff --git a/make-db/Makefile b/make-db/Makefile deleted file mode 100644 index 08361f3..0000000 --- a/make-db/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -CFLAGS= \ - -std=c99 \ - -Wall \ - -O3 \ - -Wextra -LIBS=ncurses sqlite3 -CFLAGS+=$(shell pkg-config --cflags $(LIBS)) -LDFLAGS+=$(shell pkg-config --libs $(LIBS)) - -SOURCES=$(wildcard *.c) -EXECUTABLES=$(patsubst %.c,%,$(SOURCES)) - -all: $(EXECUTABLES) diff --git a/make-db/default.nix b/make-db/default.nix deleted file mode 100644 index cffb8a6..0000000 --- a/make-db/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv -, sqlite -, ncurses -, pkg-config -, progressbar -}: - -stdenv.mkDerivation { - pname = "make-db"; - version = "0.0.0"; - nativeBuildInputs = [ - sqlite - ncurses - pkg-config - progressbar.dev - ]; -} diff --git a/make-db/make-db.c b/make-db/make-db.c deleted file mode 100644 index e1a8f0c..0000000 --- a/make-db/make-db.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include -#include - -const char *word_db_path = "../words.db"; -const char *word_plaintext_path = "../words.gz"; - -char buf[2048] = ""; - -char *word = buf; - -char *read_entry () { - const char *s = fgets (buf, 2048, stdin); - if (s == NULL) { - return NULL; - } else { - char *r = strchr (buf, '\t'); - if (r != NULL) { - *r = '\0'; - return r + 1; - } else { - return NULL; - } - } -} - -int main () { - if (access (word_db_path, F_OK)) { - remove (word_db_path); - } - - sqlite3 *db = NULL; - if (! sqlite3_open (word_db_path, &db) == SQLITE_OK) { - fprintf (stderr, "couldn't open sqlite: %s\n", sqlite3_errmsg (db)); - } else { - fprintf (stderr, "sqlite open }:3\n"); - char *s = read_entry (); - if (s == NULL) { - printf ("%s: %s\n", word, s); - } - } - - return 0; -} diff --git a/make-db/progressbar.nix b/make-db/progressbar.nix deleted file mode 100644 index bc512c0..0000000 --- a/make-db/progressbar.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ stdenv -, ncurses -}: - -stdenv.mkDerivation {}