diff -ur xdvik-22.82.orig/texk/xdvik/dvi-draw.c xdvik-22.82/texk/xdvik/dvi-draw.c
--- xdvik-22.82.orig/texk/xdvik/dvi-draw.c	2004-04-21 16:35:48.000000000 +0800
+++ xdvik-22.82/texk/xdvik/dvi-draw.c	2004-04-22 15:21:26.000000000 +0800
@@ -2181,6 +2181,10 @@
 		ROUNDUP(pageinfo_get_page_height(current_page), currwin.shrinkfactor) + 2, globals.gc.high);
 #endif /* MOTIF */
 
+#ifdef MAGICK
+    /*Magick_background_image(False);*/
+#endif
+
     (void) lseek(fileno(G_bak_fp), pageinfo_get_offset(current_page), SEEK_SET);
 
     bzero((char *)&currinf.data, sizeof currinf.data);
@@ -5881,6 +5885,9 @@
 	resource.back_Pixel = pixel;
 	resource.fore_Pixel = pixel | plane_masks[0] | plane_masks[1]
 	    | plane_masks[2] | plane_masks[3];
+#ifdef MAGICK
+	if (resource.bg_image == NULL)
+#endif
 	if (mane.win != (Window) 0)
 	    XSetWindowBackground(DISP, mane.win, resource.back_Pixel);
     }
@@ -6180,6 +6187,9 @@
 
 		if (using_planes && bg_current->pixel != resource.back_Pixel) {
 		    bg_current->pixel = resource.back_Pixel;
+#ifdef MAGICK
+		    if (resource.bg_image == NULL) {
+#endif
 /* 		    XSetWindowBackground(DISP, mane.win, bg_current->pixel); */
 #if MOTIF
 		    fprintf(stderr, "setting window background!\n");
@@ -6188,7 +6198,11 @@
 #else
 		    XSetWindowBackground(DISP, mane.win, bg_current->pixel);
 #endif
+
 		    XClearWindow(DISP, mane.win);
+#ifdef MAGICK
+		    }
+#endif
 		}
 
 		fg_current->palette_good = True;
diff -ur xdvik-22.82.orig/texk/xdvik/dvi-init.c xdvik-22.82/texk/xdvik/dvi-init.c
--- xdvik-22.82.orig/texk/xdvik/dvi-init.c	2004-04-19 16:32:00.000000000 +0800
+++ xdvik-22.82/texk/xdvik/dvi-init.c	2004-04-22 15:21:26.000000000 +0800
@@ -1526,6 +1526,9 @@
     errflag = NO_ERROR;
     if (!internal_open_dvi(dvi_name, &errflag)
 	|| !internal_init_dvi(&errflag, load_fonts)) { /* failure */
+#ifdef MAGICK
+       if (resource.bg_image == NULL)
+#endif
 	XClearWindow(DISP, mane.win);
 	XBell(DISP, 0);
 	statusline_print(STATUS_MEDIUM, "%s: %s%s", dvi_name, get_dvi_error(errflag),
diff -ur xdvik-22.82.orig/texk/xdvik/events.c xdvik-22.82/texk/xdvik/events.c
--- xdvik-22.82.orig/texk/xdvik/events.c	2004-04-22 08:25:41.000000000 +0800
+++ xdvik-22.82/texk/xdvik/events.c	2004-04-22 15:21:26.000000000 +0800
@@ -166,6 +166,10 @@
 # define XIO_OUT 2
 #endif /* HAVE_POLL */
 
+#ifdef MAGICK
+# include "image-magick.h"
+#endif
+
 static sigset_t all_signals;
 
 /*
@@ -530,6 +534,20 @@
 	    int x, int y,
 	    unsigned w, unsigned h)
 {
+    if (resource.bg_image != NULL) {
+	int min_x0 = globals.win_expose.min_x, min_y0 = globals.win_expose.min_y, max_x0 = globals.win_expose.max_x,
+	    max_y0 = globals.win_expose.max_y;
+	globals.win_expose.min_x = x;
+	globals.win_expose.min_y = y;
+	globals.win_expose.max_x = x + w;
+	globals.win_expose.max_y = y + h;
+	Magick_background_image(False);
+	globals.win_expose.min_x = min_x0;
+      	globals.win_expose.min_y = min_y0;
+      	globals.win_expose.max_x = max_x0;
+      	globals.win_expose.max_y = max_y0;
+    }
+    else
     XClearArea(DISP, windowrec->win, x, y, w, h, False);
     expose(windowrec, x, y, w, h);
 }
@@ -679,6 +697,9 @@
 void
 home(wide_bool scrl)
 {
+#ifdef MAGICK
+    if (resource.bg_image == NULL)
+#endif
     if (!scrl)
 	XUnmapWindow(DISP, mane.win);
 # ifdef MOTIF
@@ -713,6 +734,9 @@
     }
 # endif /* MOTIF */
     if (!scrl) {
+#ifdef MAGICK
+	if (resource.bg_image == NULL)
+#endif
 	XMapWindow(DISP, mane.win);
 	/* Wait for the server to catch up---this eliminates flicker. */
 	XSync(DISP, False);
@@ -729,6 +753,9 @@
 home_bottom(wide_bool scrl)
 {
     UNUSED(scrl);
+#ifdef MAGICK
+    if (resource.bg_image == NULL)
+#endif
     XUnmapWindow(DISP, mane.win);
 #ifdef MOTIF
     {
@@ -753,6 +780,9 @@
     if (globals.widgets.y_bar != NULL)
 	XtCallCallbacks(globals.widgets.y_bar, XtNscrollProc, (XtPointer)(window_y + (page_h - mane.height)));
 #endif /* MOTIF */
+#ifdef MAGICK
+    if (resource.bg_image == NULL)
+#endif
     XMapWindow(DISP, mane.win);
     /* Wait for the server to catch up---this eliminates flicker. */
     XSync(DISP, False);
@@ -1301,6 +1331,11 @@
        (i.e. when inadvertedly changing page instead of unpausing)
     */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+	    Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
 	    
@@ -2174,6 +2209,11 @@
        will survive changing shrink
     */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+	    Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
     
@@ -2230,6 +2270,16 @@
 
     /* like elsewhere */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
 #if 0
@@ -2546,6 +2596,11 @@
 
     /* like elsewhere */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
     
@@ -2611,6 +2666,11 @@
 	
     /* like elsewhere */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
 
@@ -2688,6 +2748,11 @@
 #endif /* NEW_MENU_CREATION */
     /* like elsewhere */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
     
@@ -2781,6 +2846,11 @@
 #endif
     /* like elsewhere */
     if (globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
     
@@ -3284,6 +3354,11 @@
 Act_drag(Widget w, XEvent *event,
 	 String *params, Cardinal *num_params)
 {
+
+#ifdef MAGICK
+    if (resource.bg_image != NULL) return;
+#endif
+	
     UNUSED(w);
 
     if (block_this_mouse_event())
@@ -3879,6 +3954,24 @@
     if (have_src_specials && !MAGNIFIER_ACTIVE) {
 	do_update_property = True;
     }
+#ifdef MAGICK
+    if (!MAGNIFIER_ACTIVE) {
+	int min_x0 = globals.win_expose.min_x,
+	    min_y0 = globals.win_expose.min_y,
+	    max_x0 = globals.win_expose.max_x,
+	    max_y0 = globals.win_expose.max_y;
+	    
+	globals.win_expose.min_x = (&(ev->xexpose))->x;
+	globals.win_expose.max_x = (&(ev->xexpose))->x + (&(ev->xexpose))->width;
+	globals.win_expose.min_y = (&(ev->xexpose))->y;
+       globals.win_expose.max_y = (&(ev->xexpose))->y + (&(ev->xexpose))->height;
+	Magick_background_image(False);
+	globals.win_expose.min_x = min_x0;
+	globals.win_expose.min_y = min_y0;
+	globals.win_expose.max_x = max_x0;
+	globals.win_expose.max_y = max_y0;
+    }
+#endif
 
     expose(windowrec, (&(ev->xexpose))->x, (&(ev->xexpose))->y,
 	   (unsigned int)(&(ev->xexpose))->width, (unsigned int)(&(ev->xexpose))->height);
@@ -4938,6 +5031,15 @@
 	    motif_translations_hack();
 	}
 #endif
+#ifdef MAGICK
+	if ((event.type == KeyPress || event.type == ButtonPress) 
+			&& resource.timer != NULL) {
+	    if (event.type == ButtonPress)
+		resource.timer = NULL;	/* signal starting the timer */
+	    fprintf(stderr, "%c", 7);	/* beeper */
+	    continue;
+	}
+#endif
 	XtDispatchEvent(&event);
     }
 }
@@ -5130,6 +5232,11 @@
 #endif /* COLOR */
     
     if (!globals.pausing.flag) {
+#ifdef MAGICK
+	if (resource.bg_image != NULL)
+           Magick_background_image(True);
+	else
+#endif
 	XClearWindow(DISP, mane.win);
     }
 
diff -ur xdvik-22.82.orig/texk/xdvik/gui/mag.c xdvik-22.82/texk/xdvik/gui/mag.c
--- xdvik-22.82.orig/texk/xdvik/gui/mag.c	2004-04-18 20:21:18.000000000 +0800
+++ xdvik-22.82/texk/xdvik/gui/mag.c	2004-04-22 15:21:26.000000000 +0800
@@ -685,6 +685,11 @@
 #endif
     UNUSED(w);
 
+#ifdef MAGICK
+    if (resource.timer != NULL || resource.bg_image != NULL)
+       return;
+#endif
+
     if (block_this_mouse_event())
 	return;
     else if (dvi_file_changed()) {
diff -ur xdvik-22.82.orig/texk/xdvik/hypertex.c xdvik-22.82/texk/xdvik/hypertex.c
--- xdvik-22.82.orig/texk/xdvik/hypertex.c	2004-04-18 20:21:09.000000000 +0800
+++ xdvik-22.82/texk/xdvik/hypertex.c	2004-04-22 15:21:26.000000000 +0800
@@ -1574,6 +1574,11 @@
     struct anchor_info anchor = htex_page_info.anchors[idx];
     int other;
     int i = idx;
+
+#ifdef MAGICK
+    if (resource.bg_image != NULL) return;
+#endif
+    
 #define DO_EXPOSE(lx,ly,rx,ry) (clearexpose(&mane, lx - 20, ly - 3, rx - lx + 26, ry - ly + 6))    
 
     /* HACK ALERT: This is a workaround for a coloring problem with wrapped anchors
@@ -2100,6 +2105,10 @@
 {
     Position drawing_x;
 
+#ifdef MAGICK
+    if (resource.bg_image != NULL) return;
+#endif
+
     /* erase old marker if it's on the same page as the new marker, after
        cancelling the old timeout so that it won't affect the new marker */
     if (m_href_timeout_id)
@@ -2123,6 +2132,10 @@
 
     Position drawing_x, clip_w;
 
+#ifdef MAGICK
+    if (resource.bg_image != NULL) return;
+#endif
+
     XtVaGetValues(globals.widgets.clip_widget, XtNwidth, &clip_w, NULL);
     XtVaGetValues(globals.widgets.draw_widget, XtNx, &drawing_x, NULL);
 
@@ -2157,6 +2170,10 @@
 {
     Position clip_w;
     
+#ifdef MAGICK
+    if (resource.bg_image != NULL) return;
+#endif
+
     UNUSED(client_data);
     UNUSED(id);
 
diff -ur xdvik-22.82.orig/texk/xdvik/image-magick.c xdvik-22.82/texk/xdvik/image-magick.c
--- xdvik-22.82.orig/texk/xdvik/image-magick.c	2004-04-22 15:20:29.000000000 +0800
+++ xdvik-22.82/texk/xdvik/image-magick.c	2004-04-22 15:21:26.000000000 +0800
@@ -56,6 +56,7 @@
 #include "dvi-draw.h"
 #include "util.h"
 #include "special.h"
+#include "string-utils.h"
 #include "image-magick.h"
 
 #ifdef MAGICK	/* entire file */
@@ -858,32 +859,23 @@
 }
 
 static void
-display_image(XDviImage * img, int xul, int yul,
+display_image(XDviImage * img, int xul, int yul, Boolean fast,
 	      const struct window_expose_info *expose,
 	      const GC gc)
 {
+    int x0 = xul;
+    int y0 = yul - img->ximage->height + 1;
+    int w = img->ximage->width;
+    int h = img->ximage->height;
+    int xoff = 0;
+    int yoff = 0;
+
     if (globals.debug & DBG_PS)
 	fprintf(stderr, "    display_image: pos=%d, %d\n", xul, yul);
 
     xul -= img->xoff;
     yul -= img->yoff;
 
-#if 0
-    XPutImage(DISP, mane.win, globals.gc.copy, img->ximage, 0, 0,
-	      xul, yul - img->ximage.height + 1,
-	      img->ximage->width, img->ximage->height);
-#else
-    /* Try to make background pixels transparent */
-    {
-	XImage *scr;
-	int x0 = xul;
-	int y0 = yul - img->ximage->height + 1;
-	int w = img->ximage->width;
-	int h = img->ximage->height;
-	int xoff = 0;
-	int yoff = 0;
-	int x, y;
-
 	if (x0 + w <= expose->min_x || x0 >= expose->max_x ||
 	    y0 + h <= expose->min_y || y0 >= expose->max_y)
 	    return;
@@ -902,6 +894,15 @@
 	if (y0 + h > expose->max_y)
 	    h = expose->max_y - y0 + 0;
 
+    if (fast) {
+	XPutImage(DISP, mane.win, gc, img->ximage,
+			xoff, yoff, x0, y0, w, h);
+    }
+    else {
+	/* Try to make background pixels transparent */
+	XImage *scr;
+	int x, y;
+
 	{
 	    /* Need to double check the bounds here, because redraw_page() in
 	     * events.c may set larger bounding box (expose->min_x, expose->min_y, etc.)
@@ -976,8 +977,18 @@
 	    }
 	XPutImage(DISP, mane.win, globals.gc.copy, scr, 0, 0, x0, y0, w, h);
 	XDestroyImage(scr);
-    }
+#if 1
+	/* Note ZLB: a hack to solve the problem of randomly
+	 * duplicating the last keyboard event (see keyb-bug.tar.bz2),
+	 * which simply removes next key event from the queue.
+	 * I'm not sure if it breaks anything else */
+	{
+	    /* discard next key event */
+	    XEvent event;
+	    XCheckTypedEvent(DISP, KeyPress, &event);
+	}
 #endif
+    }
     showtime("    Done.");
 }
 
@@ -1002,7 +1013,7 @@
 	fprintf(stderr, "Magick: render_image_file: angle=%d\n", info->angle);
 
     if (resource.postscript && (im = load_image(info)) != NULL)
-	display_image(im, x, y, &globals.win_expose, globals.gc.rule);
+	display_image(im, x, y, False, &globals.win_expose, globals.gc.rule);
 
     if (im != NULL && resource.postscript == 1)
 	return;
@@ -1459,6 +1470,187 @@
     return False;
 }
 
+/*-------------------- The clock -----------------------*/
+
+static void Magick_timer_proc(struct xtimer *data);
+/* static Boolean magick_timer_set = False;*/
+static struct xtimer magick_timer = {
+    NULL, {0, 0}, XTM_DEFAULT, Magick_timer_proc
+#if TIMER_HACK /*MOTIF_TIMERS*/
+    ,NULL ,NULL
+#endif
+};
+
+static void 
+Magick_timer_proc(struct xtimer *data)
+{
+    static long total, start = 0;
+    extern int global_statusline_h;	/* statusline.c */
+    static GC gc;
+    static int char_width, char_height;
+    static int shadow_w = 7, shadow_h = 7;	/* size of the shadow */
+    static int xoff = 11, yoff = 15;		/* offset of the timer */
+    static char *fmt = "  %02ld:%02ld  ", *fmt_expired = " -%02ld:%02ld  ";
+    static struct rgb bg_color =	{65535, 65535, 0},
+    		      fg_color =	{0,     0,    65535},
+		      fg_color_expired ={65535, 0,    0},
+		      fg_color_shadow =	{0,     0,    0};
+    static char expired = False;
+    
+    long remain;
+    char buffer[16];
+    struct timeval tm = {0, 0};
+    XGCValues values;
+    int x, y;
+    
+    UNUSED(data);
+
+    gettimeofday(&tm, NULL);
+    if (!start) {
+	char *p;
+	unsigned long valuemask;
+	XFontStruct *fs = XLoadQueryFont(DISP, "10x20");
+	
+	start = tm.tv_sec;
+	total = strtol(resource.timer, &p, 10) * 60;
+	if (*(p++) == ':')
+	    total >= 0 ? (total += atol(p)) : (total -= atol(p));
+
+	if (total <= 0) return;
+	
+	values.function = GXcopy;
+	values.background = alloc_color(&bg_color, 0);
+	valuemask = GCFunction | GCBackground;
+	if (fs != NULL) {
+	    values.font = fs->fid;
+	    valuemask |= GCFont;
+	    char_width = fs->max_bounds.width;
+	    char_height = fs->max_bounds.ascent + fs->max_bounds.descent;
+	}
+	gc = XCreateGC(DISP, XtWindow(globals.widgets.top_level), valuemask, &values);
+
+	set_timer(&magick_timer, 1000);	/* start timer */
+	return;
+    }
+
+    if (total <= 0) return;
+
+    if (resource.timer == NULL) {
+        remain = total - (tm.tv_sec - start);
+	if (remain < 0) {
+	    if (!expired) 
+		expired = True;
+	    remain = - remain;
+	}
+	sprintf(buffer, expired ? fmt_expired : fmt, remain / 60, remain % 60);
+    }
+    else {
+	/* wait for the first mouse click to start timer */
+	static long start0 = -1;
+	if (start0 < 0) start0 = start;
+	start = tm.tv_sec;
+	if (!((tm.tv_sec - start0)&1))
+	    strcpy(buffer, " [Click] ");
+        else
+	    sprintf(buffer, fmt, total / 60, total % 60);
+    }
+
+    values.foreground = alloc_color(expired ? &fg_color_expired : &fg_color, 0);
+    XChangeGC(DISP, gc, GCForeground, &values);
+    
+    x = mane.width - char_width * strlen(buffer)  - xoff;
+    y = mane.height - (resource.statusline ? global_statusline_h : 0) - yoff;
+
+    y -= char_height;
+    XDrawImageString(DISP, mane.win, gc, x, y, buffer, strlen(buffer));
+
+    if (total_pages < 10)
+        sprintf(buffer, "  [%d/%d]  ", current_page + 1, total_pages);
+    else if (total_pages < 100)
+        sprintf(buffer, " [%02d/%02d] ", current_page + 1, total_pages);
+    else
+        sprintf(buffer, "[%03d/%03d]", current_page + 1, total_pages);
+    x = mane.width - char_width * strlen(buffer) - xoff;
+    y += char_height;
+    XDrawImageString(DISP, mane.win, gc, x, y, buffer, strlen(buffer));
+
+    /* the shadow */
+    values.foreground = alloc_color(&fg_color_shadow, 0);
+    XChangeGC(DISP, gc, GCForeground, &values);
+    XFillRectangle(DISP, mane.win, gc, x + shadow_w, y + shadow_h - 3,
+		char_width * strlen(buffer), shadow_h);
+    XFillRectangle(DISP, mane.win, gc, 
+		mane.width - xoff, mane.height - 2 * char_height - shadow_w,
+		shadow_w, 2 * char_height);
+
+    tm.tv_usec = 1000 - tm.tv_usec / 1000;
+    if (tm.tv_usec < 100) tm.tv_usec += 1000;
+    set_timer(&magick_timer, tm.tv_usec);
+}
+
+/*------------------- The background image hack ----------------------*/
+
+void
+Magick_background_image(Boolean force_redraw)
+{
+    XDviImage *img;
+    static XDviImageInfo info = {True, 0, 0, 0, 0, 0, 0, 0, ""};
+    static Boolean init = False;
+
+    if (!init) {
+	init = True;
+	if (resource.bg_image != NULL) {
+	    FILE *f;
+	    strcpy(info.filename, resource.bg_image);
+	    /* Check if the file can be read */
+	    if (G_visual->class == TrueColor && 
+		(f = fopen(resource.bg_image, "rb")) != NULL) {
+		if (globals.debug & DBG_PS)
+		    fprintf(stderr, "Magick: background image = |%s|\n",
+				resource.bg_image);
+		fclose(f);
+	    }
+	    else {
+		if (globals.debug & DBG_PS)
+		    fprintf(stderr, "Magick: loading background image |%s| "
+				    "failed.\n", resource.bg_image);
+		resource.bg_image = NULL;
+	    }
+	}
+	if (resource.timer != NULL) {
+	    Magick_timer_proc(NULL);	/* init. timer_proc */
+	}
+    }
+
+    if (resource.bg_image == NULL)
+	return;
+    
+    info.urx = mane.width / DPI * 72;
+    info.ury = mane.height / DPI * 72;
+    info.rwi = ROUND(10 * info.urx);
+    info.rhi = ROUND(10 * info.ury);
+
+    if (info.rwi < 1 || info.rhi < 1)
+	return;
+
+    if ((img = load_image(&info)) == NULL) {
+	resource.bg_image = NULL;
+	return;
+    }
+
+    if (globals.debug & DBG_PS)
+	fprintf(stderr, "Magick: drawing background image.\n");
+ 
+    if (force_redraw) 
+	XPutImage(DISP, mane.win, globals.gc.copy, img->ximage, 0, 0, 0, 0,
+	      img->ximage->width, img->ximage->height);
+    else
+	display_image(img, 0, img->ximage->height - 1, True,
+			&globals.win_expose, globals.gc.copy);
+    
+    return;
+}
+
 #else
 /* silence `empty compilation unit' warnings */
 static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); }
diff -ur xdvik-22.82.orig/texk/xdvik/image-magick.h xdvik-22.82/texk/xdvik/image-magick.h
--- xdvik-22.82.orig/texk/xdvik/image-magick.h	2004-03-13 04:26:07.000000000 +0800
+++ xdvik-22.82/texk/xdvik/image-magick.h	2004-04-22 15:21:26.000000000 +0800
@@ -28,6 +28,7 @@
 
 #ifdef MAGICK
 extern Boolean Magick_parse_special(char *cp);
+extern void Magick_background_image(Boolean force_redraw);
 #endif /* MAGICK */
 
 #endif /* IMAGE_MAGICK_H_ */
diff -ur xdvik-22.82.orig/texk/xdvik/xdvi.c xdvik-22.82/texk/xdvik/xdvi.c
--- xdvik-22.82.orig/texk/xdvik/xdvi.c	2004-04-22 08:25:43.000000000 +0800
+++ xdvik-22.82/texk/xdvik/xdvi.c	2004-04-22 15:21:26.000000000 +0800
@@ -515,6 +515,8 @@
     {"-magick",		".ImageMagick",		XrmoptionNoArg,		(XPointer)"on"  },
     {"+magick",		".ImageMagick",		XrmoptionNoArg,		(XPointer)"off" },
     {"-magick_cache",	".MagickCache",		XrmoptionSepArg,	(XPointer)NULL	},
+    {"-bg_image",	".backgroundImage",	XrmoptionSepArg,	(XPointer)NULL	},
+    {"-timer",		".timer",		XrmoptionSepArg,	(XPointer)NULL	},
 # endif
 #endif /* PS */
     {"-noscan",		".prescan",		XrmoptionNoArg,		(XPointer)"off"	},
@@ -678,6 +680,10 @@
      offset(useMAGICK), XtRString, "true"},
     {"magick_cache", "MagickCache", XtRString, sizeof(char *),
      offset(magick_cache), XtRString, (XtPointer) NULL},
+    {"backgroundImage", "BackgroundImage", XtRString, sizeof(char *),
+     offset(bg_image), XtRString, (XtPointer) NULL},
+    {"timer", "Timer", XtRString, sizeof(char *),
+     offset(timer), XtRString, (XtPointer) NULL},
 # endif
 #endif /* PS */
     {"prescan", "Prescan", XtRBoolean, sizeof(Boolean),
@@ -922,6 +928,8 @@
 # endif
 # ifdef MAGICK
     /* magick_cache	*/ "size[k|K|m|M|g|G]",
+    /* bg_image		*/ "image_file",
+    /* timer		*/ "mm[:ss]",
 # endif
 #endif
     /* dvipspath	*/ "path",
diff -ur xdvik-22.82.orig/texk/xdvik/xdvi.h xdvik-22.82/texk/xdvik/xdvi.h
--- xdvik-22.82.orig/texk/xdvik/xdvi.h	2004-04-22 08:25:45.000000000 +0800
+++ xdvik-22.82/texk/xdvik/xdvi.h	2004-04-22 15:21:26.000000000 +0800
@@ -505,6 +505,8 @@
 # ifdef	MAGICK
     Boolean	useMAGICK;
     const char *magick_cache;
+    const char *bg_image;
+    const char *timer;
 # endif
 #endif	/* PS */
     Boolean     prescan;
