home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- organization: PC Research, Inc.
- subject: v08i031: JetRoff DWB troff to HP postprocessor - Patch02
- From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
- Reply-To: jetroff@pcrat.UUCP (JetRoff Mail)
-
- Posting-number: Volume 8, Issue 31
- Submitted-by: jetroff@pcrat.UUCP (JetRoff Mail)
- Archive-name: jetroff/patch02
-
- JetRoff Usenet version 1.1 Patch 02. 10/04/88.
-
- This patch should make it possible to use JetRoff on a LaserJet+.
- I totally botched the "SERIES=1" support. I don't have an older HP,
- and I screwed up and didn't do a "make install" when I thought I
- tested it on the Series II. I was missing some changes anyway.
- This version, at least, works on the Series II, so it has a
- chance of turning the trick for the LasetJet+. Turns out a LOT
- of clones emulate the plus, so if you have a clone try building
- JetRoff with -DSERIES=1.
-
- This patch also fixes some minor makefile glitches.
-
- Apply this patch this way:
-
- cd root_of_JetRoff_source
- patch -p <Patch02
-
- Here are the diffs:
- *** ../1.1.1/makefile Mon Oct 3 19:07:21 1988
- --- makefile Tue Oct 4 18:01:14 1988
- ***************
- *** 30,36
- cd font; make $@ UNIX=$(UNIX)
- cd bm; make $@ UNIX=$(UNIX)
-
- ! bsd:
- cd bsd; make
-
- install all: message
-
- --- 30,36 -----
- cd font; make $@ UNIX=$(UNIX)
- cd bm; make $@ UNIX=$(UNIX)
-
- ! bsd: FRC
- cd bsd; make
-
- install all: message
- *** ../1.1.1/djet/out.c Mon Oct 3 19:07:33 1988
- --- djet/out.c Tue Oct 4 17:57:09 1988
- ***************
- *** 69,75
- register int there;
- {
- int therelen;
- ! register int delta = there - here;
- register int deltalen;
-
- # if SERIES == 1
-
- --- 69,75 -----
- register int there;
- {
- int therelen;
- ! register int delta;
- register int deltalen;
-
- # if SERIES == 1
- ***************
- *** 76,81
- here *= 12; here /= 5;
- there *= 12; there /= 5;
- # endif
- if (there >= 1000) therelen = 4;
- else if (there >= 100) therelen = 3;
- else if (there >= 10) therelen = 2;
-
- --- 76,82 -----
- here *= 12; here /= 5;
- there *= 12; there /= 5;
- # endif
- + delta = there - here;
- if (there >= 1000) therelen = 4;
- else if (there >= 100) therelen = 3;
- else if (there >= 10) therelen = 2;
- ***************
- *** 112,118
- {
- if (y == hpy) return;
- # if SERIES == 1
- ! Printf("\033*p%sV", best_way_there(bufy, hpy, y));
- # else
- Printf("\033*p%sY", best_way_there(bufy, hpy, y));
- # endif
-
- --- 113,119 -----
- {
- if (y == hpy) return;
- # if SERIES == 1
- ! Printf("\033&a%sV", best_way_there(bufy, hpy, y));
- # else
- Printf("\033*p%sY", best_way_there(bufy, hpy, y));
- # endif
- ***************
- *** 120,126
- else if (y == hpy)
- {
- # if SERIES == 1
- ! Printf("\033*p%sH", best_way_there(bufx, hpx, x));
- # else
- Printf("\033*p%sX", best_way_there(bufx, hpx, x));
- # endif
-
- --- 121,127 -----
- else if (y == hpy)
- {
- # if SERIES == 1
- ! Printf("\033&a%sH", best_way_there(bufx, hpx, x));
- # else
- Printf("\033*p%sX", best_way_there(bufx, hpx, x));
- # endif
- ***************
- *** 128,134
- else
- {
- # if SERIES == 1
- ! Printf("\033*p%sh%sV",
- best_way_there(bufx, hpx, x),
- best_way_there(bufy, hpy, y));
- # else
-
- --- 129,135 -----
- else
- {
- # if SERIES == 1
- ! Printf("\033&a%sh%sV",
- best_way_there(bufx, hpx, x),
- best_way_there(bufy, hpy, y));
- # else
- *** ../1.1.1/djet/jetbackup.c Mon Oct 3 19:07:59 1988
- --- djet/jetbackup.c Tue Oct 4 17:59:53 1988
- ***************
- *** 503,509
- register int mdots;
-
- # if SERIES == 1
- ! Printf("\033*p%dV", 4*720);
- # else
- Printf("\033*p%dY", 4*300);
- # endif
-
- --- 503,509 -----
- register int mdots;
-
- # if SERIES == 1
- ! Printf("\033&a%dV", 4*720);
- # else
- Printf("\033*p%dY", 4*300);
- # endif
- ***************
- *** 517,523
- else
- x = (PageWidth*3/4) - mdots/2;
- x *= 12; x /= 5;
- ! Printf("\033*p%dH", x);
- }
- # else
- if (page == 4)
-
- --- 517,523 -----
- else
- x = (PageWidth*3/4) - mdots/2;
- x *= 12; x /= 5;
- ! Printf("\033&a%dH", x);
- }
- # else
- if (page == 4)
- *** ../1.1.1/djet/pk16.c Tue Oct 4 17:53:11 1988
- --- djet/pk16.c Tue Oct 4 17:59:09 1988
- ***************
- *** 46,51
- #include "paths.h"
-
- #define PERM /* Make fonts permanent (for testing) */
-
- typedef struct
- {
-
- --- 46,54 -----
- #include "paths.h"
-
- #define PERM /* Make fonts permanent (for testing) */
- + #if SERIES==1
- + #define OLDHPFONT
- + #endif
-
- typedef struct
- {
- ***************
- *** 479,486
- {
- register long height;
-
- ! Fprintf(fp, "\033)s%dW", FONT_DESC_SIZE);
- ! ljshort(fp, FONT_DESC_SIZE);
- ljbyte(fp, 0);
- ljbyte(fp, FONT_TYPE_8BIT);
- ljshort(fp, 0);
-
- --- 482,494 -----
- {
- register long height;
-
- ! # ifdef OLDHPFONT
- ! Fprintf(fp, "\033)s%dW", OLD_FONT_DESC_SIZE);
- ! ljshort(fp, OLD_FONT_DESC_SIZE);
- ! # else
- ! Fprintf(fp, "\033)s%dW", FONT_DESC_SIZE);
- ! ljshort(fp, FONT_DESC_SIZE);
- ! # endif
- ljbyte(fp, 0);
- ljbyte(fp, FONT_TYPE_8BIT);
- ljshort(fp, 0);
- ***************
- *** 507,527
- ljbyte(fp, STYLE_UPRIGHT);
- ljbyte(fp, STROKE_MEDIUM);
- ljbyte(fp, TYPEFACE_TMSRMN);
- ! ljbyte(fp, 0);
- ! ljbyte(fp, SERIF_SANS_SQUARE);
- ! ljshort(fp, 0);
- ! ljbyte(fp, 0);
- ! ljbyte(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljbyte(fp, 0);
- ! ljbyte(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! (void) fwrite(p->name, 16, 1, fp);
- p->loaded = 1;
- #ifdef PERM
- Fprintf(fp, "\033*c%dF", 5);
-
- --- 515,537 -----
- ljbyte(fp, STYLE_UPRIGHT);
- ljbyte(fp, STROKE_MEDIUM);
- ljbyte(fp, TYPEFACE_TMSRMN);
- ! # ifndef OLDHPFONT
- ! ljbyte(fp, 0);
- ! ljbyte(fp, SERIF_SANS_SQUARE);
- ! ljshort(fp, 0);
- ! ljbyte(fp, 0);
- ! ljbyte(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljbyte(fp, 0);
- ! ljbyte(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! ljshort(fp, 0);
- ! (void) fwrite(p->name, 16, 1, fp);
- ! # endif
- p->loaded = 1;
- #ifdef PERM
- Fprintf(fp, "\033*c%dF", 5);
- *** ../1.1.1/djet/lj.h Mon Oct 3 19:07:09 1988
- --- djet/lj.h Tue Oct 4 18:00:52 1988
- ***************
- *** 27,32
- {
- ushort font_desc_size;
- # define FONT_DESC_SIZE 64
- uchar r1;
- uchar font_type;
- # define FONT_TYPE_7BIT 0
-
- --- 27,33 -----
- {
- ushort font_desc_size;
- # define FONT_DESC_SIZE 64
- + # define OLD_FONT_DESC_SIZE 26
- uchar r1;
- uchar font_type;
- # define FONT_TYPE_7BIT 0
- *** ../1.1.1/font/mkfont/Makefile Mon Oct 3 19:06:59 1988
- --- font/mkfont/Makefile Tue Oct 4 18:04:57 1988
- ***************
- *** 39,44
- lint -phbvac dev.h font.h ${RDSRC} > lint.rdfont
-
- install: all
- cp mkfont $(FONTDIR)
-
- clobber: clean
-
- --- 39,45 -----
- lint -phbvac dev.h font.h ${RDSRC} > lint.rdfont
-
- install: all
- + if [ ! -d $(FONTDIR) ]; then mkdir $(FONTDIR); fi
- cp mkfont $(FONTDIR)
-
- clobber: clean
- --
- Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor|uunet!pcrat!dry2
- PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:|for Dhrystone 2
- uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/. |submission forms.
- jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp
-
-
-