tusercss works again. - surf - customized build of surf, the suckless webkit browser
 (HTM) git clone git://src.adamsgaard.dk/surf
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 0e3ac7f3b0c6bb944202ba0eea258c6c9bb05638
 (DIR) parent a2da3b7eef16a5589057b3bfac28f53b95f55bf3
 (HTM) Author: Enno Boland (tox) <tox@s01.de>
       Date:   Sun, 13 Sep 2009 16:15:28 +0200
       
       usercss works again.
       Diffstat:
         M surf.c                              |      21 +++++++++++----------
       
       1 file changed, 11 insertions(+), 10 deletions(-)
       ---
 (DIR) diff --git a/surf.c b/surf.c
       t@@ -60,14 +60,14 @@ typedef struct {
                KeyFocus focus;
        } Key;
        
       -SoupCookieJar *cookiejar;
       -SoupSession *session;
       -Client *clients = NULL;
       -Cookie *cookies = NULL;
       -GdkNativeWindow embed = 0;
       -gboolean showxid = FALSE;
       -gboolean ignore_once = FALSE;
       -gchar *workdir;
       +static SoupCookieJar *cookiejar;
       +static SoupSession *session;
       +static Client *clients = NULL;
       +/*static Cookie *cookies = NULL;*/
       +static GdkNativeWindow embed = 0;
       +static gboolean showxid = FALSE;
       +static gboolean ignore_once = FALSE;
       +static gchar *workdir;
        extern char *optarg;
        extern gint optind;
        
       t@@ -123,6 +123,7 @@ void
        cleanup(void) {
                while(clients)
                        destroyclient(clients);
       +        g_free(workdir);
        }
        
        void
       t@@ -590,7 +591,7 @@ setup(void) {
        
                /* create dirs and files */
                home = g_get_home_dir();
       -        workdir = g_build_filename(home, ".surf", NULL);
       +        workdir = g_strdup(g_build_filename(home, ".surf", NULL));
                g_mkdir_with_parents(workdir, 0755);
                name = g_build_filename(workdir, "dl", NULL);
                g_mkdir(name, 0755);
       t@@ -720,6 +721,7 @@ int main(int argc, char *argv[]) {
                        default:
                                usage();
                        }
       +        setup();
                if(optind + 1 == argc) {
                        c = newclient();
                        arg.v = argv[optind];
       t@@ -731,7 +733,6 @@ int main(int argc, char *argv[]) {
                }
                else if(optind != argc)
                        usage();
       -        setup();
                if(!clients)
                        newclient();