~ft/fontsel

b19456783bfc59892e39eed33b16a31726ab0a28 — Sigrid Haflínudóttir 9 months ago 8dff7b6
fix label and extra slash char
1 files changed, 4 insertions(+), 2 deletions(-)

M fontsel.c
M fontsel.c => fontsel.c +4 -2
@@ 38,7 38,7 @@ static char *text[] = {
	"}",
};

static char *prefix = "/lib/font/bit/";
static char *prefix = "/lib/font/bit";
static Font *f;
static Fontdir *dirs, *cdir;
static int ndirs, idir;


@@ 137,6 137,8 @@ findfonts(void)
	char t[1024];

	doff = sprint(t, prefix);
	t[doff++] = '/';
	t[doff] = 0;
	if((f = open(t, OREAD)) < 0)
		sysfatal("font dir: %r");
	if((n = dirreadall(f, &d)) < 1)


@@ 207,7 209,7 @@ threadmain(int argc, char **argv)
	if(ndirs < 1)
		sysfatal("no fonts");

	if(initdraw(nil, nil, "picker") < 0)
	if(initdraw(nil, nil, "fontsel") < 0)
		sysfatal("initdraw: %r");
	if((kctl = initkeyboard(nil)) == nil)
		sysfatal("initkeyboard: %r");