commit 7be247f7d5a281a6e18dabf2df2b413bf9f2fc4e
parent 71c450166b2eb46208ea6f61d5d63df6f6e3d992
Author: Kyle Milz <krwmilz@gmail.com>
Date: Tue, 14 Sep 2021 16:47:07 +0000
remove pixel_* and spell_* to better header file
Diffstat:
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/dvi-draw.h b/dvi-draw.h
@@ -3,6 +3,18 @@
#include "data.h" /* set_char_proc */
+/*
+ * pixel_conv is currently used only for converting absolute positions
+ * to pixel values; although normally it should be
+ * ((int) ((x) / shrink_factor + (1 << 15) >> 16)),
+ * the rounding is achieved instead by moving the constant 1 << 15 to
+ * PAGE_OFFSET in dvi-draw.c.
+ */
+#define pixel_conv(x) ((int) ((x) / shrink_factor >> 16))
+#define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16))
+#define spell_conv0(n, f) ((long) (n * f))
+#define spell_conv(n) spell_conv0(n, dimconv)
+
struct frame {
struct framedata {
long dvi_h, dvi_v, w, x, y, z;
diff --git a/dvi-init.c b/dvi-init.c
@@ -33,6 +33,7 @@ NOTE:
#include <X11/Shell.h> /* defines XtNtitle and XtNiconName */
#include "dvi-init.h"
+#include "dvi-draw.h" /* spell_conv() */
#include "events.h" /* mane */
#include "font.h" /* struct font, struct glyph */
#include "special.h" /* init_prescan() */
diff --git a/xdvi.h b/xdvi.h
@@ -54,18 +54,6 @@ static const char addr_default[] = "www.0x30.net/resume.dvi";
typedef unsigned char ubyte;
typedef ubyte wide_ubyte;
-/*
- * pixel_conv is currently used only for converting absolute positions
- * to pixel values; although normally it should be
- * ((int) ((x) / shrink_factor + (1 << 15) >> 16)),
- * the rounding is achieved instead by moving the constant 1 << 15 to
- * PAGE_OFFSET in dvi-draw.c.
- */
-#define pixel_conv(x) ((int) ((x) / shrink_factor >> 16))
-#define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16))
-#define spell_conv0(n, f) ((long) (n * f))
-#define spell_conv(n) spell_conv0(n, dimconv)
-
int current_page;
int total_pages;
int pageno_correct = 1;