commit 9b06471e5c81b12192e3beeb6b4e01439cc9171e
parent 49fdeb79e939988e7864fcbdec7e9d23f9222c5a
Author: Kyle Milz <krwmilz@gmail.com>
Date: Mon, 13 Mar 2023 05:00:03 +0000
delete global dvi_is_valid
it was mainly used by check_dvi_file(), which was originally used to see
if the file changed on disk. we do not have that problem anymore, so this
can go.
Diffstat:
4 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/dvi-draw.c b/dvi-draw.c
@@ -32,7 +32,7 @@ NOTE:
#include <stdarg.h>
#include "dvi-draw.h" /* drawing_mag */
-#include "dvi-init.h" /* check_dvi_file() */
+#include "dvi-init.h" /* page_info */
#include "events.h" /* do_color_change(), ... */
#include "font.h" /* load_ft_font() XXX more */
#include "special.h" /* scan_special(), ... */
@@ -1066,9 +1066,6 @@ draw_part(struct frame *minframe, double current_dimconv)
void
draw_page(void)
{
- /* Check for changes in dvi file. */
- if (!check_dvi_file()) return;
-
color_bottom = &fg_initial;
color_bot_size = 1;
if (page_colors != NULL && current_page > 0) {
diff --git a/dvi-init.c b/dvi-init.c
@@ -51,14 +51,12 @@ NOTE:
#define VF_ID_BYTE 202
#define VF_MAGIC ((VF_PRE << 8) | VF_ID_BYTE)
-static Boolean dvi_is_valid = False; /* if not initializing */
/*
* DVI preamble and postamble information.
*/
static unsigned int dvi_unshrunk_page_w, dvi_unshrunk_page_h;
-
/*
* free_vf_chain frees the vf_chain structure.
*/
@@ -790,7 +788,6 @@ init_dvi_file(void)
current_page = total_pages - 1;
init_prescan();
set_titles();
- dvi_is_valid = True;
return True;
@@ -800,18 +797,6 @@ err:
return False;
}
-/**
- ** Check for changes in dvi file. Return True if it's OK.
- **/
-
-Boolean
-check_dvi_file(void)
-{
- if (!dvi_is_valid)
- return False;
-
- return True;
-}
/**
** Reload the dvi file (unconditionally). Called only from do_pages().
@@ -822,7 +807,6 @@ reload_dvi_file(void)
{
struct font *fontp;
- dvi_is_valid = False;
if (page_info != NULL) {
free(page_info - 1);
page_info = NULL;
diff --git a/dvi-init.h b/dvi-init.h
@@ -14,7 +14,6 @@ struct per_page {
struct per_page *page_info;
-Boolean check_dvi_file(void);
Boolean dvi_magic_ok(FILE *);
void full_reset_colors(void);
Boolean init_dvi_file(void);
diff --git a/events.c b/events.c
@@ -1208,9 +1208,6 @@ ACTION(Act_magnifier)
Window throwaway;
Display *disp;
- if (!check_dvi_file())
- return;
-
disp = XtDisplay(w);
if (event->type != ButtonPress || mouse_release != null_mouse
@@ -1820,8 +1817,6 @@ redraw_page()
puts("Redraw page: ");
if (scanned_page < current_page) {
- if (!check_dvi_file())
- return;
prescan();
if (ev_flags & EV_GE_NEWPAGE) /* if we need to re-prescan */
return;
@@ -1924,8 +1919,6 @@ do_pages()
if (dvi_file != NULL)
redraw_page();
- else
- (void) check_dvi_file();
}
else if (ev_flags & EV_MAG_MOVE) {
if (alt.win == (Window) 0)