[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Wed, 23 Sep 2009 21:04:21 +0000 (UTC)

changeset: 270:7186137ce66f
tag: tip
user: nils_AT_localhost.localdomain
date: Wed Sep 23 23:02:08 2009 +0200
files: surf.suckless.org/patches/searchengines-0.1.diff surf.suckless.org/patches/searchengines.md surf.suckless.org/patches/searchengines_patch.md
description:
fixed a little bug in surf/searchengines.diff


diff -r fc48942dc7c3 -r 7186137ce66f surf.suckless.org/patches/searchengines-0.1.diff
--- a/surf.suckless.org/patches/searchengines-0.1.diff Wed Sep 23 15:58:13 2009 +0200
+++ b/surf.suckless.org/patches/searchengines-0.1.diff Wed Sep 23 23:02:08 2009 +0200
_AT_@ -1,6 +1,6 @@
 diff -r fee97b4579f2 config.def.h
 --- a/config.def.h Mon Sep 21 03:27:20 2009 +0200
-+++ b/config.def.h Wed Sep 23 15:00:12 2009 +0200
++++ b/config.def.h Wed Sep 23 22:58:21 2009 +0200
 _AT_@ -30,3 +30,6 @@
      { 0, GDK_Return, hideurl, { 0 }, UrlBar },
  };
_AT_@ -10,7 +10,7 @@
 +};
 diff -r fee97b4579f2 surf.c
 --- a/surf.c Mon Sep 21 03:27:20 2009 +0200
-+++ b/surf.c Wed Sep 23 15:00:12 2009 +0200
++++ b/surf.c Wed Sep 23 22:58:21 2009 +0200
 _AT_@ -58,6 +58,11 @@
          KeyFocus focus;
  } Key;
_AT_@ -31,7 +31,7 @@
  static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event, gpointer d);
  static void print(Client *c, const Arg *arg);
  static void proccookies(SoupMessage *m, Client *c);
-_AT_@ -348,14 +354,26 @@
+_AT_@ -348,14 +354,25 @@
          g_free(uri);
  }
  
_AT_@ -39,11 +39,10 @@
 +parseuri(const gchar *uri) {
 + guint i;
 + for (i = 0; i < LENGTH(searchengines); i++) {
-+ if (searchengines[i].token == NULL || searchengines[i].uri == NULL)
++ if (searchengines[i].token == NULL || searchengines[i].uri == NULL || *(uri + strlen(searchengines[i].token)) != ' ')
 + continue;
-+ if(g_str_has_prefix(uri, searchengines[i].token)) {
++ if(g_str_has_prefix(uri, searchengines[i].token))
 + return g_strdup_printf(searchengines[i].uri, uri + strlen(searchengines[i].token) + 1);
-+ }
 + }
 + return g_strrstr(uri, "://") ? g_strdup(uri) : g_strdup_printf("http://%s", uri);
 +}
diff -r fc48942dc7c3 -r 7186137ce66f surf.suckless.org/patches/searchengines.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/patches/searchengines.md Wed Sep 23 23:02:08 2009 +0200
_AT_@ -0,0 +1,32 @@
+SEARCH ENGINES
+============
+
+Description
+-----------
+
+This little patch will allow the use of simple search engines. Put something
+like this in your config.h:
+
+ static SearchEngine searchengines[] = {
+ { "g", "http://www.google.de/search?q=%s" },
+ { "leo", "http://dict.leo.org/ende?search=%s" },
+ };
+
+This will enable searching in your favorit search engine by simply
+putting the prefix of your search engine in front your keywords:
+
+ g foo bar
+
+Or:
+
+ leo hello
+
+Download
+------
+
+* [searchengines-0.1.diff](searchengines-0.1.diff) (4K) (20090923)
+
+Author
+------
+
+- Nils Schweinsberg (McManiaC) <[mail_AT_n-sch.de](mailto:mail_AT_n-sch.de)>
diff -r fc48942dc7c3 -r 7186137ce66f surf.suckless.org/patches/searchengines_patch.md
--- a/surf.suckless.org/patches/searchengines_patch.md Wed Sep 23 15:58:13 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,32 +0,0 @@
-SEARCH ENGINES
-============
-
-Description
------------
-
-This little patch will allow the use of simple search engines. Put something
-like this in your config.h:
-
- static SearchEngine searchengines[] = {
- { "g", "http://www.google.de/search?q=%s" },
- { "leo", "http://dict.leo.org/ende?search=%s" },
- };
-
-This will enable searching in your favorit search engine by simply
-putting the prefix of your search engine in front your keywords:
-
- g foo bar
-
-Or:
-
- leo hello
-
-Download
-------
-
-* [searchengines-0.1.diff](searchengines-0.1.diff) (4K) (20090923)
-
-Author
-------
-
-- Nils Schweinsberg (McManiaC) <[mail_AT_n-sch.de](mailto:mail_AT_n-sch.de)>
Received on Wed Sep 23 2009 - 23:04:21 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:30:51 CEST