From: Vasily Kolobkov <>

---
 surf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/surf.c b/surf.c
index 2d3a6f5..b90acaa 100644
--- a/surf.c
+++ b/surf.c
@@ -276,14 +276,15 @@ die(const char *errstr, ...)
 }
 
 void
 setup(void)
 {
        GdkDisplay *gdpy;
        int i, j;
+       char *envuseragent;
 
        /* clean up any zombies immediately */
        sigchld(0);
        if (signal(SIGHUP, sighup) == SIG_ERR)
                die("Can't install SIGHUP handler");
 
        if (!(dpy = XOpenDisplay(NULL)))
@@ -349,14 +350,17 @@ setup(void)
                        }
                } else {
                        fprintf(stderr, "Could not compile regex: %s\n",
                                uriparams[i].uri);
                        uriparams[i].uri = NULL;
                }
        }
+
+       if ((envuseragent = getenv("SURF_USERAGENT")))
+               fulluseragent = envuseragent;
 }
 
 void
 sigchld(int unused)
 {
        if (signal(SIGCHLD, sigchld) == SIG_ERR)
                die("Can't install SIGCHLD handler");
-- 
2.12.2


Reply via email to