changeset: 614:1bff5134518c
parent: 612:245e0cb8c97a
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sun Aug 22 21:14:36 2010 +0200
files: st.suckless.org/goals.md
description:
256color feature is done.
diff -r 245e0cb8c97a -r 1bff5134518c st.suckless.org/goals.md
--- a/st.suckless.org/goals.md Sat Aug 21 13:17:47 2010 +0200
+++ b/st.suckless.org/goals.md Sun Aug 22 21:14:36 2010 +0200
_AT_@ -4,7 +4,6 @@
Confirmed st features
----------------------
* _Good_ xterm compliance (Arg)
-* 256 colour support (Arg)
* Filters that change colour (Arg)
* Server to save session in case you crash X (Arg)
* Unlimited scrollback buffer (Arg)
changeset: 615:6bbd1a59798d
tag: tip
parent: 614:1bff5134518c
parent: 613:7d03b02ddf7d
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sun Aug 22 21:16:44 2010 +0200
description:
merge.
diff -r 1bff5134518c -r 6bbd1a59798d surf.suckless.org/patches/searchengines.md
--- a/surf.suckless.org/patches/searchengines.md Sun Aug 22 21:14:36 2010 +0200
+++ b/surf.suckless.org/patches/searchengines.md Sun Aug 22 21:16:44 2010 +0200
_AT_@ -26,9 +26,11 @@
* [surf-0.1-searchengines.diff](surf-0.1-searchengines.diff) (1964) (20090923)
* [surf-0.3-searchengines.diff](surf-0.3-searchengines.diff) (2107) (20091204)
+* [surf-0.4-searchengines.diff](surf-0.4-searchengines.diff) (2107) (20091204)
Author
------
* Nils Schweinsberg (McManiaC) <[mail_AT_n-sch.de](mailto:mail_AT_n-sch.de)>
* Samuel Baldwin (shardz) <[recursive.forest_AT_gmail.com](mailto:recursive.forest_AT_gmail.com)>
+* Alex Puterbaugh (zombine) <[puterbaugh0_AT_gmail.com](mailto:puterbaugh0_AT_gmail.com)>
diff -r 1bff5134518c -r 6bbd1a59798d surf.suckless.org/patches/surf-0.4-searchengines.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/patches/surf-0.4-searchengines.diff Sun Aug 22 21:16:44 2010 +0200
_AT_@ -0,0 +1,53 @@
+diff -r dbb565b8d61c surf.c
+--- a/surf.c Fri Jun 25 09:42:58 2010 +0200
++++ b/surf.c Fri Aug 13 16:28:31 2010 -0400
+_AT_@ -55,6 +55,11 @@
+ const Arg arg;
+ } Key;
+
++typedef struct {
++ char *token;
++ char *uri;
++} SearchEngine;
++
+ static Display *dpy;
+ static Atom atoms[AtomLast];
+ static Client *clients = NULL;
+_AT_@ -90,6 +95,7 @@
+ static Client *newclient(void);
+ static void newwindow(Client *c, const Arg *arg);
+ static void newrequest(SoupSession *s, SoupMessage *msg, gpointer v);
++static gchar *parseuri(const gchar *uri);
+ static void pasteuri(GtkClipboard *clipboard, const char *text, gpointer d);
+ static void print(Client *c, const Arg *arg);
+ static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event, gpointer d);
+_AT_@ -388,8 +394,7 @@
+
+ if(strcmp(uri, "") == 0)
+ return;
+- u = g_strrstr(uri, "://") ? g_strdup(uri)
+- : g_strdup_printf("
http://%s", uri);
++ u = parseuri(uri);
+ /* prevents endless loop */
+ if(c->uri && strcmp(u, c->uri) == 0) {
+ reload(c, &a);
+_AT_@ -562,6 +567,19 @@
+ spawn(NULL, &a);
+ }
+
++
++gchar *
++parseuri(const gchar *uri) {
++ guint i;
++ for (i = 0; i < LENGTH(searchengines); i++) {
++ if (searchengines[i].token == NULL || searchengines[i].uri == NULL || *(uri + strlen(searchengines[i].token)) != ' ')
++ continue;
++ 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);
++}
++
+ void
+ pasteuri(GtkClipboard *clipboard, const char *text, gpointer d) {
+ Arg arg = {.v = text };
Received on Sun Aug 22 2010 - 23:14:43 CEST