>
> have you sent your patches to fgb?
>
> iru
i think so. but it's been a very long time.
here's the entire patch to urls.c some fixups
may be required due to this fact. attached
is the whole patch to urls.c.
- erik
// tired of typing http://, tired of going to google first.
void
justgoogleit(Url *u)
{
Rune *s;
s = ucvt(u->src.r+2);
free(u->src.r);
u->src.r =
runesmprint("http://www.google.com/search?hl=en&ie=UTF-8&q=%S", s);
free(s);
u->src.nr = runestrlen(u->src.r);
}
void
addhttp(Url *u)
{
Rune *s;
if(validurl(u->src.r))
return;
s = u->src.r;
u->src.r = runesmprint("http://%S", u->src.r);
free(s);
u->src.nr = runestrlen(u->src.r);
}
struct{
void (*f)(Url*);
Rune *lead;
int len;
} ctab[] = {
justgoogleit, L"g ", 2,
addhttp, L"", 0,
};
void
urlconvience(Url *u)
{
int i;
for(i = 0; u->src.nr >= ctab[i].len && runestrncmp(u->src.r,
ctab[i].lead, ctab[i].len) != 0; i++)
;
ctab[i].f(u);
}
int
urlopen(Url *u)
{
char buf[BUFSIZE];
int cfd, fd, conn, n;
urlconvience(u);