]> Pileus Git - ~andy/aweather-web/commitdiff
Kill glib
authorAndy Spencer <andy753421@gmail.com>
Wed, 21 Dec 2011 06:53:18 +0000 (06:53 +0000)
committerAndy Spencer <andy753421@gmail.com>
Wed, 21 Dec 2011 06:53:18 +0000 (06:53 +0000)
index.c
mkfile

diff --git a/index.c b/index.c
index 32423a36d23f5f0976a0fcf0b2120b9789630cb7..f078d0a7aed4527a072b63bc0a3227b69f5bb97f 100644 (file)
--- a/index.c
+++ b/index.c
@@ -1,4 +1,5 @@
-#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
 #include "html.h"
 
 const char desc[] =
@@ -39,7 +40,7 @@ int main(int argc, char **argv)
 {
        print_header();
 
-       const gchar *name = g_getenv("PATH_INFO");
+       const char *name = getenv("PATH_INFO");
        if (name == NULL || name[0] == '\0' || name[1] == '\0')
                return print_page(index), 0;
 
@@ -47,12 +48,12 @@ int main(int argc, char **argv)
        for (int i = 0; everything[i];         i++)
        for (int j = 0; everything[i][j].link; j++) {
                const page_t *page = &everything[i][j];
-               if (g_str_equal(name+1, page->link))
+               if (!strcmp(name+1, page->link))
                        return print_page(page), 0;
        }
 
        /* Print sitemap by itself */
-       if (g_str_equal(name+1, "sitemap.xml"))
+       if (!strcmp(name+1, "sitemap.xml"))
                return print_sitemap(everything), 0;
 
        /* 404 */
diff --git a/mkfile b/mkfile
index 317ad45b21c54c7d83182a1b416daaba31e938cb..dc180674b4d5516d9d25bd4cf988a7ee1d967efb 100644 (file)
--- a/mkfile
+++ b/mkfile
@@ -1,9 +1,6 @@
 CT=/scratch/ct/ct
 CFLAGS='--std=c99 -Wall'
 
-PKG_FLAGS=`{pkg-config --cflags glib-2.0}
-PKG_LIBS=`{pkg-config --libs glib-2.0}
-
 index.cgi: index.o html.o
        gcc $CFLAGS -o $target $prereq $PKG_LIBS