[comp.windows.x] xproof version 3.5 on expo

tim@appenzell.cs.wisc.edu (Tim Theisen) (08/06/90)

Xproof version 3.5 is available via anonymous ftp from expo.lcs.mit.edu
and pokey.cs.wisc.edu.  This version has minor pathces contributed by
Andreas Stolcke <stolcke@icsi.Berkeley.EDU>.  Thank you, Andreas!

Xproof is a ditroff previewer for X11.

Here is a summary of the fixes:

-  allow Bezier curves (D'z ...') to be faked using splines, instead of
   complaining about an undefined command. Bezier curves are not available
   in all ditroff versions, but it doesn't hurt putting them in.

-  xproof originally doesn't care about the 'x T ...' command at the beginning
   of the input.  I modified it so it set's its 'device' variable accordingly.
   Also, the DEVICE macro wasn't used to define the default device.

-  The #define InstalledLibraries business in Imakefile is no longer necessary
   in R4 since the R4 imake rules already provide such an option
   (generating the Makefile with xmkmf causes the installed libs to be used).

I am including the patch file since it is so short.

...Tim

xproof.patch05:

diff -c xproof.old/Imakefile xproof/Imakefile
*** xproof.old/Imakefile	Fri Jun 22 16:34:46 1990
--- xproof/Imakefile	Tue Jul 17 16:17:45 1990
***************
*** 1,4 ****
! /* $Header: /src/X11/uw/xproof/RCS/Imakefile,v 3.14 90/06/22 15:57:59 tim Exp $ */
  
  /* SITE-DEPENDENT PARAMETERS */
  
--- 1,4 ----
! /* $Header: /src/X11/uw/xproof/RCS/Imakefile,v 3.15 90/07/17 16:17:14 tim Exp $ */
  
  /* SITE-DEPENDENT PARAMETERS */
  
***************
*** 24,34 ****
  /* Place to install new fonts */
  #define FontInstDir $(FONTDIR)
  
- /* Use the installed versions of various libraries rather than the versions
-  * in the source directory tree.
-  */
- #undef InstalledLibraries
- 
  /* The following command should run ditroff on standard input and produce
   * its results on standard output.
   */
--- 24,29 ----
***************
*** 47,60 ****
      FONTINSTDIR = FontInstDir
          DEFINES = DescDir Device UsePixmap
  
- #ifdef InstalledLibraries
-   SYS_LIBRARIES = -lXaw -lXmu -lXt -lXext -lX11 -lm
-        INCLUDES = -I/**/IncDir
- #else
  LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
    SYS_LIBRARIES = -lm
         INCLUDES = -I$(TOP)
- #endif
  
  
  # Faces that need fixing.  The Symbol font is already ok.  Other fonts are
--- 42,50 ----
diff -c xproof.old/getdevinfo.c xproof/getdevinfo.c
*** xproof.old/getdevinfo.c	Fri Jun 22 16:35:09 1990
--- xproof/getdevinfo.c	Tue Jul 17 16:26:52 1990
***************
*** 2,8 ****
  #include "dev.h"
  #include "xproof.h"
  #ifndef lint
! static char *rcsid="$Header: /src/X11/uw/xproof/RCS/getdevinfo.c,v 3.5 89/07/17 10:55:41 solomon Distrib $";
  #endif
  
  char *malloc();
--- 2,8 ----
  #include "dev.h"
  #include "xproof.h"
  #ifndef lint
! static char *rcsid="$Header: /src/X11/uw/xproof/RCS/getdevinfo.c,v 3.6 90/07/17 16:26:47 tim Exp $";
  #endif
  
  char *malloc();
***************
*** 15,21 ****
  void free();
  #endif
  
! static char *device = "x";
  
  /*
   * Documentation about ditroff font information, gleaned from reading
--- 15,21 ----
  void free();
  #endif
  
! char *device = DEVICE;
  
  /*
   * Documentation about ditroff font information, gleaned from reading
***************
*** 131,145 ****
  
  	(void) sprintf(fname,"%s/dev%s/DESC.out",DESCDIR,device);
  	fi = open(fname,0);
! 	if (fi<0) {
  		/* Bad installation.  Try one other thing before giving up. */
! 		device = "psc";
! 		(void) sprintf(altfname,"%s/dev%s/DESC.out",DESCDIR,device);
  		fi = open(altfname,0);
  		if (fi<0) {
  			perror(fname);
  			return;
  		}
  	}
  
  	/* Process header */
--- 131,145 ----
  
  	(void) sprintf(fname,"%s/dev%s/DESC.out",DESCDIR,device);
  	fi = open(fname,0);
! 	if (fi<0 && strcmp(device, DEVICE)) {
  		/* Bad installation.  Try one other thing before giving up. */
! 		(void) sprintf(altfname,"%s/dev%s/DESC.out",DESCDIR,DEVICE);
  		fi = open(altfname,0);
  		if (fi<0) {
  			perror(fname);
  			return;
  		}
+ 		device = DEVICE;
  	}
  
  	/* Process header */
diff -c xproof.old/patchlevel.h xproof/patchlevel.h
*** xproof.old/patchlevel.h	Mon Jun 25 19:17:35 1990
--- xproof/patchlevel.h	Sat Aug  4 10:24:44 1990
***************
*** 1,5 ****
--- 1,23 ----
  /*
   * $Log:	patchlevel.h,v $
+  * Revision 1.6  90/08/04  10:23:55  tim
+  * Patches from Andreas Stolcke <stolcke@icsi.Berkeley.EDU>
+  * 
+  * -  allow Bezier curves (D'z ...') to be faked using splines, instead of
+  *    complaining about an undefined command. Bezier curves are not available
+  *   in all ditroff versions, but it doesn't hurt putting them in.  They are
+  *    generated by the gremlin version in use here at Berkeley.  If you feel
+  *    like implementing real Bezier curves in xproof let me know.  I can send
+  *    you the relevant code in gr2ps or psdit that does it.
+  * 
+  * -  xproof originally doesn't care about the 'x T ...' command at the beginning
+  *    of the input.  I modified it so it set's its 'device' variable accordingly.
+  *    Also, the DEVICE macro wasn't used to define the default device.
+  * 
+  * -  The #define InstalledLibraries business in Imakefile is no longer necessary
+  *    in R4 since the R4 imake rules already provide such an option
+  *    (generating the Makefile with xmkmf causes the installed libs to be used).
+  * 
   * Revision 1.5  90/06/25  19:15:42  tim
   * Redid caching of font_id's.  They don't belong in the font table.
   * If recorded in the font table, only one size of each type face could
***************
*** 48,51 ****
   * Initial revision
   * 
   */
! #define PATCHLEVEL 4
--- 66,69 ----
   * Initial revision
   * 
   */
! #define PATCHLEVEL 5
diff -c xproof.old/showpage.c xproof/showpage.c
*** xproof.old/showpage.c	Fri Jun 22 16:35:17 1990
--- xproof/showpage.c	Tue Jul 17 16:26:46 1990
***************
*** 2,10 ****
  #include <ctype.h>
  
  #ifndef lint
! static char *rcsid="$Header: /src/X11/uw/xproof/RCS/showpage.c,v 3.5 89/08/20 21:19:18 tim Exp $";
  #endif
  
  static void Devinit();
  static int LookupSize();
  static void ShowSpecial();
--- 2,13 ----
  #include <ctype.h>
  
  #ifndef lint
! static char *rcsid="$Header: /src/X11/uw/xproof/RCS/showpage.c,v 3.6 90/07/17 16:25:31 tim Exp $";
  #endif
  
+ extern char *malloc();
+ extern char *device;
+ 
  static void Devinit();
  static int LookupSize();
  static void ShowSpecial();
***************
*** 167,172 ****
--- 170,176 ----
  						drawcurve(w, f, 0);
  						break;
  					case '~':	/* 'pic' (B ?) spline */
+ 					case 'z':	/* fake Bezier curve */
  						drawcurve(w, f, 1);
  						break;
  					case 't':	/* set line thickness */
***************
*** 262,268 ****
  
  	if (!fgets(buf,sizeof buf,f))
  		return feof(f) ? -1 : -3;
! 	if (strncmp(buf,"x T",3) != 0) return -2;
  
  	while ((c = getc(f))=='x') {
  		while ((c=getc(f))==' ') /* empty body */;
--- 266,280 ----
  
  	if (!fgets(buf,sizeof buf,f))
  		return feof(f) ? -1 : -3;
! 
! 	device = malloc(strlen(buf));
! 	if ( device == NULL ) {
! 		perror("malloc");
! 		exit(1);
! 	}
! 
! 	if ( sscanf( buf, "x T %s", device) != 1 )
! 		return -2;
  
  	while ((c = getc(f))=='x') {
  		while ((c=getc(f))==' ') /* empty body */;
diff -c xproof.old/version.c xproof/version.c
*** xproof.old/version.c	Mon Jun 25 19:21:01 1990
--- xproof/version.c	Sat Aug  4 10:32:01 1990
***************
*** 1,10 ****
  /* Automatically genereated by mkversion.sh -- DO NOT EDIT!! */
  #include "patchlevel.h"
  int MajorVersion = 3 ;
! int MinorVersion = 4 ;
  int PatchLevel = PATCHLEVEL;
  #if 0
! Imakefile:/* Header: /src/X11/uw/xproof/RCS/Imakefile,v 3.14 90/06/22 15:57:59 tim Exp  */
  Proof.c:	"Header: /src/X11/uw/xproof/RCS/Proof.c,v 3.15 90/06/25 18:58:48 tim Exp ";
  Proof.h: * Header: /src/X11/uw/xproof/RCS/Proof.h,v 3.6 90/06/22 16:00:07 tim Exp 
  ProofP.h: * Header: /src/X11/uw/xproof/RCS/ProofP.h,v 3.4 90/06/22 16:00:30 tim Exp 
--- 1,10 ----
  /* Automatically genereated by mkversion.sh -- DO NOT EDIT!! */
  #include "patchlevel.h"
  int MajorVersion = 3 ;
! int MinorVersion = 5 ;
  int PatchLevel = PATCHLEVEL;
  #if 0
! Imakefile:/* Header: /src/X11/uw/xproof/RCS/Imakefile,v 3.15 90/07/17 16:17:14 tim Exp  */
  Proof.c:	"Header: /src/X11/uw/xproof/RCS/Proof.c,v 3.15 90/06/25 18:58:48 tim Exp ";
  Proof.h: * Header: /src/X11/uw/xproof/RCS/Proof.h,v 3.6 90/06/22 16:00:07 tim Exp 
  ProofP.h: * Header: /src/X11/uw/xproof/RCS/ProofP.h,v 3.4 90/06/22 16:00:30 tim Exp 
***************
*** 15,25 ****
  draw.c:static char rcsid[]="Header: /src/X11/uw/xproof/RCS/draw.c,v 3.3 88/09/14 10:46:02 solomon Distrib ";
  drawhacks.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/drawhacks.c,v 1.3 90/06/22 16:26:30 tim Exp ";
  fixfont.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/fixfont.c,v 1.5 90/06/22 16:27:00 tim Exp ";
! getdevinfo.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/getdevinfo.c,v 3.5 89/07/17 10:55:41 solomon Distrib ";
  index.c:static char rcsid[] = "Header: /src/X11/uw/xproof/RCS/index.c,v 3.4 90/06/22 16:27:35 tim Exp ";
  main.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/main.c,v 3.9 90/06/22 16:28:19 tim Exp ";
  mkversion.sh:# Header: /src/X11/uw/xproof/RCS/mkversion.sh,v 1.4 89/07/17 12:04:33 solomon Distrib 
! showpage.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/showpage.c,v 3.5 89/08/20 21:19:18 tim Exp ";
  xfontinfo.c:static char rcsid[] = "Header: /src/X11/uw/xproof/RCS/xfontinfo.c,v 3.8 90/06/25 19:11:49 tim Exp ";
  ximake:# Header: /src/X11/uw/xproof/RCS/ximake,v 1.1 89/06/13 07:27:35 solomon Distrib 
  xproof.h: * Header: /src/X11/uw/xproof/RCS/xproof.h,v 3.6 90/06/22 16:31:09 tim Exp 
--- 15,25 ----
  draw.c:static char rcsid[]="Header: /src/X11/uw/xproof/RCS/draw.c,v 3.3 88/09/14 10:46:02 solomon Distrib ";
  drawhacks.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/drawhacks.c,v 1.3 90/06/22 16:26:30 tim Exp ";
  fixfont.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/fixfont.c,v 1.5 90/06/22 16:27:00 tim Exp ";
! getdevinfo.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/getdevinfo.c,v 3.6 90/07/17 16:26:47 tim Exp ";
  index.c:static char rcsid[] = "Header: /src/X11/uw/xproof/RCS/index.c,v 3.4 90/06/22 16:27:35 tim Exp ";
  main.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/main.c,v 3.9 90/06/22 16:28:19 tim Exp ";
  mkversion.sh:# Header: /src/X11/uw/xproof/RCS/mkversion.sh,v 1.4 89/07/17 12:04:33 solomon Distrib 
! showpage.c:static char *rcsid="Header: /src/X11/uw/xproof/RCS/showpage.c,v 3.6 90/07/17 16:25:31 tim Exp ";
  xfontinfo.c:static char rcsid[] = "Header: /src/X11/uw/xproof/RCS/xfontinfo.c,v 3.8 90/06/25 19:11:49 tim Exp ";
  ximake:# Header: /src/X11/uw/xproof/RCS/ximake,v 1.1 89/06/13 07:27:35 solomon Distrib 
  xproof.h: * Header: /src/X11/uw/xproof/RCS/xproof.h,v 3.6 90/06/22 16:31:09 tim Exp 
--
Tim Theisen             Department of Computer Sciences
tim@cs.wisc.edu         University of Wisconsin-Madison
uwvax!tim               1210 West Dayton Street
(608)262-0438           Madison, WI   53706