From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/libdraw/openfont.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/libdraw/openfont.c') diff --git a/src/libdraw/openfont.c b/src/libdraw/openfont.c index 366664ae..9312eb43 100644 --- a/src/libdraw/openfont.c +++ b/src/libdraw/openfont.c @@ -10,7 +10,7 @@ parsefontscale(char *name, char **base) { char *p; int scale; - + p = name; scale = 0; while('0' <= *p && *p <= '9') { @@ -24,7 +24,7 @@ parsefontscale(char *name, char **base) scale = 1; } return scale; -} +} extern char _defontfile[]; @@ -114,7 +114,7 @@ swapfont(Font *targ, Font **oldp, Font **newp) if(targ != *oldp) sysfatal("bad swapfont %p %p %p", targ, *oldp, *newp); - + old = *oldp; new = *newp; @@ -175,12 +175,12 @@ hidpiname(Font *f) { char *p, *q; int size; - + // If font name has form x,y return y. p = strchr(f->namespec, ','); if(p != nil) return strdup(p+1); - + // If font name is /mnt/font/Name/Size/font, scale Size. if(strncmp(f->name, "/mnt/font/", 10) == 0) { p = strchr(f->name+10, '/'); @@ -191,9 +191,9 @@ hidpiname(Font *f) while('0' <= *q && *q <= '9') size = size*10 + *q++ - '0'; return smprint("%.*s%d%s", utfnlen(f->name, p-f->name), f->name, size*2, q); - } + } - // Otherwise use pixel doubling. + // Otherwise use pixel doubling. scale: return smprint("%d*%s", f->scale*2, f->name); } @@ -210,7 +210,7 @@ loadhidpi(Font *f) swapfont(f, &f->lodpi, &f->hidpi); return; } - + name = hidpiname(f); fnew = openfont1(f->display, name); if(fnew == nil) @@ -227,7 +227,7 @@ openfont(Display *d, char *name) Font *f; char *p; char *namespec; - + // If font name has form x,y use x for lodpi, y for hidpi. name = strdup(name); namespec = strdup(name); @@ -240,7 +240,7 @@ openfont(Display *d, char *name) f->lodpi = f; free(f->namespec); f->namespec = namespec; - + /* add to display list for when dpi changes */ /* d can be nil when invoked from mc. */ if(d != nil) { @@ -252,12 +252,12 @@ openfont(Display *d, char *name) else d->firstfont = f; d->lastfont = f; - + /* if this is a hi-dpi display, find hi-dpi version and swap */ if(d->dpi >= DefaultDPI*3/2) loadhidpi(f); } - + free(name); return f; @@ -270,7 +270,7 @@ _fontpipe(char *name) char c; char buf[1024], *argv[10]; int nbuf, pid; - + if(pipe(p) < 0) return -1; pid = rfork(RFNOWAIT|RFFDG|RFPROC); @@ -294,7 +294,7 @@ _fontpipe(char *name) _exit(0); } close(p[1]); - + // success marked with leading \001. // otherwise an error happened. for(nbuf=0; nbuf