wdvi

network DVI viewer
Log | Files | Refs

commit 4ea5d3e67255482f58ddc582d54cda184f275aec
parent e848acc216e73a29c7f76f868527344903eaa4ce
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Mon, 13 Sep 2021 19:21:11 +0000

remove source_fwd_box support

Diffstat:
Mdvi-draw.c | 50--------------------------------------------------
Mdvi-init.c | 1-
Mevents.c | 1-
Mxdvi.h | 5-----
4 files changed, 0 insertions(+), 57 deletions(-)

diff --git a/dvi-draw.c b/dvi-draw.c @@ -100,7 +100,6 @@ BMUNIT bit_masks[33] = { #endif static void draw_part(); -static void source_fwd_draw_box(); /* * X routines. @@ -1309,8 +1308,6 @@ draw_page() drawing_mag = False; dvi_pointer_frame = NULL; - if (currwin.win == mane.win && source_fwd_box_page >= 0) - source_fwd_draw_box(); /* draw box showing found source line */ currwin.win = (Window) 0; } @@ -1763,50 +1760,3 @@ geom_scan_part(g_info, minframe, current_dimconv) } /* end else (ch not a SETCHAR or FNTNUM) */ } /* end for */ } - -/* - * Routines for forward search (look up a source line). - * - * The general procedure is: - * (1) Use spcl_scan() to find the page containing the line (or at - * least the closest line). This could be optimized further. - * (2) Use geom_scan_part() to find the exact location of the source - * special, and the box to highlight. - */ - -/* Some of the above, plus these below, are used by geom_scan_part(). */ - -static long src_fwd_min_x, src_fwd_max_x; -static long src_fwd_min_y, src_fwd_max_y; -static long src_fwd_min_x2, src_fwd_max_x2; /* hot point for spcl */ -static long src_fwd_min_y2, src_fwd_max_y2; - -/* - * Routine to actually draw the box. - */ - -static void -source_fwd_draw_box() -{ - long x, y; - - if (source_fwd_box_page != current_page) - source_fwd_box_page = -1; /* different page---clear it */ - else { - if (src_fwd_min_x == 0x7fffffff) { - /* If no glyphs or rules, use hot point of special instead. */ - src_fwd_min_x = src_fwd_min_x2; - src_fwd_min_y = src_fwd_min_y2; - src_fwd_max_x = src_fwd_max_x2; - src_fwd_max_y = src_fwd_max_y2; - } -#define PAD 10 - x = (src_fwd_min_x - PAD) / mane.shrinkfactor; - y = (src_fwd_min_y - PAD) / mane.shrinkfactor; - - XDrawRectangle(DISP, mane.win, highGC, - x - mane_base_x, y - mane_base_y, - (src_fwd_max_x + PAD) / mane.shrinkfactor - x, - (src_fwd_max_y + PAD) / mane.shrinkfactor - y); - } -} diff --git a/dvi-init.c b/dvi-init.c @@ -751,7 +751,6 @@ init_dvi_file() prepare_pages(); if (current_page >= total_pages) current_page = total_pages - 1; warn_spec_now = warn_spec; - source_fwd_box_page = -1; init_prescan(); set_titles(); dvi_is_valid = True; diff --git a/events.c b/events.c @@ -891,7 +891,6 @@ ACTION(Act_forward_page) if (current_page != arg) goto_page(arg, home); /* Control-L (and changing the page) clears this box */ - source_fwd_box_page = -1; ev_flags |= EV_NEWPAGE; XFlush(DISP); return; /* Don't use longjmp here: it might be called from diff --git a/xdvi.h b/xdvi.h @@ -103,11 +103,6 @@ Boolean warn_spec_now; Boolean psfig_begun = False; /* - * Page on which to draw box from forward source special searching. - */ -int source_fwd_box_page = -1; /* -1 means no box */ - -/* * Used for window manager delete protocol (toolkit only). */ Atom atoms[2];