mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
Add -F option. (Lou Kamenov)
This commit is contained in:
parent
0aae8d3d09
commit
24d5692977
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue