ref: 6d2635d5badb1825d766f16b0ad43f45f84ca495
parent: 1cf3c4666943028cccfbbed8d2bae2fee30713a4
author: Matthew Veety <mveety@mveety.com>
date: Mon Apr 25 13:49:31 EDT 2016
made abaco's gui respect $font and made readweb respect most installations
--- a/rc/bin/readweb
+++ b/rc/bin/readweb
@@ -1,10 +1,15 @@
#!/bin/rc
# start abaco and its prerequisites
-rfork n
-
-# outside && bind /net.alt /net
-
+rfork ne
+if(~ $#1 0){
+ rimport '$cpu' /net
+}
+if not {
+ rimport $1 /net
+ shift
+}
webfs
webcookies
-echo useragent netscape 1.0 >/mnt/web/ctl
+# probably not needed
+# echo useragent netscape 1.0 >/mnt/web/ctl
exec /$cputype/bin/abaco $*
--- a/sys/src/cmd/abaco/main.c
+++ b/sys/src/cmd/abaco/main.c
@@ -50,7 +50,7 @@
static void
usage(void)
{
- fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [url...]\n",
+ fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [-f font] [url...]\n",
argv0);
exits("usage");
}
@@ -61,6 +61,7 @@
Column *c;
char buf[256];
int i, ncol;
+ char *tfnt = nil;
rfork(RFENVG|RFNAMEG);
@@ -80,6 +81,8 @@
case 't':
charset = EARGF(usage());
break;
+ case 'f':
+ tfnt = EARGF(usage());
default:
usage();
break;
@@ -91,6 +94,12 @@
sysfatal("can't initialize webfs: %r");
snarffd = open("/dev/snarf", OREAD|OCEXEC);
+
+ if(tfnt == nil){
+ tfnt = getenv("font");
+ if(tfnt != nil)
+ fontnames[0] = tfnt;
+ }
if(initdraw(derror, fontnames[0], "abaco") < 0)
sysfatal("can't open display: %r");