+ s = getatom(c, findprop);
+ gboolean forward = *(gboolean *)arg;
+ webkit_web_view_search_text(c->view, s, FALSE, forward, TRUE);
+}
+
+const char *
+getcookies(SoupURI *uri) {
+ const char *c;
+ SoupCookieJar *j = soup_cookie_jar_text_new(cookiefile, TRUE);
+ c = soup_cookie_jar_get_cookies(j, uri, TRUE);
+ g_object_unref(j);
+ return c;
+}
+
+const char *
+getatom(Client *c, Atom a) {
+ static char buf[BUFSIZ];
+ Atom adummy;
+ int idummy;
+ unsigned long ldummy;
+ unsigned char *p = NULL;
+
+ XGetWindowProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window),
+ a, 0L, BUFSIZ, False, XA_STRING,
+ &adummy, &idummy, &ldummy, &ldummy, &p);
+ if(p)
+ strncpy(buf, (char *)p, LENGTH(buf)-1);
+ else
+ buf[0] = '\0';
+ XFree(p);
+ return buf;
+}
+
+char *
+geturi(Client *c) {
+ char *uri;
+
+ if(!(uri = (char *)webkit_web_view_get_uri(c->view)))
+ uri = "about:blank";
+ return uri;
+}
+
+void
+gotheaders(SoupMessage *msg, gpointer v) {
+ SoupURI *uri;
+ GSList *l, *p;
+
+ uri = soup_message_get_uri(msg);
+ for(p = l = soup_cookies_from_response(msg); p;
+ p = g_slist_next(p)) {
+ setcookie((SoupCookie *)p->data);