DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T x

⟦15745e1d9⟧ TextFile

    Length: 6282 (0x188a)
    Types: TextFile
    Names: »xpr.patch«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/TeXPS/psfig/xpr.patch« 

TextFile

*** xpr.c.orig	Mon Oct  2 11:58:53 1989
--- xpr.c	Mon Oct  2 11:58:55 1989
***************
*** 30,35 ****
--- 30,41 ----
   * this software for any purpose.  It is provided "as is"
   * without express or implied warranty.
   * 
+  * Added device "psfig" to generate PS output compatible with
+  * psfig 1.4. These changes are part of TeXPS, a TeX PS package.
+  * (C) 1989 Stephan v. Bechtolsheim. For details on the copyright
+  * etc. see the general copyright for TeXPS. Essentially: no warranty,
+  * and if the software is redistributed, you must grant the
+  * same rights to the recipient and charge no fee.
   */
  
  #ifndef lint
***************
*** 47,53 ****
  
  int debug = 0;
  
! enum device {LN01, LN03, LA100, PS, PP};
  
  #define W_MAX 2400
  #define H_MAX 3150
--- 53,59 ----
  
  int debug = 0;
  
! enum device {LN01, LN03, LA100, PS, PP, PSFIG};
  
  #define W_MAX 2400
  #define H_MAX 3150
***************
*** 150,156 ****
      setup_layout(device, (int) win.pixmap_width, (int) win.pixmap_height, flags, width, 
  		 height, header, trailer, &scale, &orientation);
  
!     if (device == PS) {
  	iw = win.pixmap_width;
  	ih = win.pixmap_height;
      } else {
--- 156,162 ----
      setup_layout(device, (int) win.pixmap_width, (int) win.pixmap_height, flags, width, 
  		 height, header, trailer, &scale, &orientation);
  
!     if (device == PS || device == PSFIG) {
  	iw = win.pixmap_width;
  	ih = win.pixmap_height;
      } else {
***************
*** 177,184 ****
  	la100_setup(iw, ih, scale);
  	la100_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT));
  	la100_finish();
!     } else if (device == PS) {
! 	ps_setup(iw, ih, orientation, scale, left, top,
  		   flags, header, trailer, w_name);
  	ps_output_bits(iw, ih, flags, orientation, &win);
  	ps_finish();
--- 183,190 ----
  	la100_setup(iw, ih, scale);
  	la100_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT));
  	la100_finish();
!     } else if (device == PS || device == PSFIG) {
! 	ps_setup(device, iw, ih, orientation, scale, left, top,
  		   flags, header, trailer, w_name);
  	ps_output_bits(iw, ih, flags, orientation, &win);
  	ps_finish();
***************
*** 194,200 ****
  	fprintf(stderr, "Orientation: %s, Scale: %d\n", 
  		(orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
      }
!     if (device != PS && (flags & F_DUMP)) dump_sixmap(sixmap, iw, ih);
  }
  
  parse_args(argc, argv, scale, width, height, left, top, device, flags, 
--- 200,207 ----
  	fprintf(stderr, "Orientation: %s, Scale: %d\n", 
  		(orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
      }
!     if ((device != PS && device != PSFIG) &&
! 	(flags & F_DUMP)) dump_sixmap(sixmap, iw, ih);
  }
  
  parse_args(argc, argv, scale, width, height, left, top, device, flags, 
***************
*** 246,252 ****
  	    }
  	    break;
  
! 	case 'd':		/* -device {ln03 | la100 | ps | lw} | -dump */
  	    if (len <= 2) {
  		fprintf(stderr, "xpr: ambiguous option: \"%s\"\n", *argv);
  		exit(1);
--- 253,259 ----
  	    }
  	    break;
  
! 	case 'd':		/* -device {ln03 | la100 | ps | psfig| lw} | -dump */
  	    if (len <= 2) {
  		fprintf(stderr, "xpr: ambiguous option: \"%s\"\n", *argv);
  		exit(1);
***************
*** 260,265 ****
--- 267,274 ----
  		    *device = LA100;
  		} else if (!bcmp(*argv, "ps", len)) {
  		    *device = PS;
+ 		} else if (!bcmp(*argv, "psfig", len)) {
+ 		    *device = PSFIG;
  		} else if (!bcmp(*argv, "lw", len)) {
  		    *device = PS;
  		} else if (!bcmp(*argv, "pp", len)) {
***************
*** 433,439 ****
      if (trailer != NULL) win_height += 75;
  
      /* check maximum width and height; set orientation and scale*/
!     if (device == LN03 || device == PS) {
  	if ((win_width < win_height || (flags & F_PORTRAIT)) && 
  	    !(flags & F_LANDSCAPE)) {
  	    *orientation = PORTRAIT;
--- 442,448 ----
      if (trailer != NULL) win_height += 75;
  
      /* check maximum width and height; set orientation and scale*/
!     if (device == LN03 || device == PS || device == PSFIG) {
  	if ((win_width < win_height || (flags & F_PORTRAIT)) && 
  	    !(flags & F_LANDSCAPE)) {
  	    *orientation = PORTRAIT;
***************
*** 842,849 ****
  }
  
  /* ARGSUSED */
! ps_setup(iw, ih, orientation, scale, left, top, 
  	   flags, header, trailer, name)
  int iw;
  int ih;
  enum orientation orientation;
--- 851,859 ----
  }
  
  /* ARGSUSED */
! ps_setup(device, iw, ih, orientation, scale, left, top, 
  	   flags, header, trailer, name)
+ enum device device;
  int iw;
  int ih;
  enum orientation orientation;
***************
*** 868,873 ****
--- 878,891 ----
      printf ("%%%%Title: %s (%s)\n", infilename,name);
      printf ("%%%%CreationDate: %s",
  		(time (&clock), ctime (&clock)));
+     if (device == PSFIG) {
+       if (orientation == PORTRAIT)
+ 	printf ("%%%%BoundingBox: 0 0 %d %d\n", iw, ih);
+       else {
+ 	fprintf (stderr, "xpr -device psfig: must use portrait orientation.");
+ 	exit (1);
+       }
+     }
      printf ("%%%%EndComments\n");
  
      dump_prolog(flags);
***************
*** 895,906 ****
  	    }
  	    printf("grestore\n");
  	}
! 	/* set resolution to device units (300/inch) */
! 	printf("72 300 div dup scale\n");
! 	/* move to lower left corner of image */
! 	printf("%d %d translate\n",lm,bm);
! 	/* dump the bitmap */
! 	printf("%d %d %d bitdump\n",iw,ih,scale);
      } else { /* orientation == LANDSCAPE */
  	/* calculate margins */
  	lm = (top > 0)? (PAPER_WIDTH - top - scale * ih)
--- 913,928 ----
  	    }
  	    printf("grestore\n");
  	}
! 	if (device == PS) {
! 	  /* set resolution to device units (300/inch) */
! 	  printf("72 300 div dup scale\n");
! 	  /* move to lower left corner of image */
! 	  printf("%d %d translate\n",lm,bm);
! 	  /* dump the bitmap */
! 	  printf("%d %d %d bitdump\n",iw,ih,scale);
! 	} else {
! 	  printf("%d %d 1 bitdump\n",iw,ih);
! 	}
      } else { /* orientation == LANDSCAPE */
  	/* calculate margins */
  	lm = (top > 0)? (PAPER_WIDTH - top - scale * ih)
***************
*** 1492,1496 ****
  2222222222222222aaaaaaaaaaaaaaaa6666666666666666eeeeeeeeeeeeeeee\
  111111111111111199999999999999995555555555555555dddddddddddddddd\
  3333333333333333bbbbbbbbbbbbbbbb7777777777777777ffffffffffffffff";
- 
  
--- 1514,1517 ----