diff options
author | rsc <devnull@localhost> | 2005-10-31 20:08:05 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-10-31 20:08:05 +0000 |
commit | 24d56929770f47314bfbebed9325dd5bcdaa8771 (patch) | |
tree | 986b34b8dd56755bbb11ab3a47e8f9a313e2ab89 /src/cmd/draw | |
parent | 0aae8d3d0969e8e593ce39434586c9b3160bf850 (diff) | |
download | plan9port-24d56929770f47314bfbebed9325dd5bcdaa8771.tar.gz plan9port-24d56929770f47314bfbebed9325dd5bcdaa8771.tar.bz2 plan9port-24d56929770f47314bfbebed9325dd5bcdaa8771.zip |
Add -F option. (Lou Kamenov)
Diffstat (limited to 'src/cmd/draw')
-rw-r--r-- | src/cmd/draw/stats.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd/draw/stats.c b/src/cmd/draw/stats.c index 457aea4b..80fd1011 100644 --- a/src/cmd/draw/stats.c +++ b/src/cmd/draw/stats.c @@ -107,6 +107,7 @@ Image *cols[Ncolor][3]; Graph *graph; Machine *mach; Font *mediumfont; +char *fontname; char *mysysname; char argchars[] = "bceEfiIlmnsw"; int pids[1024]; @@ -180,7 +181,10 @@ mkcol(int i, int c0, int c1, int c2) void colinit(void) { - mediumfont = openfont(display, "/lib/font/bit/pelm/latin1.8.font"); + if(fontname) + mediumfont = openfont(display, fontname); + if(mediumfont == nil) + mediumfont = openfont(display, "/lib/font/bit/pelm/latin1.8.font"); if(mediumfont == nil) mediumfont = font; @@ -332,7 +336,7 @@ update1(Graph *g, long v, ulong vmax) void usage(void) { - fprint(2, "usage: stats [-O] [-S scale] [-LY] [-W winsize] [-%s] [machine...]\n", argchars); + fprint(2, "usage: stats [-LY] [-F font] [-O] [-S scale] [-W winsize] [-%s] [machine...]\n", argchars); threadexitsall("usage"); } @@ -705,6 +709,9 @@ threadmain(int argc, char *argv[]) case 'L': logscale++; break; + case 'F': + fontname = EARGF(usage()); + break; case 'Y': ylabels++; break; |