+static void scroll(Client *c, const Arg *arg);
+static void searchtext(Client *c, const Arg *arg);
+static void source(Client *c, const Arg *arg);
+static void showsearch(Client *c, const Arg *arg);
+static void showurl(Client *c, const Arg *arg);
+static void stop(Client *c, const Arg *arg);
+static void titlechange(WebKitWebView* view, WebKitWebFrame* frame, const gchar* title, Client *c);
+static gboolean unfocusbar(GtkWidget *w, GdkEventFocus *e, Client *c);
+static void usage(void);
+static void update(Client *c);
+static void windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame, JSContextRef js, JSObjectRef win, Client *c);
+static void zoom(Client *c, const Arg *arg);
+
+/* configuration, allows nested code to access above variables */
+#include "config.h"
+
+gchar *
+buildpath(const gchar *path) {
+ gchar *apath, *p;
+ FILE *f;
+
+ /* creating directory */
+ if(path[0] == '/')
+ apath = g_strdup(path);
+ else
+ apath = g_strconcat(g_get_home_dir(), "/", path, NULL);
+ if((p = strrchr(apath, '/'))) {
+ *p = '\0';
+ g_mkdir_with_parents(apath, 0755);
+ *p = '/';
+ }
+ /* creating file (gives error when apath ends with "/") */
+ if((f = g_fopen(apath, "a")))
+ fclose(f);
+ puts(apath);
+ return apath;
+}