Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!titech.ac.jp!sys.titech.ac.jp!int.titech.ac.jp!ussy
From: ussy@int.titech.ac.jp (Takuya HARAKAWA)
Subject: Re: xdvi-17+miyu.patch(beta.pre7)+markpage+toc+printd
In-Reply-To: kato@i1nws1.fuis.fukui-u.ac.jp's message of 26 Aug 1995 07:57:41 GMT
Message-ID: <USSY.95Sep4181242@aoi.int.titech.ac.jp>
Sender: news@int.titech.ac.jp
Organization: Tokyo Institute of Tech., Dept. of Intelligence Science, Japan
References: <40h71l$rj7@news.cc.nagoya-u.ac.jp>
	<ONONO.95Aug17022238@etsu.fuka.info.waseda.ac.jp>
	<40u952$2e8@news.cc.nagoya-u.ac.jp>
	<41mk5l$lrb@icpc02.icpc.fukui-u.ac.jp>
Distribution: fj
Date: Mon, 4 Sep 1995 09:12:42 GMT
Lines: 606
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:6641
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=6641&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.


$B$O$i$+$o(B@$BEl9)Bg$G$9(B.

>>> On 26 Aug 1995 07:57:41 GMT,
>>> kato@i1nws1.fuis.fukui-u.ac.jp (Takayuki Kato) said:
>
> $B2CF#!wJ!0fBg$H$$$$$^$9!#(B
>
> $B;d$bCfB<!wL>Bg$5$s$HF1$8>I>u$GG:$s$G$$$^$9!#(B

$B$(!<ITDj4|$KLdBj$r5/$3$7$F$$$k(B xdvi-17.page.patch $B$G$9$,(B...$B@?$K?=$7Lu(B
$B$J$$$3$H$K!"%Q%C%A$r:n@.$7$?;~E@$N$3$H$OK:5Q$NH`J}$K$"$j$^$9(B(^_^;;

$BEvJ}$GN.$7$?%Q%C%A$K$O(B

>> xdvi-17.tasai-ussy.patch
>> xdvi-17.page.patch
>> xdvi-17.pagenumber-fix.patch

$B$N(B3$B<oN`$,$"$j!"(Bxdvi-17.page.patch $B$K4X$7$F$O(B2$B<oN`B8:_$9$k$H$$$&!":.Mp(B
$B$N6K$_$G$9(B.

$B%G%#%9%/Fb$r$5$i$C$?$H$3$m!"D>@\$*Ld$$9g$o$;D:$$$?J}$KG[I[$7$F$$$?$b(B
$B$N$H;W$o$l$k(B xdvi-pl17+markpage+toc+printdvi.patch.fix-2 $B$+$i$NE}9g(B
$B%Q%C%A$,H/8+$5$l$^$7$?$N$GN.$7$F$*$-$^$9(B.

$BK\%Q%C%A$O(B xdvi-17.tar.gz $B$K!"(B

    xdvi-17miyu.patch-beta6.gz
    xdvi-17miyu.beta6-beta.pre7
    xdvi-pl17+markpage+toc+printdvi.patch.gz
    xdvi-pl17+markpage+toc+printdvi.patch.fix-1
    xdvi-pl17+markpage+toc+printdvi.patch.fix-2

$B$rEv$F$?$b$N$KE,MQ$7$F$/$@$5$$(B.

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#xdvi-17.fix-2.to.recent.patch
# This archive created: Mon Sep  4 18:11:20 1995
export PATH; PATH=/bin:$PATH
if test -f 'xdvi-17.fix-2.to.recent.patch'
then
echo shar: will not over-write existing file "'xdvi-17.fix-2.to.recent.patch'"
else
cat << \SHAR_EOF > 'xdvi-17.fix-2.to.recent.patch'
diff -cr xdvi-17.old/Imakefile xdvi-17.new/Imakefile
*** xdvi-17.old/ImakefileThu May 12 20:38:48 1994
--- xdvi-17.new/ImakefileTue Nov 16 21:55:47 1993
***************
*** 10,15 ****
--- 10,16 ----
  #defineUse_MARKPAGE
  #defineUse_TOC
  #defineUse_PRINTDVI
+ #defineUse_PAGENUM
  
  #include "XDvi.defs"
  #include "XDvi.rules"
***************
*** 19,32 ****
  TEXFONTS=$(TEXLIB)/fonts
  
  #ifdefUse_ZEIT
! DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk:$(TEXFONTS)/jfms
  #else
  DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk
  #endif/* Use_ZEIT */
  DEFAULT_VF_PATH=.:$(TEXFONTS)/vf
  DEFAULT_SUBDIR_PATH=
  
! DEFAULT_FONT_SIZES=FontSizes300
  # defined macros of font size list: 
  #   FontSizes82,  FontSizes87,  FontSizes118, FontSizes160, FontSizes180, 
  #   FontSizes240, FontSizes300, FontSizes320, FontSizes360, FontSizes400
--- 20,33 ----
  TEXFONTS=$(TEXLIB)/fonts
  
  #ifdefUse_ZEIT
! DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk:$(TEXFONTS)/tfm
  #else
  DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk
  #endif/* Use_ZEIT */
  DEFAULT_VF_PATH=.:$(TEXFONTS)/vf
  DEFAULT_SUBDIR_PATH=
  
! DEFAULT_FONT_SIZES=FontSizes400
  # defined macros of font size list: 
  #   FontSizes82,  FontSizes87,  FontSizes118, FontSizes160, FontSizes180, 
  #   FontSizes240, FontSizes300, FontSizes320, FontSizes360, FontSizes400
***************
*** 93,109 ****
  TOC_DEFS=
  #endif/* Use_TOC */
  
  #ifdefUse_PRINTDVI
  /* Print-out command templates */
! PRCMDALL="cd %d; dvi2ps %F > /tmp/%F:All@%r.ps; lpr -s -r -P%p -J'%F' /tmp/%F:All@%r.ps"
  /* all pages of DVI file */
! PRCMDCUR="cd %d; dviselect -i %F -o /tmp/%F:%c@%r.dvi =%c; dvi2ps /tmp/%F:%c@%r.dvi > /tmp/%F:%c@%r.ps; /bin/rm /tmp/%F:%c@%r.dvi; lpr -s -r -P%p -J'%F (Page %c)' /tmp/%F:%c@%r.ps"
  /* the current page */
! PRCMDMRK="cd %d; dviselect -i %F -o /tmp/%F:%m@%r.dvi =%m; dvi2ps /tmp/%F:%m@%r.dvi > /tmp/%F:%m@%r.ps; /bin/rm /tmp/%F:%m@%r.dvi; lpr -s -r -P%p -J'%F (Page %m)' /tmp/%F:%m@%r.ps"
  /* the lastly marked page */
! PRCMDRGN="cd %d; dviselect -i %F -o /tmp/%F:%s-%e@%r.dvi =%s:%e; dvi2ps /tmp/%F:%s-%e@%r.dvi > /tmp/%F:%s-%e@%r.ps; /bin/rm /tmp/%F:%s-%e@%r.dvi; lpr -s -r -P%p -J'%F (Page %s-%e)' /tmp/%F:%s-%e@%r.ps"
  /* pages in the region, between the current page and the lastly marked page */
! PRCMDLST="cd %d; dviselect -i %F -o /tmp/%F:%t@%r.dvi %A; dvi2ps /tmp/%F:%t@%r.dvi > /tmp/%F:%t@%r.ps; /bin/rm /tmp/%F:%t@%r.dvi; lpr -P%p -J'%F (Page %t)' /tmp/%F:%t@%r.ps"
  /* all marked pages */
  DVIPRINTER="lp"
  /* the default printer to print-out DVI file */
--- 94,116 ----
  TOC_DEFS=
  #endif/* Use_TOC */
  
+ #ifdefUse_PAGENUM
+ PAGE_DEFS=-DPAGENUM
+ #else
+ PAGE_DEFS=
+ #endif /* Use_PAGENUM */
+ 
  #ifdefUse_PRINTDVI
  /* Print-out command templates */
! PRCMDALL="cd %d; jdvi2kps -news -d 400 %F > /tmp/%F:All@%r.ps; lpr -s -r -P%p -J'%F' /tmp/%F:All@%r.ps"
  /* all pages of DVI file */
! PRCMDCUR="cd %d; dviselect -i %F -o /tmp/%F:%c@%r.dvi =%c; jdvi2kps -news -d 400 /tmp/%F:%c@%r.dvi > /tmp/%F:%c@%r.ps; /bin/rm /tmp/%F:%c@%r.dvi; lpr -s -r -P%p -J'%F (Page %c)' /tmp/%F:%c@%r.ps"
  /* the current page */
! PRCMDMRK="cd %d; dviselect -i %F -o /tmp/%F:%m@%r.dvi =%m; jdvi2kps -news -d 400  /tmp/%F:%m@%r.dvi > /tmp/%F:%m@%r.ps; /bin/rm /tmp/%F:%m@%r.dvi; lpr -s -r -P%p -J'%F (Page %m)' /tmp/%F:%m@%r.ps"
  /* the lastly marked page */
! PRCMDRGN="cd %d; dviselect -i %F -o /tmp/%F:%s-%e@%r.dvi =%s:%e; jdvi2kps -news -d 400  /tmp/%F:%s-%e@%r.dvi > /tmp/%F:%s-%e@%r.ps; /bin/rm /tmp/%F:%s-%e@%r.dvi; lpr -s -r -P%p -J'%F (Page %s-%e)' /tmp/%F:%s-%e@%r.ps"
  /* pages in the region, between the current page and the lastly marked page */
! PRCMDLST="cd %d; dviselect -i %F -o /tmp/%F:%t@%r.dvi %A; jdvi2kps -news -d 400  /tmp/%F:%t@%r.dvi > /tmp/%F:%t@%r.ps; /bin/rm /tmp/%F:%t@%r.dvi; lpr -P%p -J'%F (Page %t)' /tmp/%F:%t@%r.ps"
  /* all marked pages */
  DVIPRINTER="lp"
  /* the default printer to print-out DVI file */
***************
*** 122,133 ****
  #defineXMachineDep-DMSBITFIRST -UBMLONG -DBMSHORT
  #endif
  
! DEFS=-DBDPI=300 -DDEFAULT_SHRINK=\"4\" -DA4 -DVI_KEY \
       XMachineDep \
       -DUSE_PK -DUSE_GF -DUSE_PXL -DBUTTONS -DGREY -UTEXXET \
       -DSEARCH_SUBDIRECTORIES -UXDVIFONTS_ONLY \
!      $(SELFILE_DEFS) $(KANJI_DEFS) $(ZEIT_DEFS) $(PS_DEFS) \
!      $(MARKPAGE_DEFS) $(TOC_DEFS) $(PRINT_DEFS)
  
  CDEBUGFLAGS=-g
  
--- 129,140 ----
  #defineXMachineDep-DMSBITFIRST -UBMLONG -DBMSHORT
  #endif
  
! DEFS=-DBDPI=400 -DDEFAULT_SHRINK=\"5\" -DA4 -DVI_KEY \
       XMachineDep \
       -DUSE_PK -DUSE_GF -DUSE_PXL -DBUTTONS -DGREY -UTEXXET \
       -DSEARCH_SUBDIRECTORIES -UXDVIFONTS_ONLY \
!      $(SELFILE_DEFS) $(KANJI_DEFS) $(ZEIT_DEFS) $(PS_DEFS) $(MAKEPK_DEFS)\
!      $(MARKPAGE_DEFS) $(TOC_DEFS) $(PRINT_DEFS) $(PAGE_DEFS)
  
  CDEBUGFLAGS=-g
  
diff -cr xdvi-17.old/dvi_draw.c xdvi-17.new/dvi_draw.c
*** xdvi-17.old/dvi_draw.cThu May 12 20:34:58 1994
--- xdvi-17.new/dvi_draw.cTue Nov 16 22:45:15 1993
***************
*** 1352,1358 ****
--- 1352,1363 ----
  put_border(ROUNDUP(unshrunk_paper_w, shrink_factor) + 1,
      ROUNDUP(unshrunk_paper_h, shrink_factor) + 1);
  
+ #ifdef PAGENUM
+ (void) lseek(fileno(dvi_file), page_index[current_page].offset,
+      SEEK_SET);
+ #else
  (void) lseek(fileno(dvi_file), page_offset[current_page], SEEK_SET);
+ #endif /* PAGENUM */
  
  bzero((char *) &currinf.data, sizeof(currinf.data));
  currinf.tn_head = tn_head;
diff -cr xdvi-17.old/dvi_init.c xdvi-17.new/dvi_init.c
*** xdvi-17.old/dvi_init.cThu May 12 20:38:51 1994
--- xdvi-17.new/dvi_init.cTue Nov 16 22:44:47 1993
***************
*** 670,675 ****
--- 670,693 ----
  {
  int i;
  
+ #ifdef PAGENUM
+ long offset;
+ 
+ page_index = (PAGE_INDEX *)xmalloc((unsigned)total_pages
+    * sizeof(PAGE_INDEX),
+    "page directory");
+ for (offset = last_page_offset, i = total_pages; i > 0; i--) {
+     Fseek(dvi_file, offset, 0);
+     if (one(dvi_file) != BOP) {
+ dvi_oops("page description doesn't begin with BOP");
+     }
+     page_index[i-1].offset = offset;
+     page_index[i-1].number = four(dvi_file); /* Read c[0] */
+ 
+     Fseek(dvi_file, (long)(9*4), 1);
+     offset = four(dvi_file);
+ }
+ #else
  page_offset = (long *) xmalloc((unsigned) total_pages * sizeof(long),
      "page directory");
  i = total_pages;
***************
*** 683,688 ****
--- 701,707 ----
      Fseek(dvi_file, (long) (1+4+(9*4)), 1);
      Fseek(dvi_file, page_offset[--i] = four(dvi_file), 0);
  }
+ #endif /* PAGENUM */
  }
  
  void
***************
*** 765,771 ****
--- 784,794 ----
      Fclose(dvi_file);
      if (list_fonts) Putchar('\n');
  }
+ #ifdef PAGENUM
+ free((char *) page_index);
+ #else
  free((char *) page_offset);
+ #endif /* PAGENUM */
  free_vf_chain(tn_head);
  tn_head = NULL;
  for (fontp = font_head; fontp != NULL; fontp = fontp->next)
diff -cr xdvi-17.old/toc.c xdvi-17.new/toc.c
*** xdvi-17.old/toc.cThu May 12 20:38:54 1994
--- xdvi-17.new/toc.cThu Nov 18 00:06:39 1993
***************
*** 26,32 ****
--- 26,36 ----
  #include "markpage.h"
  #endif /* MARKPAGE */
  
+ #ifdef PAGENUM
+ static intview_y;
+ #else
  externintpageno_correct;
+ #endif /* PAGENUM */
  
  static Widgetlist_widget, viewport=NULL;
  static char*toc[MAX_PAGE];
***************
*** 39,45 ****
--- 43,53 ----
    get_Page_size()
  {
    int  offset;
+ #ifdef PAGENUM
+   int  start_page = -1;
+ #else
    int  start_page = pageno_correct - 1;
+ #endif /* PAGENUM */
    int  end_page   = start_page + total_pages;
    int  start_pageno_len;
    int  end_pageno_len;
***************
*** 103,120 ****
--- 111,140 ----
      if (ThisPageIsMarked(i)) {
        sprintf(s, "%c %*d%c",
        i==LastMarkPage() ? LASTMRKPAGESYM : MRKPAGESYM,
+ #ifdef PAGENUM
+       get_Page_size(), page_index[i].number,
+ #else
        get_Page_size(), i+pageno_correct,
+ #endif /* PAGENUM */
        i==current_page   ? CURPAGESYM     : NORMALPAGESYM);
      }
      else {
        sprintf(s, "%c %*d%c",
        NORMALPAGESYM,
+ #ifdef PAGENUM
+       get_Page_size(), page_index[i].number,
+ #else
        get_Page_size(), i+pageno_correct,
+ #endif /* PAGENUM */
        i==current_page   ? CURPAGESYM     : NORMALPAGESYM);
      }
  #else
      sprintf(s, "%*d%c",
+ #ifdef PAGENUM
+     get_Page_size(), page_index[i].number,
+ #else
      get_Page_size(), i+pageno_correct,
+ #endif /* PAGENUM */
      i==current_page   ? CURPAGESYM     : NORMALPAGESYM);
  #endif /* MARKPAGE */
      toc[i] = (char *)StrDup(s);
***************
*** 139,147 ****
--- 159,171 ----
  {
    XawListReturnStruct *item = (XawListReturnStruct *)call_data;
    
+ #ifdef PAGENUM
+   keystroke('P', item->list_index, 1, (XEvent *)NULL);
+ #else
    keystroke('g', item->list_index+pageno_correct, 1, (XEvent *)NULL);
    
    Redraw_TOC();
+ #endif /* PAGENUM */
  }
  
  
***************
*** 157,164 ****
    
    switch( button ) {
      /* Get item number */
!   case  2 :  press_page_2 = x = (event->xbutton.y-1)/15;    break;
!   case  3 :  press_page_3 = x = (event->xbutton.y-1)/15;    break;
    }
    ReverseTheMarkOfPage(x);
    
--- 181,188 ----
    
    switch( button ) {
      /* Get item number */
!   case  2 :  press_page_2 = x = Get_Item_Number(w, event->xbutton.y);  break;
!   case  3 :  press_page_3 = x = Get_Item_Number(w, event->xbutton.y);  break;
    }
    ReverseTheMarkOfPage(x);
    
***************
*** 208,214 ****
  {
    int   x;
    
!   x = (event->xbutton.y-1)/15;/* Get item number */
    switch( button ) {
    case  2 :  if( (press_page_2 != x) && (press_page_2 != -1) )
      set_Drag_TOC(button, x);
--- 232,238 ----
  {
    int   x;
    
!   x = Get_Item_Number(w, event->xbutton.y);/* Get item number */
    switch( button ) {
    case  2 :  if( (press_page_2 != x) && (press_page_2 != -1) )
      set_Drag_TOC(button, x);
***************
*** 301,309 ****
--- 325,403 ----
  XtNverticalList,True,
  NULL);
    XtAddCallback(list_widget, XtNcallback, SelectThisPage, (XtPointer)NULL);
+ #ifdef PAGENUM
+   XtAddCallback(viewport, XtNreportCallback, SendReportProc, (XtPointer)NULL);
+ #endif /* PAGENUM */
  #ifdef MARKPAGE
    XtAddEventHandler(list_widget,
      ButtonPressMask | ButtonReleaseMask | LeaveWindowMask,
      False, TOCs_Event_Handler, NULL);
  #endif /* MARKPAGE */
+ }
+ 
+ static  int
+   Get_Item_Number(w, mouse_y)
+ Widget w;
+ int mouse_y;
+ {
+   int i, row_height, index;
+   Dimension row_space, internal_height;
+   XFontStruct *font;
+   Arg arglist[10];
+ 
+   i = 0;
+   XtSetArg(arglist[i], XtNfont, &font); i++;
+   XtSetArg(arglist[i], XtNinternalHeight, &internal_height); i++;
+   XtSetArg(arglist[i], XtNrowSpacing, &row_space); i++;
+   XtGetValues(w, arglist, i);
+   row_height = font->max_bounds.ascent + font->max_bounds.descent
+       + (int)row_space;
+ 
+   index = (mouse_y - internal_height) / row_height;
+ 
+   return index;
+ }
+ 
+ void
+   Center_TOC(current_page, next_page)
+ int current_page, next_page;
+ {
+   int i;
+   Position x, y;
+   Dimension row_space, view_height, font_height;
+   XFontStruct *font;
+   Arg arglist[10];
+ 
+   i = 0;
+   XtSetArg(arglist[i], XtNfont, &font); i++;
+   XtSetArg(arglist[i], XtNrowSpacing, &row_space); i++;
+   XtGetValues(list_widget, arglist, i);
+   font_height = (font->max_bounds.ascent + font->max_bounds.descent
+  + row_space);
+   y = font_height * next_page;
+ 
+   i = 0;
+   XtSetArg(arglist[i], XtNheight, &view_height); i++;
+   XtSetArg(arglist[i], XtNx, &x); i++;
+   XtGetValues(viewport, arglist, i);
+ 
+   if (((next_page > current_page)
+        && (y >= view_y + view_height - font_height + 1))
+       || ((next_page < current_page)
+   && (y < view_y))) {
+     view_height = (int)(view_height / (font_height * 2)) * font_height;
+     Redraw_TOC();
+     XawViewportSetCoordinates(viewport, x,  y - view_height);
+   }
+ }
+ 
+ staticvoid
+   SendReportProc(widget, closure, call_data)
+ Widget widget;
+ XtPointer closure;
+ XtPointer call_data;
+ {
+   XawPannerReport *rep = (XawPannerReport *)call_data;
+ 
+   view_y = rep->slider_y;
  }
diff -cr xdvi-17.old/toc.h xdvi-17.new/toc.h
*** xdvi-17.old/toc.hThu May 12 20:38:55 1994
--- xdvi-17.new/toc.hWed Nov 17 23:17:59 1993
***************
*** 26,28 ****
--- 26,30 ----
  
  extern  void    Create_TOC();
  extern  void    Redraw_TOC();
+ extern  void    Center_TOC();
+ voidSendReportProc();
diff -cr xdvi-17.old/xdvi.c xdvi-17.new/xdvi.c
*** xdvi-17.old/xdvi.cThu May 12 20:39:00 1994
--- xdvi-17.new/xdvi.cThu Nov 18 05:32:21 1993
***************
*** 321,331 ****
--- 321,333 ----
  #defineruleGCforeGC
  #endif/* X10 */
  
+ #ifndef PAGENUM
  #ifdefTOC
  EXTERNintpageno_correct = 1;
  #else
  staticintpageno_correct = 1;
  #endif/* TOC */
+ #endif /* not PAGENUM */
  staticintbak_shrink;
  
  #defineclip_wmane.width
***************
*** 1739,1756 ****
  /* scroll backward */
  next_page = current_page - (arg0 ? number0 : 1);
  break;
      case 'g':
  /* go to absolute page */
  next_page = (arg0 ? number0 - pageno_correct :
      total_pages - 1);
  break;
!     case 'P':/* declare current page */
  pageno_correct = arg0 * number0 - current_page;
  #ifdefTOC
  if ( ! resource.expert )
    Redraw_TOC();
  #endif/* TOC */ 
  return;
  #ifdefMARKPAGE
      case '<':
  /* go to the first page */
--- 1741,1787 ----
  /* scroll backward */
  next_page = current_page - (arg0 ? number0 : 1);
  break;
+ #ifdef PAGENUM
+     case 'g':
+ /* go to page */
+       {
+   int i, prev_page = next_page;
+   if (!arg0) {
+       next_page = total_pages - 1;
+   } else {
+       next_page = -1;
+       for (i = total_pages - 1; i >= 0; i--) {
+   if (page_index[i].number == number0) {
+       next_page = i;
+       break;
+   }
+       }
+       if (next_page == -1) {
+   next_page = prev_page;
+       }
+   }
+       }
+ #else
      case 'g':
  /* go to absolute page */
  next_page = (arg0 ? number0 - pageno_correct :
      total_pages - 1);
+ #endif /* PAGENUM */
  break;
! #ifdef PAGENUM
!     case 'P':
! /* go to absolute page */
! next_page = (arg0 ? number0 : total_pages - 1);
! break;
! #else
!  case 'P':/* declare current page */
  pageno_correct = arg0 * number0 - current_page;
  #ifdefTOC
  if ( ! resource.expert )
    Redraw_TOC();
  #endif/* TOC */ 
  return;
+ #endif /* not PAGENUM */
  #ifdefMARKPAGE
      case '<':
  /* go to the first page */
***************
*** 1764,1770 ****
--- 1795,1805 ----
  break;
      case 'm':
  /* Mark a page */
+ #ifdef PAGENUM
+ mark_page = (arg0 ? number0 : current_page);
+ #else
  mark_page = (arg0 ? number0 - pageno_correct : current_page);
+ #endif /* PAGENUM */
  if (0 <= mark_page && mark_page < total_pages) {
    MarkPage(mark_page);
  #ifdefTOC
***************
*** 1778,1784 ****
--- 1813,1823 ----
  return;
      case 'U':
  /* Delete the mark */
+ #ifdef PAGENUM
+ mark_page = (arg0 ? number0 : current_page);
+ #else
  mark_page = (arg0 ? number0 - pageno_correct : current_page);
+ #endif /* PAGENUM */
  if (0 <= mark_page && mark_page < total_pages) {
    if (ThisPageIsMarked(mark_page)) {
      UnmarkPage(mark_page);
***************
*** 2099,2104 ****
--- 2138,2147 ----
  }
  if (0 <= next_page && next_page < total_pages) {
      if (current_page != next_page) {
+ #ifdefTOC
+ if ( ! resource.expert )
+   Center_TOC(current_page, next_page);
+ #endif/* TOC */
  current_page = next_page;
  hush_spec_now = hush_spec;
  if (!RESOURCE(keep_flag)) home(False);
diff -cr xdvi-17.old/xdvi.h xdvi-17.new/xdvi.h
*** xdvi-17.old/xdvi.hThu May 12 20:35:24 1994
--- xdvi-17.new/xdvi.hTue Nov 16 21:23:43 1993
***************
*** 262,268 ****
--- 262,282 ----
   * Table of page offsets in DVI file, indexed by page number - 1.
   * Initialized in prepare_pages().
   */
+ 
+ #ifdef PAGENUM
+ 
+ typedef struct {
+     long offset;
+     int number;
+ } PAGE_INDEX;
+ 
+ EXTERNPAGE_INDEX*page_index;
+ 
+ #else /* not PAGENUM */
+ 
  EXTERNlong*page_offset;
+ 
+ #endif /* PAGENUM */
  
  /*
   * Mechanism for reducing repeated warning about specials, lost characters, etc.
SHAR_EOF
fi # end of overwriting check
#End of shell archive
exit 0
--
 o`'o  $B$O$i$+$o(B@$BEl9)Bg(B
(^$B"^(B^) ussy@int.titech.ac.jp
