commit bc598e98f4fcd4290408dd6b2695b8c8791f43a5
parent 7be247f7d5a281a6e18dabf2df2b413bf9f2fc4e
Author: Kyle Milz <krwmilz@gmail.com>
Date: Tue, 14 Sep 2021 17:05:14 +0000
use resource list_fonts directly
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dvi-init.c b/dvi-init.c
@@ -337,7 +337,7 @@ reuse_font(fontp)
if (fontp->flags & FONT_IN_USE) return;
fontp->flags |= FONT_IN_USE;
- if (list_fonts)
+ if (resource._list_fonts)
printf("(reusing) %s at %d dpi\n", fontp->fontname,
(int) (fontp->fsize + 0.5));
if (fontp->flags & FONT_VIRTUAL) {
@@ -410,7 +410,7 @@ define_font(FILE *file, wide_ubyte cmnd, struct font *vfparent,
*/
for (fontp = font_head;; fontp = fontp->next) {
if (fontp == NULL) { /* if font doesn't exist yet */
- if (list_fonts)
+ if (resource._list_fonts)
printf("%s at %d dpi\n", fontname, (int) (fsize + 0.5));
fontp = (struct font *) xmalloc((unsigned) sizeof(struct font));
fontp->fontname = fontname;
@@ -814,7 +814,7 @@ reload_dvi_file()
err(1, "fseek");
if (!init_dvi_file())
return False;
- if (list_fonts)
+ if (resource._list_fonts)
putchar('\n');
return True;
diff --git a/xdvi.h b/xdvi.h
@@ -116,7 +116,6 @@ extern struct _resource {
#define density resource._density
#define pixels_per_inch resource._pixels_per_inch
#define alt_font resource._alt_font
-#define list_fonts resource._list_fonts
#define warn_spec resource._warn_spec
#define hush_chars resource._hush_chars
#define hush_chk resource._hush_chk