You are not logged in.
Hi,
I'm using the surf browser and I patched it a history file. But theres a problem, the history entries get written one after another on the same line instead of different lines:
https://duckduckgo.com/html/?kh=1&kl=pt-pt&kp=-1&ks=m&k1=-1http://youtube.comhttp://archlinux.orgInstead of:
https://duckduckgo.com/html/?kh=1&kl=pt-pt&kp=-1&ks=m&k1=-1
http://youtube.com
http://archlinux.orgHere's the patch I'm using: patch
with this function:
#define HIST { .v = (char *[]){ "/bin/sh", "-c", \
"xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \
`cat ~/.config/surf/history | sort -ru | dmenu -l 10 -i -fn \"ubuntu mono\" -nb \"#222222\" -nf \"#FFFFFF\" -sb \"#005577\" -sf \"#eeeeee\" || exit 0`", \
winid, NULL } }Last edited by whooper (2012-03-03 12:59:05)
Offline
Found the solution, the fprintf function didn't have the proper arguments:
+ FILE *f;
+ f = fopen(historyfile, "a+");
+ fprintf(f, u);
+ fclose(f);to
+ FILE *f;
+ f = fopen(historyfile, "a+");
+ fprintf(f, "%s\n",u);
+ fclose(f);Marking as solved..
Last edited by whooper (2012-03-03 12:58:51)
Offline