home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-12 | 72.2 KB | 2,624 lines |
- diff -c ./term/eepic.trm ../patch/term/eepic.trm
- *** ./term/eepic.trm Tue Mar 27 09:03:33 1990
- --- ../patch/term/eepic.trm Wed Sep 12 09:38:06 1990
- ***************
- *** 44,51
- #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/DOTS_PER_INCH) /* dot size in pt */
-
- /* 5 inches wide by 3 inches high (default) */
- ! #define EEPIC_XMAX (unsigned int)(EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0)
- ! #define EEPIC_YMAX (unsigned int)(EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0)
-
- #define EEPIC_HTIC (5./EEPIC_UNIT)
- #define EEPIC_VTIC (5./EEPIC_UNIT)
-
- --- 44,51 -----
- #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/DOTS_PER_INCH) /* dot size in pt */
-
- /* 5 inches wide by 3 inches high (default) */
- ! #define EEPIC_XMAX (5*DOTS_PER_INCH) /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0) */
- ! #define EEPIC_YMAX (3*DOTS_PER_INCH) /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0) */
-
- #define EEPIC_HTIC (5*DOTS_PER_INCH/72) /* (5./EEPIC_UNIT) */
- #define EEPIC_VTIC (5*DOTS_PER_INCH/72) /* (5./EEPIC_UNIT) */
- ***************
- *** 47,56
- #define EEPIC_XMAX (unsigned int)(EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0)
- #define EEPIC_YMAX (unsigned int)(EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0)
-
- ! #define EEPIC_HTIC (5./EEPIC_UNIT)
- ! #define EEPIC_VTIC (5./EEPIC_UNIT)
- ! #define EEPIC_HCHAR (5.3/EEPIC_UNIT)
- ! #define EEPIC_VCHAR (11./EEPIC_UNIT)
-
- static unsigned int EEPIC_posx;
- static unsigned int EEPIC_posy;
-
- --- 47,56 -----
- #define EEPIC_XMAX (5*DOTS_PER_INCH) /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0) */
- #define EEPIC_YMAX (3*DOTS_PER_INCH) /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0) */
-
- ! #define EEPIC_HTIC (5*DOTS_PER_INCH/72) /* (5./EEPIC_UNIT) */
- ! #define EEPIC_VTIC (5*DOTS_PER_INCH/72) /* (5./EEPIC_UNIT) */
- ! #define EEPIC_HCHAR (DOTS_PER_INCH*53/10/72) /* (5.3/EEPIC_UNIT) */
- ! #define EEPIC_VCHAR (DOTS_PER_INCH*11/72) /* (11./EEPIC_UNIT) */
-
- static unsigned int EEPIC_posx;
- static unsigned int EEPIC_posy;
- ***************
- *** 92,97
- static int EEPIC_type; /* current line type */
- static BOOLEAN EEPIC_inline = FALSE; /* are we in the middle of a line */
- static void EEPIC_endline(); /* terminate any line in progress */
-
- /* ARROWS */
- /* we use the same code as for LATEX */
-
- --- 92,99 -----
- static int EEPIC_type; /* current line type */
- static BOOLEAN EEPIC_inline = FALSE; /* are we in the middle of a line */
- static void EEPIC_endline(); /* terminate any line in progress */
- + static int EEPIC_linecount = 0; /* number of points in line so far */
- + #define EEPIC_LINEMAX 50 /* max value for linecount */
-
- /* ARROWS */
- /* we use the same code as for LATEX */
- ***************
- *** 181,186
- fprintf(outfile, "%s(%u,%u)",
- EEPIC_lines[EEPIC_type+2],
- EEPIC_posx, EEPIC_posy);
- }
-
- /* add new point to line */
-
- --- 183,201 -----
- fprintf(outfile, "%s(%u,%u)",
- EEPIC_lines[EEPIC_type+2],
- EEPIC_posx, EEPIC_posy);
- + EEPIC_linecount = 1;
- + } else {
- + /* Even though we are in middle of a path,
- + * we may want to start a new path command.
- + * If they are too long then latex will choke.
- + */
- + if (EEPIC_linecount++ >= EEPIC_LINEMAX) {
- + fprintf(outfile, "\n");
- + fprintf(outfile, "%s(%u,%u)",
- + EEPIC_lines[EEPIC_type+2],
- + EEPIC_posx, EEPIC_posy);
- + EEPIC_linecount = 1;
- + }
- }
- fprintf(outfile, "(%u,%u)", ux,uy);
- EEPIC_posx = ux;
- ***************
- *** 182,189
- EEPIC_lines[EEPIC_type+2],
- EEPIC_posx, EEPIC_posy);
- }
- -
- - /* add new point to line */
- fprintf(outfile, "(%u,%u)", ux,uy);
- EEPIC_posx = ux;
- EEPIC_posy = uy;
-
- --- 197,202 -----
- EEPIC_linecount = 1;
- }
- }
- fprintf(outfile, "(%u,%u)", ux,uy);
- EEPIC_posx = ux;
- EEPIC_posy = uy;
- diff -c ./term/eps60.trm ../patch/term/eps60.trm
- *** ./term/eps60.trm Mon Sep 3 16:07:23 1990
- --- ../patch/term/eps60.trm Mon Sep 3 15:54:14 1990
- ***************
- *** 0
-
- --- 1,106 -----
- + #ifdef EPS60
- +
- + /* make the total dimensions 8 inches by 5 inches */
- + #define EPS60XMAX 480
- + #define EPS60YMAX 360
- +
- + #define EPS60XLAST (EPS60XMAX - 1)
- + #define EPS60YLAST (EPS60YMAX - 1)
- +
- + EPS60init()
- + {
- + char filename[MAX_ID_LEN+1];
- + bm_xmax=EPS60XMAX;
- + bm_ymax=EPS60YMAX;
- + bm_planes=1; /* one plane */
- + bm_value=1;
- + bm_setup();
- + /* output for EPSON must be binary to stop non Unix computers
- + changing \n to \r\n.
- + At present we only do this for PC's.
- + (Ultrix generates a run time error on the "wb" mode).
- + if the output is not STDOUT, then the following code
- + reopens outfile with binary mode. */
- + #ifdef PC
- + if (strcmp(outstr,"STDOUT")) {
- + (void) fclose(outfile);
- + (void) strcpy(filename,outstr+1); /* remove quotes */
- + filename[strlen(filename)-1] = '\0';
- + if ( (outfile = fopen(filename,"wb")) == (FILE *)NULL ) {
- + if ( (outfile = fopen(filename,"w")) == (FILE *)NULL ) {
- + os_error("cannot reopen file with binary type; output unknown",
- + NO_CARET);
- + }
- + else {
- + os_error("cannot reopen file with binary type; output reset to ascii",
- + NO_CARET);
- + }
- + }
- + }
- + #endif
- + }
- +
- +
- + /* output file must be binary mode for eps60_dump */
- + eps60_dump()
- + {
- + unsigned int x;
- + int j,k;
- + int num_bits = (sizeof(unsigned int)-1)*8;
- + #ifdef PC
- + fprintf(stderr,"Dumping Epson-style 60-dpi graphics (21kbytes)\n");
- + #endif
- + fprintf(outfile,"\0333\030"); /* set line spacing to 24/216" = 8 dots */
- + for (j=bm_ipc-1;j>=0;j--) {
- + for (k=num_bits;k>=0;k-=8) {
- + /* select printer graphics mode 'K' */
- + fprintf(outfile,"\r\n\033K");
- + (void) fputc((char)(bm_xmax%256),outfile);
- + (void) fputc((char)(bm_xmax/256),outfile);
- + for (x=0; x<bm_xmax; x++) {
- + (void) fputc( (char)((bm_array[x*bm_ipc+j] >>k) &0xff), outfile );
- + }
- + }
- + }
- + fprintf(outfile,"\0333\044\r\n"); /* set line spacing to 36/216" = 1/6" */
- + #ifdef PC
- + fprintf(stderr,"Print using: COPY /B\n");
- + #endif
- + }
- +
- +
- + EPS60text()
- + {
- + eps60_dump();
- + }
- +
- +
- + #endif /* EPS60 */
- +
- +
- +
- +
- + #ifdef TANDY60
- +
- + /* The only difference between TANDY60 and EPS60 is the inclusion
- + of codes to swap the Tandy printer into IBM mode and back
- + into Tandy mode. For a Tandy already in IBM mode, use EPS60. */
- +
- +
- + TANDY60text()
- + {
- + #ifdef PC
- + fprintf(stderr, "Inserting Tandy/IBM mode conversion codes\n");
- + #endif
- + /* Switch to IBM mode, and leave 3 inches above the plot so as
- + to get rough vertical centring on the page. Perform the
- + centring by setting 1" line feeds and issuing 3 of them. */
- + fprintf(outfile, "\033!\0333%c\n\n\n", 216);
- + eps60_dump();
- + /* A form feed must be sent before switching back to Tandy mode,
- + or else the form setting will be messed up. */
- + fprintf(outfile, "\f\033!");
- + }
- +
- +
- + #endif /* TANDY60 */
- diff -c ./term/epson.trm ../patch/term/epson.trm
- *** ./term/epson.trm Tue Mar 27 09:02:27 1990
- --- ../patch/term/epson.trm Wed Aug 29 10:04:57 1990
- ***************
- *** 696,698
-
- #endif /* NEC */
-
-
- --- 696,890 -----
-
- #endif /* NEC */
-
- + /* The following Star color driver uses generic bit mapped graphics
- + routines to build up a bit map in memory. */
- + /* Core from Epson driver by Russell Lang, eln272v@monu1.cc.monash.oz */
- + /* Star Color changes made by William Wilson, wew@naucse.cse.nau.edu */
- + /* On PC, print using 'copy file /b lpt1:', do NOT use 'print' */
- + /* STARC_init changes outfile to binary mode on PC's */
- +
- + #ifdef STARC
- + #ifndef EPSON
- + #define EPSON
- + #endif
- +
- + /* EPSON must be defined */
- +
- + #define STARCXMAX 400
- + #define STARCYMAX 320
- +
- + #define STARCXLAST (STARCXMAX - 1)
- + #define STARCYLAST (STARCYMAX - 1)
- +
- + #define STARCVCHAR 11
- + #define STARCHCHAR 7
- + #define STARCVTIC 6
- + #define STARCHTIC 6
- +
- + /* plane 0=black, 1=cyan(blue), 2=magenta(red), 3=yellow */
- + static unsigned int STARCcolor[] = {1,8,4,2,10,12,6,14};
- + static unsigned int STARCpcolor[]= {0,2,1,4};
- + unsigned int STARC_x=0, STARC_y=0;
- + int STARC_angle=0;
- +
- + STARCinit()
- + {
- + char filename[MAX_ID_LEN+1];
- + bm_planes=4;
- + bm_xmax=STARCXMAX;
- + bm_ymax=STARCYMAX;
- + bm_value=1; /* black */
- + bm_line_mask=0xffff; /* solid lines */
- + bm_setup();
- + /* output for STARC must be binary to stop non Unix computers
- + changing \n to \r\n.
- + At present we only do this for PC's.
- + (Ultrix generates a run time error on the "wb" mode).
- + if the output is not STDOUT, then the following code
- + reopens outfile with binary mode. */
- + #ifdef PC
- + if (strcmp(outstr,"STDOUT")) {
- + (void) fclose(outfile);
- + (void) strcpy(filename,outstr+1); /* remove quotes */
- + filename[strlen(filename)-1] = '\0';
- + if ( (outfile = fopen(filename,"wb")) == (FILE *)NULL) {
- + if ( (outfile = fopen(filename,"w")) == (FILE *)NULL ) {
- + os_error("cannot reopen file with binary type; output unknown",
- + NO_CARET);
- + }
- + else {
- + os_error("cannot reopen file with binary type; output reset to ascii",
- + NO_CARET);
- + }
- + }
- + }
- + #endif
- + }
- +
- +
- + STARCgraphics()
- + {
- + unsigned int plane;
- + unsigned int fill=0;
- + for (plane=0; plane<bm_planes; plane++)
- + bm_cls(plane,fill);
- + STARC_x=0;
- + STARC_y=0;
- + STARC_angle=0;
- + }
- +
- +
- + STARCtext()
- + {
- + STARC_dump();
- + }
- +
- +
- + STARClinetype(linetype)
- + int linetype;
- + {
- + if (linetype>=6)
- + linetype %= 6;
- + bm_value=STARCcolor[linetype+2];
- + }
- +
- +
- + STARCmove(x,y)
- + unsigned int x,y;
- + {
- + STARC_x=x;
- + STARC_y=y;
- + }
- +
- +
- + STARCvector(x,y)
- + unsigned int x,y;
- + {
- + bm_line(STARC_x,x,STARC_y,y);
- + STARC_x=x;
- + STARC_y=y;
- + }
- +
- +
- + STARCput_text(x,y,str)
- + unsigned int x, y;
- + char *str;
- + {
- + if (STARC_angle == 1)
- + x += STARCVCHAR/2;
- + else
- + y -= STARCVCHAR/2;
- + switch (STARC_angle) {
- + case 0:
- + for (; *str; ++str, x += STARCHCHAR)
- + bm_putc (x, y, *str, STARC_angle);
- + break;
- + case 1:
- + for (; *str; ++str, y += STARCHCHAR)
- + bm_putc (x, y, *str, STARC_angle);
- + break;
- + }
- + }
- +
- +
- + int STARC_text_angle(ang)
- + int ang;
- + {
- + STARC_angle=ang;
- + return TRUE;
- + }
- +
- +
- + STARCreset()
- + {
- + bm_release();
- + }
- +
- +
- + /* output file must be binary mode for STARC_dump */
- + STARC_dump()
- + {
- + unsigned int x;
- + unsigned int plane,offset;
- + int j,k;
- + int num_bits = (sizeof(unsigned int)-1)*8;
- + unsigned int column8;
- + unsigned long column24;
- + char column3, column2, column1;
- + #ifdef PC
- + /* if (bm_planes==4)*/
- + fprintf(stderr,"Dumping STAR color graphics (65 kbytes)\n");
- + #endif
- + fprintf(outfile,"\033A\010"); /* set line spacing to 8/72" = 8 dots */
- + for (j=bm_ipc-1;j>=0;j--) {
- + for (k=num_bits;k>=0;k-=8) {
- + fprintf(outfile,"\n");
- + for (plane=0; plane<bm_planes; plane++) {
- + offset=plane*bm_psize;
- + if (bm_planes>1) {
- + /* select colour for plane */
- + fprintf(outfile,"\033r");
- + (void) fputc((char)STARCpcolor[plane],outfile);
- + fprintf(outfile,"\r");
- + }
- + /* select plotter graphics mode (square pixels) */
- + fprintf(outfile,"\r\033*\005");
- + (void) fputc((char)(bm_xmax%256),outfile);
- + (void) fputc((char)(bm_xmax/256),outfile);
- + for (x=0; x<bm_xmax; x++) {
- + (void) fputc( (char)((bm_array[offset+x*bm_ipc+j] >>k) &0xff), outfile);
- + }
- + }
- + }
- + }
- + if (bm_planes > 1) {
- + fprintf(outfile,"\033r");
- + (void) fputc('\0',outfile); /* set color to black */
- + }
- + fprintf(outfile,"\033A\014\r\n"); /* setline spacing to 12/72" */
- + #ifdef PC
- + fprintf(stderr,"Print using: COPY /B\n");
- + #endif
- + }
- +
- + #endif /* STARC */
- diff -c ./term/hpgl.trm ../patch/term/hpgl.trm
- *** ./term/hpgl.trm Tue Mar 27 09:02:36 1990
- --- ../patch/term/hpgl.trm Wed Sep 12 09:10:47 1990
- ***************
- *** 33,40
- #define HPGL_YLAST (HPGL_XMAX - 1)
-
- /* HPGL_VCHAR, HPGL_HCHAR are not used */
- ! #define HPGL_VCHAR (int)(HPGL_YMAX*0.032+0.5) /* 3.2% */
- ! #define HPGL_HCHAR (int)(HPGL_XMAX*0.012+0.5) /* 1.2% */
- #define HPGL_VTIC (HPGL_YMAX/70)
- #define HPGL_HTIC (HPGL_YMAX/70)
-
-
- --- 33,40 -----
- #define HPGL_YLAST (HPGL_XMAX - 1)
-
- /* HPGL_VCHAR, HPGL_HCHAR are not used */
- ! #define HPGL_VCHAR (HPGL_YMAX/100*32/10) /* 3.2% */
- ! #define HPGL_HCHAR (HPGL_XMAX/100*12/10) /* 1.2% */
- #define HPGL_VTIC (HPGL_YMAX/70)
- #define HPGL_HTIC (HPGL_YMAX/70)
-
- diff -c ./term/hpljet.trm ../patch/term/hpljet.trm
- *** ./term/hpljet.trm Tue Mar 27 09:02:43 1990
- --- ../patch/term/hpljet.trm Tue Aug 28 21:00:50 1990
- ***************
- *** 397,404
- {
- }
-
- ! /* put_text was added by Russell Lang, eln272v@monu1.cc.monash.oz
- ! * IT IS UNTESTED
- */
- /* Put text "str" at pixel position x,y
- **/
-
- --- 397,404 -----
- {
- }
-
- ! /* put_text was added by Russell Lang, rjl@monu1.cc.monash.edu.au
- ! * Tested and repaired by Steve Wampler sbw@naucse.cse.nau.edu
- */
- /* Put text "str" at pixel position x,y
- **/
- ***************
- *** 407,413
- char str[];
- {
- fprintf(outfile, "\033&a%dH\033&a%dV",
- ! HPLJET_PX2DP(x), HPLJET_PX2DP(y) );
- fputs(str, outfile);
- }
-
-
- --- 407,415 -----
- char str[];
- {
- fprintf(outfile, "\033&a%dH\033&a%dV",
- ! HPLJET_LMARG+HPLJET_PX2DP(x),
- ! HPLJET_PX2DP(HPLJETYMAX) + HPLJET_VC2DP(2) + 30 -
- ! HPLJET_PX2DP(y) );
- fputs(str, outfile);
- }
-
- ***************
- *** 411,446
- fputs(str, outfile);
- }
-
- -
- - /*
- - ** Put text "str" to the lower right corner of the screen.
- - ** "row" is the row number [0:1].
- - ** Actually in the laserjet, put the text above the upper right corner.
- - */
- - HPLJETlrput_text(row,str)
- - unsigned int row;
- - char str[];
- - {
- -
- - fprintf(outfile, "\033&a%dH\033&a%dV",
- - HPLJET_RMARG - HPLJET_HC2DP(strlen(str)), HPLJET_VC2DP(row));
- - fputs(str, outfile);
- - }
- -
- - /*
- - ** Put text "str" to the upper left corner of the screen.
- - ** "row" is the (serial) number of function to be plotted.
- - ** Actually in the laserjet, put the text under the lower left corner.
- - */
- - HPLJETulput_text(row,str)
- - unsigned int row;
- - char str[];
- - {
- - fprintf(outfile, "\033&a%dH\033&a%dV",
- - HPLJET_LMARG,
- - HPLJET_VC2DP(row+3)+HPLJET_PX2DP(HPLJETYMAX));
- - fputs(str, outfile);
- - }
-
- /*
- ** RETURN to normal mode (exit gnuplot)
-
- --- 413,418 -----
- fputs(str, outfile);
- }
-
-
- /*
- ** RETURN to normal mode (exit gnuplot)
- diff -c ./term/imagen.trm ../patch/term/imagen.trm
- *** ./term/imagen.trm Tue Mar 27 09:03:23 1990
- --- ../patch/term/imagen.trm Wed Sep 12 09:39:37 1990
- ***************
- *** 39,46
-
- #define IMAGEN_PTS_PER_INCH (300)
-
- ! #define IMAGEN_XMAX (10.0 * IMAGEN_PTS_PER_INCH) /* 10.0 inches */
- ! #define IMAGEN_YMAX (7.5 * IMAGEN_PTS_PER_INCH) /* 7.5 inches */
-
- #define IMAGEN_FONTSIZE 12
-
-
- --- 39,46 -----
-
- #define IMAGEN_PTS_PER_INCH (300)
-
- ! #define IMAGEN_XMAX (IMAGEN_PTS_PER_INCH * 10) /* 10.0 inches */
- ! #define IMAGEN_YMAX (IMAGEN_PTS_PER_INCH * 75 / 10) /* 7.5 inches */
-
- #define IMAGEN_FONTSIZE 12
-
- diff -c ./term/latex.trm ../patch/term/latex.trm
- *** ./term/latex.trm Tue Mar 27 09:03:31 1990
- --- ../patch/term/latex.trm Wed Sep 12 09:27:09 1990
- ***************
- *** 17,23
- * This file is included by ../term.c.
- *
- * This terminal driver supports:
- ! * LaTeX pictures
- *
- * AUTHORS
- * David Kotz, Russell Lang
-
- --- 17,24 -----
- * This file is included by ../term.c.
- *
- * This terminal driver supports:
- ! * LaTeX pictures (latex).
- ! * LaTeX pictures with emTeX specials (emtex).
- *
- * AUTHORS
- * David Kotz, Russell Lang
- ***************
- *** 39,46
- #define LATEX_UNIT (LATEX_PTS_PER_INCH/DOTS_PER_INCH) /* dot size in pt */
-
- /* 5 inches wide by 3 inches high (default) */
- ! #define LATEX_XMAX (unsigned int)(LATEX_PTS_PER_INCH/LATEX_UNIT*5.0)
- ! #define LATEX_YMAX (unsigned int)(LATEX_PTS_PER_INCH/LATEX_UNIT*3.0)
-
- #define LATEX_HTIC (5./LATEX_UNIT)
- #define LATEX_VTIC (5./LATEX_UNIT)
-
- --- 40,47 -----
- #define LATEX_UNIT (LATEX_PTS_PER_INCH/DOTS_PER_INCH) /* dot size in pt */
-
- /* 5 inches wide by 3 inches high (default) */
- ! #define LATEX_XMAX (5*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*5.0) */
- ! #define LATEX_YMAX (3*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*3.0) */
-
- #define LATEX_HTIC (5*DOTS_PER_INCH/72) /* (5./LATEX_UNIT) */
- #define LATEX_VTIC (5*DOTS_PER_INCH/72) /* (5./LATEX_UNIT) */
- ***************
- *** 42,51
- #define LATEX_XMAX (unsigned int)(LATEX_PTS_PER_INCH/LATEX_UNIT*5.0)
- #define LATEX_YMAX (unsigned int)(LATEX_PTS_PER_INCH/LATEX_UNIT*3.0)
-
- ! #define LATEX_HTIC (5./LATEX_UNIT)
- ! #define LATEX_VTIC (5./LATEX_UNIT)
- ! #define LATEX_HCHAR (5.3/LATEX_UNIT)
- ! #define LATEX_VCHAR (11./LATEX_UNIT)
-
- static int LATEX_posx;
- static int LATEX_posy;
-
- --- 43,52 -----
- #define LATEX_XMAX (5*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*5.0) */
- #define LATEX_YMAX (3*DOTS_PER_INCH) /* (LATEX_PTS_PER_INCH/LATEX_UNIT*3.0) */
-
- ! #define LATEX_HTIC (5*DOTS_PER_INCH/72) /* (5./LATEX_UNIT) */
- ! #define LATEX_VTIC (5*DOTS_PER_INCH/72) /* (5./LATEX_UNIT) */
- ! #define LATEX_HCHAR (DOTS_PER_INCH*53/10/72) /* (5.3/LATEX_UNIT) */
- ! #define LATEX_VCHAR (DOTS_PER_INCH*11/72) /* (11./LATEX_UNIT) */
-
- static int LATEX_posx;
- static int LATEX_posy;
- ***************
- *** 60,66
- /* POINTS */
- #define LATEX_POINT_TYPES 12 /* we supply more point types */
- static char *LATEX_points[] = {
- ! "\\makebox(0,0){$\\Diamond$}",
- "\\makebox(0,0){$+$}",
- "\\makebox(0,0){$\\Box$}",
- "\\makebox(0,0){$\\times$}",
-
- --- 61,67 -----
- /* POINTS */
- #define LATEX_POINT_TYPES 12 /* we supply more point types */
- static char *LATEX_points[] = {
- ! "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Diamond$}}",
- "\\makebox(0,0){$+$}",
- "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Box$}}",
- "\\makebox(0,0){$\\times$}",
- ***************
- *** 62,68
- static char *LATEX_points[] = {
- "\\makebox(0,0){$\\Diamond$}",
- "\\makebox(0,0){$+$}",
- ! "\\makebox(0,0){$\\Box$}",
- "\\makebox(0,0){$\\times$}",
- "\\makebox(0,0){$\\triangle$}",
- "\\makebox(0,0){$\\star$}",
-
- --- 63,69 -----
- static char *LATEX_points[] = {
- "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Diamond$}}",
- "\\makebox(0,0){$+$}",
- ! "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Box$}}",
- "\\makebox(0,0){$\\times$}",
- "\\makebox(0,0){$\\triangle$}",
- "\\makebox(0,0){$\\star$}",
- ***************
- *** 78,89
- float size; /* size of dot, or thick of line in points */
- float dotspace; /* inter-dot space in points; 0 for lines */
- } LATEX_lines[] = {
- ! {.4, 0}, /* thin solid line */
- ! {1.0, 0}, /* thick solid line */
- ! {2.0, 0}, /* Thick solid line */
- ! {.4, 5}, /* dotted line */
- ! {.4, 10}, /* widely dotted line */
- ! {.4, 15} /* really widely dotted line */
- };
- /* for drawing dotted and solid lines */
- static void LATEX_dot_line();
-
- --- 79,90 -----
- float size; /* size of dot, or thick of line in points */
- float dotspace; /* inter-dot space in points; 0 for lines */
- } LATEX_lines[] = {
- ! {.4, 0.0}, /* thin solid line */
- ! {1.0, 0.0}, /* thick solid line */
- ! {2.0, 0.0}, /* Thick solid line */
- ! {.4, 5.0}, /* dotted line */
- ! {.4, 10.0}, /* widely dotted line */
- ! {.4, 15.0} /* really widely dotted line */
- };
- /* for drawing dotted and solid lines */
- static void LATEX_dot_line();
- ***************
- *** 93,98
- static BOOLEAN LATEX_moved = TRUE; /* pen is up after move */
- static float LATEX_dotsize; /* size of LATEX_DOT in units */
-
- /* ARROWS */
- /* the set of non-vertical/non-horizontal LaTeX vector slopes */
- /* except negatives - they are handled specially */
-
- --- 94,104 -----
- static BOOLEAN LATEX_moved = TRUE; /* pen is up after move */
- static float LATEX_dotsize; /* size of LATEX_DOT in units */
-
- + #ifdef EMTEX
- + BOOLEAN emtex=FALSE; /* not currently using emtex */
- + static void EMTEX_solid_line();
- + #endif
- +
- /* ARROWS */
- /* the set of non-vertical/non-horizontal LaTeX vector slopes */
- /* except negatives - they are handled specially */
- ***************
- *** 109,114
-
- LATEX_init()
- {
- LATEX_posx = LATEX_posy = 0;
- LATEX_linetype(-1);
- fprintf(outfile, "%% GNUPLOT: LaTeX picture\n");
-
- --- 115,123 -----
-
- LATEX_init()
- {
- + #ifdef EMTEX
- + emtex = FALSE;
- + #endif
- LATEX_posx = LATEX_posy = 0;
- LATEX_linetype(-1);
- fprintf(outfile, "%% GNUPLOT: LaTeX picture\n");
- ***************
- *** 152,157
- if (linetype >= LATEX_LINE_TYPES)
- linetype %= LATEX_LINE_TYPES;
-
- LATEX_flushrule();
-
- if (linetype >= 0 &&
-
- --- 161,169 -----
- if (linetype >= LATEX_LINE_TYPES)
- linetype %= LATEX_LINE_TYPES;
-
- + #ifdef EMTEX
- + if (!emtex)
- + #endif
- LATEX_flushrule();
-
- if (linetype >= 0 &&
- ***************
- *** 155,167
- LATEX_flushrule();
-
- if (linetype >= 0 &&
- ! LATEX_lines[linetype].size != LATEX_lines[LATEX_type].size)
- ! /* redefine \plotpoint */
- ! fprintf(outfile, "\\sbox{\\plotpoint}{\\rule[%.3fpt]{%.3fpt}{%.3fpt}}\n",
- ! -LATEX_lines[linetype].size/2,
- ! LATEX_lines[linetype].size,
- ! LATEX_lines[linetype].size);
- !
- LATEX_type = linetype;
- LATEX_dotsize = LATEX_lines[linetype].size / LATEX_UNIT;
- LATEX_moved = TRUE; /* reset */
-
- --- 167,187 -----
- LATEX_flushrule();
-
- if (linetype >= 0 &&
- ! (LATEX_type < 0 ||
- ! LATEX_lines[linetype].size != LATEX_lines[LATEX_type].size)) {
- ! /* redefine \plotpoint */
- ! fprintf(outfile,
- ! "\\sbox{\\plotpoint}{\\rule[%.3fpt]{%.3fpt}{%.3fpt}}%%\n",
- ! -LATEX_lines[linetype].size/2,
- ! LATEX_lines[linetype].size,
- ! LATEX_lines[linetype].size);
- ! #ifdef EMTEX
- ! if (emtex) /* change line width */
- ! fprintf(outfile, "\\special{em:linewidth %.1fpt}%%\n",
- ! LATEX_lines[linetype].size);
- ! #endif
- ! }
- !
- LATEX_type = linetype;
- LATEX_dotsize
- = ((linetype >= 0) ? LATEX_lines[linetype].size / LATEX_UNIT : 0);
- ***************
- *** 163,169
- LATEX_lines[linetype].size);
-
- LATEX_type = linetype;
- ! LATEX_dotsize = LATEX_lines[linetype].size / LATEX_UNIT;
- LATEX_moved = TRUE; /* reset */
- }
-
-
- --- 183,190 -----
- }
-
- LATEX_type = linetype;
- ! LATEX_dotsize
- ! = ((linetype >= 0) ? LATEX_lines[linetype].size / LATEX_UNIT : 0);
- LATEX_moved = TRUE; /* reset */
- }
-
- ***************
- *** 209,215
- }
- } else { /* drawing real curves */
- if (LATEX_lines[LATEX_type].dotspace == 0.0)
- ! LATEX_solid_line(LATEX_posx, (int)ux, LATEX_posy, (int)uy);
- else
- LATEX_dot_line(LATEX_posx, (int)ux, LATEX_posy, (int)uy);
- }
-
- --- 230,241 -----
- }
- } else { /* drawing real curves */
- if (LATEX_lines[LATEX_type].dotspace == 0.0)
- ! #ifdef EMTEX
- ! if (emtex)
- ! EMTEX_solid_line(LATEX_posx, (int)ux, LATEX_posy, (int)uy);
- ! else
- ! #endif
- ! LATEX_solid_line(LATEX_posx, (int)ux, LATEX_posy, (int)uy);
- else
- LATEX_dot_line(LATEX_posx, (int)ux, LATEX_posy, (int)uy);
- }
- ***************
- *** 301,315
- if (width == 0 || height == 0)
- return; /* ignore this rule */
-
- - if (width < 0) {
- - x += width;
- - width = -width;
- - }
- - if (height < 0) {
- - y += height;
- - height = -height;
- - }
- -
- if (valid && combine) {
- /* try to combine new rule with old rule */
- if ((int)lastx == (int)x && lastw == width) { /* vertical rule */
-
- --- 327,332 -----
- if (width == 0 || height == 0)
- return; /* ignore this rule */
-
- if (valid && combine) {
- /* try to combine new rule with old rule */
- if ((int)lastx == (int)x && lastw == width) { /* vertical rule */
- ***************
- *** 313,320
- if (valid && combine) {
- /* try to combine new rule with old rule */
- if ((int)lastx == (int)x && lastw == width) { /* vertical rule */
- ! lasth += height;
- ! return;
- } else if ((int)lasty == (int)y && lasth == height){ /* horiz rule */
- lastw += width;
- return;
-
- --- 330,339 -----
- if (valid && combine) {
- /* try to combine new rule with old rule */
- if ((int)lastx == (int)x && lastw == width) { /* vertical rule */
- ! if (lasth * height >= 0) { /* same sign */
- ! lasth += height;
- ! return;
- ! }
- } else if ((int)lasty == (int)y && lasth == height){ /* horiz rule */
- if (lastw * width >= 0) { /* same sign */
- lastw += width;
- ***************
- *** 316,323
- lasth += height;
- return;
- } else if ((int)lasty == (int)y && lasth == height){ /* horiz rule */
- ! lastw += width;
- ! return;
- }
- /* oh well, output last and remember the new one */
- }
-
- --- 335,344 -----
- return;
- }
- } else if ((int)lasty == (int)y && lasth == height){ /* horiz rule */
- ! if (lastw * width >= 0) { /* same sign */
- ! lastw += width;
- ! return;
- ! }
- }
- /* oh well, output last and remember the new one */
- }
- ***************
- *** 322,336
- /* oh well, output last and remember the new one */
- }
-
- ! if (valid)
- ! /* if very small use canned dot */
- ! if (lastw < LATEX_dotsize || lasth < LATEX_dotsize)
- ! fprintf(outfile, "\\put(%d,%d){%s}\n",
- ! (int)lastx, (int)lasty, LATEX_DOT);
- ! else
- ! fprintf(outfile, "\\put(%d,%d){\\rule[%.3fpt]{%.3fpt}{%.3fpt}}\n",
- ! (int)lastx, (int)lasty, -LATEX_dotsize*LATEX_UNIT/2,
- ! lastw*LATEX_UNIT, lasth*LATEX_UNIT);
-
- if (flush) {
- valid = FALSE;
-
- --- 343,368 -----
- /* oh well, output last and remember the new one */
- }
-
- ! if (valid) {
- ! /* output the rule */
- ! if (lastw < 0) {
- ! lastx += lastw;
- ! lastw = -lastw;
- ! }
- ! if (lasth < 0) {
- ! lasty += lasth;
- ! lasth = -lasth;
- ! }
- !
- ! /* if very small use canned dot */
- ! if (lastw < LATEX_dotsize || lasth < LATEX_dotsize)
- ! fprintf(outfile, "\\put(%d,%d){%s}\n",
- ! (int)lastx, (int)lasty, LATEX_DOT);
- ! else
- ! fprintf(outfile, "\\put(%d,%d){\\rule[%.3fpt]{%.3fpt}{%.3fpt}}\n",
- ! (int)lastx, (int)lasty, -LATEX_dotsize*LATEX_UNIT/2,
- ! lastw*LATEX_UNIT, lasth*LATEX_UNIT);
- ! }
-
- if (flush) {
- valid = FALSE;
- ***************
- *** 418,424
- int x, y; /* points near sx,sy */
- float m; /* slope of line */
- float arrowslope; /* slope of arrow */
- ! float minerror; /* best-case error */
- struct vslope *slope; /* one of the slopes */
- struct vslope *bestslope; /* the slope with min error */
- BOOLEAN horiz; /* was it the horiz line that was best? */
-
- --- 450,456 -----
- int x, y; /* points near sx,sy */
- float m; /* slope of line */
- float arrowslope; /* slope of arrow */
- ! float minerror = 0; /* best-case error */
- struct vslope *slope; /* one of the slopes */
- struct vslope *bestslope; /* the slope with min error */
- BOOLEAN horiz; /* was it the horiz line that was best? */
- ***************
- *** 440,445
- * we try to find the closest-slope arrowhead.
- */
- bestslope = NULL;
- m = abs((float)dy/dx); /* the slope we want */
- for (slope = LATEX_slopes; slope->dx != 0.0; slope++) {
- /* find the slope of the arrow */
-
- --- 472,478 -----
- * we try to find the closest-slope arrowhead.
- */
- bestslope = NULL;
- + minerror = 0; /* to shut up turbo C */
- m = abs((float)dy/dx); /* the slope we want */
- for (slope = LATEX_slopes; slope->dx != 0.0; slope++) {
- /* find the slope of the arrow */
- ***************
- *** 459,465
- abs(ex-sx));
- else {
- /* we draw the line the usual way, with thin lines */
- ! if (who == 1) {
- LATEX_linetype(LATEX_THIN_LINE);
- LATEX_solid_line(sx,ex,sy,ey);
- }
-
- --- 492,499 -----
- abs(ex-sx));
- else {
- /* we draw the line the usual way, with thin lines */
- ! #ifdef EMTEX
- ! if (emtex) {
- LATEX_linetype(LATEX_THIN_LINE);
- EMTEX_solid_line(sx,ex,sy,ey);
- } else
- ***************
- *** 461,468
- /* we draw the line the usual way, with thin lines */
- if (who == 1) {
- LATEX_linetype(LATEX_THIN_LINE);
- ! LATEX_solid_line(sx,ex,sy,ey);
- ! }
- #ifdef EEPIC
- else {
- EEPIC_move(sx,sy);
-
- --- 495,507 -----
- #ifdef EMTEX
- if (emtex) {
- LATEX_linetype(LATEX_THIN_LINE);
- ! EMTEX_solid_line(sx,ex,sy,ey);
- ! } else
- ! #endif
- ! if (who == 1) {
- ! LATEX_linetype(LATEX_THIN_LINE);
- ! LATEX_solid_line(sx,ex,sy,ey);
- ! }
- #ifdef EEPIC
- else {
- EEPIC_move(sx,sy);
- ***************
- *** 464,473
- LATEX_solid_line(sx,ex,sy,ey);
- }
- #ifdef EEPIC
- ! else {
- ! EEPIC_move(sx,sy);
- ! EEPIC_vector(ex,ey);
- ! }
- #endif /* EEPIC */
- /* and then draw an arrowhead (a short vector) there */
- fprintf(outfile, "\\put(%d,%d){\\vector(%d,%d){0}}\n",
-
- --- 503,512 -----
- LATEX_solid_line(sx,ex,sy,ey);
- }
- #ifdef EEPIC
- ! else {
- ! EEPIC_move(sx,sy);
- ! EEPIC_vector(ex,ey);
- ! }
- #endif /* EEPIC */
- /* and then draw an arrowhead (a short vector) there */
- fprintf(outfile, "\\put(%d,%d){\\vector(%d,%d){0}}\n",
- ***************
- *** 555,557
- LATEX_posx = LATEX_posy = 0;
- }
-
-
- --- 594,638 -----
- LATEX_posx = LATEX_posy = 0;
- }
-
- +
- + #ifdef EMTEX
- +
- + EMTEX_init()
- + {
- + emtex=TRUE;
- + LATEX_posx = LATEX_posy = 0;
- + fprintf(outfile, "%% GNUPLOT: LaTeX picture with emtex specials\n");
- + fprintf(outfile, "\\setlength{\\unitlength}{%fpt}\n", LATEX_UNIT);
- + LATEX_linetype(-1);
- + }
- +
- +
- + EMTEX_reset()
- + {
- + emtex=FALSE;
- + LATEX_posx = LATEX_posy = 0;
- + }
- +
- +
- + EMTEX_text()
- + {
- + fprintf(outfile, "\\end{picture}\n");
- + }
- +
- +
- + static void
- + EMTEX_solid_line(x1,x2, y1,y2)
- + int x1,x2, y1,y2;
- + {
- + /* emtex special solid line */
- + if (LATEX_moved)
- + fprintf(outfile, "\\put(%d,%d){\\special{em:moveto}}\n", x1, y1);
- + if ( (x1!=x2) || (y1!=y2) )
- + fprintf(outfile, "\\put(%d,%d){\\special{em:lineto}}\n", x2, y2);
- + LATEX_posx = x2;
- + LATEX_posy = y2;
- + LATEX_moved = FALSE;
- + }
- +
- +
- + #endif /* EMTEX */
- diff -c ./term/pc.trm ../patch/term/pc.trm
- *** ./term/pc.trm Tue Mar 27 09:03:04 1990
- --- ../patch/term/pc.trm Tue Aug 28 20:52:11 1990
- ***************
- *** 20,26
- * Under Microsoft C
- * cga, egabios, egalib, vgabios, hercules, corona325, att
- * Under Turboc C
- ! * egalib, vgalib, vgamono, mcga, cga, hercules
- *
- * AUTHORS
- * Colin Kelley, Thomas Williams, William Wilson, Russell Lang
-
- --- 20,26 -----
- * Under Microsoft C
- * cga, egabios, egalib, vgabios, hercules, corona325, att
- * Under Turboc C
- ! * egalib, vgalib, vgamono, mcga, cga, hercules, att
- *
- * AUTHORS
- * Colin Kelley, Thomas Williams, William Wilson, Russell Lang
- ***************
- *** 110,116
- pixelon = (((unsigned int)(font5x7[i][j])) >> k & 1);
- if (pixelon) {
- switch(angle) {
- ! case 0 : line_func(x+k+1,y-j,x+k+1,y-j);
- break;
- case 1 : line_func(x-j,y-k-1,x-j,y-k-1);
- break;
-
- --- 110,116 -----
- pixelon = (((unsigned int)(font5x7[i][j])) >> k & 1);
- if (pixelon) {
- switch(angle) {
- ! case 0 : (*line_func)(x+k+1,y-j,x+k+1,y-j);
- break;
- case 1 : (*line_func)(x-j,y-k-1,x-j,y-k-1);
- break;
- ***************
- *** 112,118
- switch(angle) {
- case 0 : line_func(x+k+1,y-j,x+k+1,y-j);
- break;
- ! case 1 : line_func(x-j,y-k-1,x-j,y-k-1);
- break;
- }
- }
-
- --- 112,118 -----
- switch(angle) {
- case 0 : (*line_func)(x+k+1,y-j,x+k+1,y-j);
- break;
- ! case 1 : (*line_func)(x-j,y-k-1,x-j,y-k-1);
- break;
- }
- }
- ***************
- *** 1197,1202
- outtextxy(x,HERC_YLAST-y,buf);
- }
-
-
- #endif /* ifndef __TURBOC__ */
-
-
- --- 1197,1301 -----
- outtextxy(x,HERC_YLAST-y,buf);
- }
-
- +
- + #ifdef ATT6300
- + /* this driver added by rjl@monu1.cc.monash.edu.au */
- +
- + #define ATT_XMAX 640
- + #define ATT_YMAX 400
- +
- + #define ATT_XLAST (ATT_XMAX - 1)
- + #define ATT_YLAST (ATT_YMAX - 1)
- +
- + #define ATT_VCHAR PC_VCHAR
- + #define ATT_HCHAR PC_HCHAR
- + #define ATT_VTIC 4
- + #define ATT_HTIC 5
- +
- + #define ATT_text_angle PC_text_angle
- + #define ATT_justify_text PC_justify_text
- + #define ATT_reset PC_reset
- +
- + ATT_init()
- + {
- + g_driver=ATT400;
- + g_mode=5;
- + initgraph(&g_driver,&g_mode,path);
- + switch (g_driver){
- + case -2: fprintf(stderr,"Graphics card not detected.\n");
- + break;
- + case -3: fprintf(stderr,"BGI driver file cannot be found.\n");
- + break;
- + case -4: fprintf(stderr,"Invalid BGI driver file.\n");
- + break;
- + case -5: fprintf(stderr,"Insufficient memory to load ",
- + "graphics driver.");
- + break;
- + }
- + }
- +
- + ATT_graphics()
- + {
- + g_driver=ATT400;
- + g_mode=5;
- + initgraph(&g_driver,&g_mode,path);
- + ATT_justify_text(LEFT);
- + graphics_on = TRUE;
- + }
- +
- + ATT_text()
- + {
- + if (graphics_on) {
- + graphics_on = FALSE;
- + pause();
- + }
- + closegraph();
- + }
- +
- + ATT_linetype(linetype)
- + {
- + if (linetype >= 5)
- + linetype %= 5;
- + setlinestyle(4,pattern[linetype+2],1);
- + }
- +
- + ATT_move(x,y)
- + {
- + if (x < 0)
- + x = 0;
- + else if (x > ATT_XLAST)
- + x = ATT_XLAST;
- +
- + if (y < 0)
- + y = 0;
- + else if (y > ATT_YLAST)
- + y = ATT_YLAST;
- + moveto(x,getmaxy()-y);
- + }
- +
- + ATT_vector(x,y)
- + {
- + if (x < 0)
- + x = 0;
- + else if (x > ATT_XLAST)
- + x = ATT_XLAST;
- + if (y < 0)
- + y = 0;
- + else if (y > ATT_YLAST)
- + y = ATT_YLAST;
- +
- + lineto(x,getmaxy()-y);
- + }
- +
- +
- + ATT_put_text(x,y,str)
- + unsigned int x, y;
- + char *str;
- + {
- + strcpy((char far *)buf,str);
- + outtextxy(x,ATT_YLAST-y,buf);
- + }
- + #endif /* ifdef ATT6300 */
-
- #endif /* ifndef __TURBOC__ */
-
- diff -c ./term/post.trm ../patch/term/post.trm
- *** ./term/post.trm Tue Mar 27 09:02:51 1990
- --- ../patch/term/post.trm Tue Sep 18 14:40:31 1990
- ***************
- *** 40,46
- "/vpt2 vpt 2 mul def\n",
- "/hpt2 hpt 2 mul def\n",
- /* flush left show */
- ! "/Lshow { 0 vshift rmoveto show } def\n",
- /* flush right show */
- "/Rshow { dup stringwidth pop neg vshift rmoveto show } def\n",
- /* centred show */
-
- --- 40,47 -----
- "/vpt2 vpt 2 mul def\n",
- "/hpt2 hpt 2 mul def\n",
- /* flush left show */
- ! "/Lshow { currentpoint stroke moveto\n",
- ! " 0 vshift rmoveto show } def\n",
- /* flush right show */
- "/Rshow { currentpoint stroke moveto\n",
- " dup stringwidth pop neg vshift rmoveto show } def\n",
- ***************
- *** 42,48
- /* flush left show */
- "/Lshow { 0 vshift rmoveto show } def\n",
- /* flush right show */
- ! "/Rshow { dup stringwidth pop neg vshift rmoveto show } def\n",
- /* centred show */
- "/Cshow { dup stringwidth pop -2 div vshift rmoveto show } def\n",
- /* Border Lines */
-
- --- 43,50 -----
- "/Lshow { currentpoint stroke moveto\n",
- " 0 vshift rmoveto show } def\n",
- /* flush right show */
- ! "/Rshow { currentpoint stroke moveto\n",
- ! " dup stringwidth pop neg vshift rmoveto show } def\n",
- /* centred show */
- "/Cshow { currentpoint stroke moveto\n",
- " dup stringwidth pop -2 div vshift rmoveto show } def\n",
- ***************
- *** 44,50
- /* flush right show */
- "/Rshow { dup stringwidth pop neg vshift rmoveto show } def\n",
- /* centred show */
- ! "/Cshow { dup stringwidth pop -2 div vshift rmoveto show } def\n",
- /* Border Lines */
- "/BL { stroke gnulinewidth 2 mul setlinewidth} def\n",
- /* Axes Lines */
-
- --- 46,53 -----
- "/Rshow { currentpoint stroke moveto\n",
- " dup stringwidth pop neg vshift rmoveto show } def\n",
- /* centred show */
- ! "/Cshow { currentpoint stroke moveto\n",
- ! " dup stringwidth pop -2 div vshift rmoveto show } def\n",
- /* Border Lines */
- "/BL { stroke gnulinewidth 2 mul setlinewidth } def\n",
- /* Axes Lines */
- ***************
- *** 46,52
- /* centred show */
- "/Cshow { dup stringwidth pop -2 div vshift rmoveto show } def\n",
- /* Border Lines */
- ! "/BL { stroke gnulinewidth 2 mul setlinewidth} def\n",
- /* Axes Lines */
- "/AL { stroke gnulinewidth 2 div setlinewidth } def\n",
- /* Plot Lines */
-
- --- 49,55 -----
- "/Cshow { currentpoint stroke moveto\n",
- " dup stringwidth pop -2 div vshift rmoveto show } def\n",
- /* Border Lines */
- ! "/BL { stroke gnulinewidth 2 mul setlinewidth } def\n",
- /* Axes Lines */
- "/AL { stroke gnulinewidth 2 div setlinewidth } def\n",
- /* Plot Lines */
- ***************
- *** 102,109
- #define PS_HTIC (PS_YMAX/80)
-
-
- ! #define PS_SC (360.0/PS_XMAX) /* scale is 1pt = 10 units */
- ! #define PS_LW (0.25/PS_SC) /* linewidth = 0.25 pts */
-
- #define PS_VCHAR1 (int)(7.0/PS_SC) /* 7 point characters */
- #define PS_HCHAR1 (int)(0.6*7.0/PS_SC)
-
- --- 105,112 -----
- #define PS_HTIC (PS_YMAX/80)
-
-
- ! #define PS_SC (PS_XMAX/360) /* scale is 1pt = 10 units */
- ! #define PS_LW (0.25*PS_SC) /* linewidth = 0.25 pts */
-
- #define PS_VCHAR1 (7*PS_SC) /* 7 point characters */
- #define PS_HCHAR1 (7*PS_SC*6/10)
- ***************
- *** 105,112
- #define PS_SC (360.0/PS_XMAX) /* scale is 1pt = 10 units */
- #define PS_LW (0.25/PS_SC) /* linewidth = 0.25 pts */
-
- ! #define PS_VCHAR1 (int)(7.0/PS_SC) /* 7 point characters */
- ! #define PS_HCHAR1 (int)(0.6*7.0/PS_SC)
-
- #define PS_VCHAR2 (int)(11.0/PS_SC) /* 11 point characters */
- #define PS_HCHAR2 (int)(0.6*11.0/PS_SC)
-
- --- 108,115 -----
- #define PS_SC (PS_XMAX/360) /* scale is 1pt = 10 units */
- #define PS_LW (0.25*PS_SC) /* linewidth = 0.25 pts */
-
- ! #define PS_VCHAR1 (7*PS_SC) /* 7 point characters */
- ! #define PS_HCHAR1 (7*PS_SC*6/10)
-
- #define PS_VCHAR2 (11*PS_SC) /* 11 point characters */
- #define PS_HCHAR2 (11*PS_SC*6/10)
- ***************
- *** 108,115
- #define PS_VCHAR1 (int)(7.0/PS_SC) /* 7 point characters */
- #define PS_HCHAR1 (int)(0.6*7.0/PS_SC)
-
- ! #define PS_VCHAR2 (int)(11.0/PS_SC) /* 11 point characters */
- ! #define PS_HCHAR2 (int)(0.6*11.0/PS_SC)
-
-
- EPSF1_init()
-
- --- 111,118 -----
- #define PS_VCHAR1 (7*PS_SC) /* 7 point characters */
- #define PS_HCHAR1 (7*PS_SC*6/10)
-
- ! #define PS_VCHAR2 (11*PS_SC) /* 11 point characters */
- ! #define PS_HCHAR2 (11*PS_SC*6/10)
-
-
- EPSF1_init()
- ***************
- *** 135,142
- fprintf(outfile,"%%%%DocumentFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%DocumentNeededFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%BoundingBox: 0 0 %d %d\n",
- ! (int)(xsize*(PS_XMAX)*PS_SC+0.5),
- ! (int)(ysize*(PS_YMAX)*PS_SC+0.5) );
- fprintf(outfile,"%%%%EndComments\n");
- fprintf(outfile,"40 dict begin\n");
- fprintf(outfile,"/gnulinewidth %.3f def\n",PS_LW);
-
- --- 138,145 -----
- fprintf(outfile,"%%%%DocumentFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%DocumentNeededFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%BoundingBox: 0 0 %d %d\n",
- ! (int)(xsize*(PS_XMAX)/PS_SC+0.5),
- ! (int)(ysize*(PS_YMAX)/PS_SC+0.5) );
- fprintf(outfile,"%%%%EndComments\n");
- fprintf(outfile,"40 dict begin\n");
- fprintf(outfile,"/gnulinewidth %.3f def\n",PS_LW);
- ***************
- *** 142,148
- fprintf(outfile,"/gnulinewidth %.3f def\n",PS_LW);
- fprintf(outfile,"/vshift %d def\n",
- ps_big ? -PS_VCHAR2/3 : -PS_VCHAR1/3);
- ! fprintf(outfile,"/dl {%.3f mul} def\n",1/PS_SC); /* dash length */
- fprintf(outfile,"/hpt %.1f def\n",PS_HTIC/2.0);
- fprintf(outfile,"/vpt %.1f def\n",PS_VTIC/2.0);
- for ( i=0; PS_header[i] != NULL; i++)
-
- --- 145,151 -----
- fprintf(outfile,"/gnulinewidth %.3f def\n",PS_LW);
- fprintf(outfile,"/vshift %d def\n",
- ps_big ? -PS_VCHAR2/3 : -PS_VCHAR1/3);
- ! fprintf(outfile,"/dl {%d mul} def\n",PS_SC); /* dash length */
- fprintf(outfile,"/hpt %.1f def\n",PS_HTIC/2.0);
- fprintf(outfile,"/vpt %.1f def\n",PS_VTIC/2.0);
- for ( i=0; PS_header[i] != NULL; i++)
- ***************
- *** 150,156
- fprintf(outfile,"%%%%EndProlog\n");
- fprintf(outfile,"%%%%BeginSetup\n");
- fprintf(outfile,"/Gnu_save save def\n");
- ! fprintf(outfile,"%.3f %.3f scale\n",PS_SC,PS_SC);
- fprintf(outfile,"%%%%IncludeFont: %s\n", ps_font);
- fprintf(outfile,"/%s findfont %d ", ps_font,
- ps_big ? PS_VCHAR2 : PS_VCHAR1 );
-
- --- 153,160 -----
- fprintf(outfile,"%%%%EndProlog\n");
- fprintf(outfile,"%%%%BeginSetup\n");
- fprintf(outfile,"/Gnu_save save def\n");
- ! fprintf(outfile,"%.3f %.3f scale\n",1.0/PS_SC,1.0/PS_SC);
- ! fprintf(outfile,"0 setgray\n");
- fprintf(outfile,"%%%%IncludeFont: %s\n", ps_font);
- fprintf(outfile,"/%s findfont %d ", ps_font,
- ps_big ? PS_VCHAR2 : PS_VCHAR1 );
- ***************
- *** 198,205
- fprintf(outfile,"%%%%DocumentNeededFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%Pages: (atend)\n");
- fprintf(outfile,"%%%%BoundingBox: %d 50 550 %d\n",
- ! (int)(550.5-ysize*(PS_YMAX)*PS_SC*2),
- ! (int)(50.5+xsize*(PS_XMAX)*PS_SC*2) );
- fprintf(outfile,"%%%%EndComments\n");
- fprintf(outfile,"/GnuTransform {\n");
- fprintf(outfile," 90 rotate\n 50 -550 translate\n 2 2 scale\n");
-
- --- 202,209 -----
- fprintf(outfile,"%%%%DocumentNeededFonts: %s\n", ps_font);
- fprintf(outfile,"%%%%Pages: (atend)\n");
- fprintf(outfile,"%%%%BoundingBox: %d 50 550 %d\n",
- ! (int)(550.5-ysize*(PS_YMAX)/PS_SC*2),
- ! (int)(50.5+xsize*(PS_XMAX)/PS_SC*2) );
- fprintf(outfile,"%%%%EndComments\n");
- fprintf(outfile,"/GnuTransform {\n");
- fprintf(outfile," 90 rotate\n 50 -550 translate\n 2 2 scale\n");
- ***************
- *** 292,297
- }
- if (ps_ang != 0)
- fprintf(outfile,"grestore\n");
- }
-
- int PS_text_angle(ang)
-
- --- 296,302 -----
- }
- if (ps_ang != 0)
- fprintf(outfile,"grestore\n");
- + ps_path_count = 0;
- }
-
- int PS_text_angle(ang)
- diff -c ./term/t410x.trm ../patch/term/t410x.trm
- *** ./term/t410x.trm Wed Aug 29 12:16:17 1990
- --- ../patch/term/t410x.trm Tue Aug 28 20:28:50 1990
- ***************
- *** 0
-
- --- 1,239 -----
- + /* GNUPLOT - t410x.trm */
- + /*
- + * Copyright (C) 1990
- + *
- + * Permission to use, copy, and distribute this software and its
- + * documentation for any purpose with or without fee is hereby granted,
- + * provided that the above copyright notice appear in all copies and
- + * that both that copyright notice and this permission notice appear
- + * in supporting documentation.
- + *
- + * Permission to modify the software is granted, but not the right to
- + * distribute the modified code. Modifications are to be distributed
- + * as patches to released version.
- + *
- + * This software is provided "as is" without express or implied warranty.
- + *
- + * This file is included by ../term.c.
- + *
- + * This terminal driver supports: Tektronix 410x and 420x series terminals
- + *
- + * AUTHORS
- + * Colin Kelley, Thomas Williams
- + *
- + * send your comments or suggestions to (pixar!info-gnuplot@sun.com).
- + *
- + */
- +
- + /* Tektronix 410X and 420X driver written by Cary D. Renzema.
- + * email address: caryr@vice.ico.tek.com
- + *
- + * I've tested this driver on the following terminals: 4106, 4107A, 4109
- + * and 4207. It should work, without editing, on other terminals in the
- + * 410x and 420x families. It will probably need to be changed to work
- + * on a 4105 (screen size and character rotation are two guesses). This
- + * file can also be used as a start for a 411x driver.
- + *
- + * Cary R.
- + * April 5, 1990
- + */
- +
- + #ifdef T410X
- +
- + #define T410XXMAX 4095
- + #define T410XYMAX 3131
- +
- + #define T410XVCHAR 71
- + #define T410XHCHAR 51
- + #define T410XVTIC 36
- + #define T410XHTIC 36
- +
- + static int T410X_angle=0;
- +
- + T410X_init()
- + {
- + (void) fprintf(outfile, "\033%%!0\033MN0\033MCB7C;\033MQ1\033MT1");
- + (void) fprintf(outfile, "\033MG1\033RK!\033SK!\033LZ\033%%!1");
- + /*
- + 1. set tek mode
- + 2. set character path to 0 (characters placed equal to rotation)
- + 3. set character size to 59 height
- + 4. set character precision to string
- + 5. set character text index to 1
- + 6. set character write mode to overstrike
- + 7. clear the view
- + 8. clear the segments
- + 9. clear the dialog buffer
- + 10. set ansi mode
- + */
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_reset()
- + {
- + (void) fprintf(outfile, "\033%%!0\033LZ\033%%!1");
- + /*
- + 1. set tek mode
- + 2. clear the dialog buffer
- + 3. set ansi mode
- + */
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_graphics()
- + {
- + (void) fprintf(outfile, "\033%%!0\033\014\033LV0");
- + /*
- + 1. set tek mode
- + 2. clear the screen
- + 3. set dialog area invisible
- + */
- + (void) fflush(outfile);
- + }
- +
- + T410X_text()
- + {
- + (void) fprintf(outfile, "\033LV1\033%%!1");
- + /*
- + 1. set dialog area visible
- + 2. set ansi mode
- + */
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_move(x, y)
- + unsigned int x, y;
- + {
- + (void) fprintf(outfile, "\033LF");
- + (void) T410X_encode_x_y(x, y);
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_vector(x, y)
- + unsigned int x, y;
- + {
- + (void) fprintf(outfile, "\033LG");
- + (void) T410X_encode_x_y(x, y);
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_point(x, y, number)
- + unsigned int x, y;
- + int number;
- + {
- + (void) fprintf(outfile, "\033MM");
- + (void) T410X_encode_int(max(number, 0)%11);
- + (void) fprintf(outfile, "\033LH");
- + (void) T410X_encode_x_y(x, y);
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_linetype(linetype)
- + int linetype;
- + {
- + switch (linetype) {
- + case -1:
- + (void) fprintf(outfile, "\033ML5");
- + break;
- + case -2:
- + (void) fprintf(outfile, "\033ML?");
- + break;
- + default:
- + (void) fprintf(outfile, "\033ML");
- + (void) T410X_encode_int(linetype%14+2);
- + break;
- + }
- + (void) fprintf(outfile, "\033MV");
- + (void) T410X_encode_int(max(linetype, 0)%8);
- + (void) fflush(outfile);
- + }
- +
- +
- + T410X_put_text(x, y, str)
- + unsigned int x, y;
- + char str[];
- + {
- + extern int T410X_angle;
- +
- + if (T410X_angle == 0) {
- + (void) T410X_move(x, y-T410XVCHAR/2+6);
- + (void) fprintf(outfile, "\033MR00");
- + } else {
- + (void) T410X_move(x+T410XHCHAR/2-6, y);
- + (void) fprintf(outfile, "\033MRE:0");
- + }
- + (void) fprintf(outfile, "\033LT");
- + (void) T410X_encode_int(strlen(str));
- + (void) fputs(str, outfile);
- + (void) fflush(outfile);
- + }
- +
- + T410X_text_angle(ang)
- + int ang;
- + {
- + extern int T410X_angle;
- +
- + T410X_angle = ang;
- + return(TRUE);
- + }
- +
- + /* These last two routines are based on fortran code found in the
- + * 4106/4107/4109/CX PROGRAMMERS manual.
- + */
- +
- + T410X_encode_x_y(x, y)
- + unsigned int x, y;
- + {
- + static char chix=0, chiy=0, cloy=0, ceb=0;
- +
- + register unsigned int hix, lox, hiy, loy, eb, lx, ly;
- +
- + lx = (x <= T410XXMAX) ? x : T410XXMAX;
- + ly = (y <= T410XYMAX) ? y : T410XYMAX;
- +
- + hix = lx/128 + 32;
- + lox = (lx/4)%32 + 64;
- + hiy = ly/128 + 32;
- + loy = (ly/4)%32 + 96;
- + eb = (ly%4)*4 + lx%4 + 96;
- +
- + if (chiy != hiy) (void) putc(hiy, outfile);
- + if (ceb != eb) (void) putc(eb, outfile);
- + if ((cloy!=loy) || (ceb!=eb) || (chix!=hix)) (void) putc(loy, outfile);
- + if (chix != hix) (void) putc(hix, outfile);
- + (void) putc(lox, outfile);
- +
- + chix = hix;
- + chiy = hiy;
- + cloy = loy;
- + ceb = eb;
- + }
- +
- +
- + T410X_encode_int(number)
- + int number;
- + {
- + register unsigned int mag, hi1, hi2, lo;
- +
- + mag = abs(number);
- +
- + hi1 = mag/1024 + 64;
- + hi2 = (mag/16)%64 + 64;
- + lo = mag%16 + 32;
- +
- + if (number >= 0) lo += 16;
- +
- + if (hi1 != 64) (void) putc(hi1, outfile);
- + if ((hi2 != 64) || (hi1 != 64)) (void) putc(hi2, outfile);
- + (void) putc(lo, outfile);
- +
- + }
- +
- +
- + #endif /* T410X */
- diff -c ./term/unixpc.trm ../patch/term/unixpc.trm
- *** ./term/unixpc.trm Tue Mar 27 09:03:15 1990
- --- ../patch/term/unixpc.trm Tue Aug 28 16:03:19 1990
- ***************
- *** 122,128
- uw.uw_height = uPC_YMAX; /* 288 normal--we clobber 12 (top row)*/
- uw.uw_uflags = 1; /* Creates with no border */
-
- ! IfErrOut (ioctl(0, WIOCSETD, &uw), <0, "ioctl failed on", "WIOCSETD");
- }
-
-
-
- --- 122,128 -----
- uw.uw_height = uPC_YMAX; /* 288 normal--we clobber 12 (top row)*/
- uw.uw_uflags = 1; /* Creates with no border */
-
- ! IfErrOut (ioctl(1, WIOCSETD, &uw), <0, "ioctl failed on", "WIOCSETD");
- }
-
-
- ***************
- *** 144,150
- printf ("\033[25;1H");
-
- uPC_ur.ur_dstop = DSTSRC; /* replace (clear screen). */
- ! IfErrOut (ioctl(0, WIOCRASTOP, &uPC_ur), <0,
- "ioctl failed", "WIOCRASTOP");
- uPC_ur.ur_dstop = DSTOR; /* Or in (show text) */
- }
-
- --- 144,150 -----
- printf ("\033[25;1H");
-
- uPC_ur.ur_dstop = DSTSRC; /* replace (clear screen). */
- ! IfErrOut (ioctl(1, WIOCRASTOP, &uPC_ur), <0,
- "ioctl failed", "WIOCRASTOP");
- uPC_ur.ur_dstop = DSTOR; /* Or in (show text) */
- }
- ***************
- *** 154,160
- {
- /* This routine will flush the display. */
-
- ! IfErrOut (ioctl(0, WIOCRASTOP, &uPC_ur), <0,
- "ioctl failed", "WIOCRASTOP");
- }
-
-
- --- 154,160 -----
- {
- /* This routine will flush the display. */
-
- ! IfErrOut (ioctl(1, WIOCRASTOP, &uPC_ur), <0,
- "ioctl failed", "WIOCRASTOP");
- }
-
- ***************
- *** 522,528
- struct utdata ut;
-
- /* Reset the window to the right size. */
- ! ioctl(0, WIOCSETD, &wreset); /* 0, not wncur here! */
-
- /* Scroll the screen once. (avoids typing over the same line) */
- fprintf (stderr, "\n");
-
- --- 522,528 -----
- struct utdata ut;
-
- /* Reset the window to the right size. */
- ! ioctl(1, WIOCSETD, &wreset); /* 0, not wncur here! */
-
- /* Scroll the screen once. (avoids typing over the same line) */
- fprintf (stderr, "\n");
- diff -c ./term/x11.trm ../patch/term/x11.trm
- *** ./term/x11.trm Thu Sep 6 09:24:44 1990
- --- ../patch/term/x11.trm Tue Sep 4 00:50:32 1990
- ***************
- *** 0
-
- --- 1,77 -----
- + /*
- + * x11.trm --- inboard terminal driver for X11
- + */
- +
- + #define X11_XMAX 4096
- + #define X11_YMAX 4096
- +
- + /* approximations for typical font/screen sizes */
- + #define X11_VCHAR (X11_YMAX/25)
- + #define X11_HCHAR (X11_XMAX/100)
- + #define X11_VTIC (X11_YMAX/100)
- + #define X11_HTIC (X11_XMAX/150)
- +
- + #define X11_nopts 22
- + char X11_opts[X11_nopts][20] = {
- + "-iconic", "-rv", "-reverse", "+rv", "-synchronous",
- + "-display", "-geometry", "-bg", "-background", "-bd", "-bordercolor", "-bw",
- + "-borderwidth", "-fg", "-foreground", "-fn", "-font", "-name",
- + "-selectionTimeout", "-title", "-xnllanguage", "-xrm"
- + };
- + int X11_optarg[X11_nopts] = {
- + 0, 0, 0, 0, 0,
- + 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1
- + };
- +
- + FILE *X11_pipe, *popen();
- + char X11_command[1024]= "gnuplot_x11 -name gnuplot";
- +
- +
- + /* X11_args - scan gnuplot command line for standard X Toolkit options */
- +
- + X11_args(argc, argv) int argc; char *argv[]; {
- + int nx11 = 0, n;
- +
- + while(++argv, --argc > 0) {
- + for (n=0; n<X11_nopts; n++) {
- + if (!strcmp(*argv, X11_opts[n])) {
- + strcat(X11_command, " ");
- + strcat(X11_command, *argv);
- + if (X11_optarg[n]) {
- + if (--argc <= 0) return(nx11);
- + strcat(X11_command, " \"");
- + strcat(X11_command, *++argv);
- + strcat(X11_command, "\"");
- + nx11++;
- + }
- + nx11++; break;
- + }
- + }
- + if (n == X11_nopts) break;
- + }
- + return(nx11);
- + }
- +
- + X11_init() { X11_pipe = popen(X11_command, "w"); }
- +
- + X11_reset() { fprintf(X11_pipe, "R\n"); fflush(X11_pipe); }
- +
- + X11_text() { fprintf(X11_pipe, "E\n"); fflush(X11_pipe); }
- +
- + X11_graphics() { fprintf(X11_pipe, "G\n"); }
- +
- + X11_move(x,y) unsigned int x,y; { fprintf(X11_pipe, "M%04d%04d\n", x, y); }
- +
- + X11_vector(x,y) unsigned int x,y; { fprintf(X11_pipe, "V%04d%04d\n", x, y); }
- +
- + X11_linetype(lt) int lt; { fprintf(X11_pipe, "L%04d\n", lt); }
- +
- + X11_put_text(x,y,str) unsigned int x,y; char str[]; {
- + fprintf(X11_pipe, "T%04d%04d%s\n", x, y, str);
- + }
- + X11_justify_text(mode) enum JUSTIFY mode; {
- + fprintf(X11_pipe, "J%04d\n", mode);
- + return(TRUE);
- + }
- *** ./term.h Wed Aug 29 12:15:55 1990
- --- ../patch1/term.h Tue Sep 18 14:40:02 1990
- ***************
- *** 0
-
- --- 1,86 -----
- + /* GNUPLOT - term.h */
- + /*
- + * Copyright (C) 1986, 1987, 1990 Thomas Williams, Colin Kelley
- + *
- + * Permission to use, copy, and distribute this software and its
- + * documentation for any purpose with or without fee is hereby granted,
- + * provided that the above copyright notice appear in all copies and
- + * that both that copyright notice and this permission notice appear
- + * in supporting documentation.
- + *
- + * Permission to modify the software is granted, but not the right to
- + * distribute the modified code. Modifications are to be distributed
- + * as patches to released version.
- + *
- + * This software is provided "as is" without express or implied warranty.
- + *
- + *
- + * AUTHORS
- + *
- + * Original Software:
- + * Thomas Williams, Colin Kelley.
- + *
- + * Gnuplot 2.0 additions:
- + * Russell Lang, Dave Kotz, John Campbell.
- + *
- + * send your comments or suggestions to (pixar!info-gnuplot@sun.com).
- + *
- + **************************************
- + * term.h: terminal support definitions
- + * Edit this file depending on the set of terminals you wish to support.
- + * Comment out the terminal types that you don't want or don't have, and
- + * uncomment those that you want included. Be aware that some terminal
- + * types (eg, SUN, UNIXPLOT) will require changes in the makefile
- + * LIBS definition.
- + */
- +
- + /* These terminals are not relevant for MSDOS */
- + #ifndef MSDOS
- +
- + #define AED /* AED 512 and AED 767 */
- + #define BITGRAPH /* BBN BitGraph */
- + #define HPLJET /* HP Laserjet */
- + /* #define IRIS4D /* IRIS4D series computer */
- + #define KERMIT /* MS-Kermit Tektronix 4010 emulator */
- + /* #define FIG /* Fig graphics language (requires object.h from TransFig) */
- + #define REGIS /* ReGis graphics (vt125, vt220, vt240, Gigis...) */
- + #define SELANAR /* Selanar */
- + /* #define SUN /* Sun Microsystems Workstation */
- + #define T410X /* Tektronix 4106, 4107, 4109 and 420x terminals */
- + #define TEK /* Tektronix 4010, and probably others */
- + /* #define UNIXPC /* unixpc (ATT 3b1 or ATT 7300) */
- + /* #define UNIXPLOT /* unixplot */
- + /* #define X11 /* X11R4 window system */
- +
- + #endif
- +
- + /* These terminals can be used on any system */
- + #define DXY800A /* Roland DXY800A plotter */
- + #define EEPIC /* EEPIC-extended LaTeX driver, for EEPIC users */
- + #define EMTEX /* LATEX picture environment with EMTEX specials */
- + #define EPS60 /* Epson-style 60-dot per inch printers */
- + #define EPSON /* Epson LX-800, Star NL-10, NX-1000 and lots of others */
- + #define HP2648 /* HP2648, HP2647 */
- + #define HP26 /* HP2623A and maybe others */
- + #define HP75 /* HP7580, and probably other HPs */
- + #define HPGL /* HP7475, HP7220 plotters, and (hopefully) lots of others */
- + #define IMAGEN /* Imagen laser printers (300dpi) (requires -Iterm also) */
- + #define LATEX /* LATEX picture environment */
- + #define NEC /* NEC CP6 pinwriter printer */
- + #define POSTSCRIPT /* Postscript */
- + #define PROPRINTER /* IBM Proprinter */
- + #define QMS /* QMS/QUIC laserprinter (Talaris 1200 and others) */
- + #define STARC /* Star Color Printer */
- + #define TANDY60 /* Tandy DMP-130 series 60-dot per inch graphics */
- + #define V384 /* Vectrix 384 and tandy color printer */
- +
- + /* These are for MSDOS only */
- + #ifdef MSDOS
- + #ifdef __TURBOC__
- + #define ATT6300 /* AT&T 6300 graphics */
- + #else
- + #define ATT6300 /* AT&T 6300 graphics */
- + #define CORONA /* Corona graphics 325 */
- + #define HERCULES /* IBM PC/Clone with Hercules graphics board */
- + #endif
- + #endif
- *** ./term.c Tue Mar 27 09:02:05 1990
- --- ../patch1/term.c Thu Sep 6 09:20:17 1990
- ***************
- *** 29,34
-
- #include <stdio.h>
- #include "plot.h"
-
- /* for use by all drivers */
- #define sign(x) ((x) >= 0 ? 1 : -1)
-
- --- 29,35 -----
-
- #include <stdio.h>
- #include "plot.h"
- + #include "term.h"
-
- /* for use by all drivers */
- #define sign(x) ((x) >= 0 ? 1 : -1)
- ***************
- *** 242,247
- #endif
- #endif
-
- #ifdef EPSON
- #define FONT57
- #endif
-
- --- 243,266 -----
- #endif
- #endif
-
- + #ifdef STARC
- + #ifndef EPSON
- + #define EPSON
- + #endif
- + #endif
- +
- + #ifdef TANDY60
- + #ifndef EPS60
- + #define EPS60
- + #endif
- + #endif
- +
- + #ifdef EPS60
- + #ifndef EPSON
- + #define EPSON
- + #endif
- + #endif
- +
- #ifdef EPSON
- #define FONT57
- #endif
- ***************
- *** 282,287
- # endif
- #endif
-
- #ifdef TEK /* all TEK types, TEK, BBN, SELANAR, KERMIT */
- #include "term/tek.trm"
- #endif
-
- --- 301,310 -----
- # endif
- #endif
-
- + #ifdef T410X /* Tektronix 4106, 4107, 4109 and 420x terminals */
- + #include "term/t410x.trm"
- + #endif
- +
- #ifdef TEK /* all TEK types, TEK, BBN, SELANAR, KERMIT */
- #include "term/tek.trm"
- #endif
- ***************
- *** 286,292
- #include "term/tek.trm"
- #endif
-
- ! #ifdef EPSON /* all bit map types, EPSON, NEC, PROPRINTER */
- #include "term/epson.trm"
- #endif
-
-
- --- 309,315 -----
- #include "term/tek.trm"
- #endif
-
- ! #ifdef EPSON /* bit map types, EPSON, NEC, PROPRINTER, STAR Color */
- #include "term/epson.trm"
- #endif
-
- ***************
- *** 290,295
- #include "term/epson.trm"
- #endif
-
- #ifdef FIG /* Fig 1.4FS Interactive graphics program */
- #include "term/fig.trm"
- #endif
-
- --- 313,322 -----
- #include "term/epson.trm"
- #endif
-
- + #ifdef EPS60 /* old-style EPSON 60-dpi */
- + #include "term/eps60.trm"
- + #endif
- +
- #ifdef FIG /* Fig 1.4FS Interactive graphics program */
- #include "term/fig.trm"
- #endif
- ***************
- *** 305,310
- # endif
- #endif
-
- #ifdef LATEX /* LATEX type */
- #include "term/latex.trm"
- #endif
-
- --- 332,343 -----
- # endif
- #endif
-
- + #ifdef EMTEX /* EMTEX (LATEX for PC) type */
- + # ifndef LATEX
- + # define LATEX
- + # endif
- + #endif
- +
- #ifdef LATEX /* LATEX type */
- #include "term/latex.trm"
- #endif
- ***************
- *** 375,380
- #include "term/unixplot.trm"
- #endif /* UNIXPLOT */
-
- /* Dummy functions for unavailable features */
-
- /* change angle of text. 0 is horizontal left to right.
-
- --- 408,417 -----
- #include "term/unixplot.trm"
- #endif /* UNIXPLOT */
-
- + #ifdef X11
- + #include "term/x11.trm"
- + #endif /* X11 */
- +
- /* Dummy functions for unavailable features */
-
- /* change angle of text. 0 is horizontal left to right.
- ***************
- *** 464,469
- HERC_text, null_scale, HERC_graphics, HERC_move, HERC_vector,
- HERC_linetype, HERC_put_text, MCGA_text_angle,
- HERC_justify_text, line_and_point, do_arrow}
- #else /* TURBO */
-
- ,{"cga", "IBM PC/Clone with CGA graphics board",
-
- --- 501,514 -----
- HERC_text, null_scale, HERC_graphics, HERC_move, HERC_vector,
- HERC_linetype, HERC_put_text, MCGA_text_angle,
- HERC_justify_text, line_and_point, do_arrow}
- + #ifdef ATT6300
- + ,{"att", "IBM PC/Clone with AT&T 6300 graphics board",
- + ATT_XMAX, ATT_YMAX, ATT_VCHAR, ATT_HCHAR,
- + ATT_VTIC, ATT_HTIC, ATT_init, ATT_reset,
- + ATT_text, null_scale, ATT_graphics, ATT_move, ATT_vector,
- + ATT_linetype, ATT_put_text, ATT_text_angle,
- + ATT_justify_text, line_and_point, do_arrow}
- + #endif
- #else /* TURBO */
-
- ,{"cga", "IBM PC/Clone with CGA graphics board",
- ***************
- *** 506,512
- #endif /* HERCULES */
-
- #ifdef ATT6300
- ! ,{"att", "AT&T 6300 terminal ???",
- ATT_XMAX, ATT_YMAX, ATT_VCHAR, ATT_HCHAR,
- ATT_VTIC, ATT_HTIC, ATT_init, ATT_reset,
- ATT_text, null_scale, ATT_graphics, ATT_move, ATT_vector,
-
- --- 551,557 -----
- #endif /* HERCULES */
-
- #ifdef ATT6300
- ! ,{"att", "AT&T PC/6300 graphics",
- ATT_XMAX, ATT_YMAX, ATT_VCHAR, ATT_HCHAR,
- ATT_VTIC, ATT_HTIC, ATT_init, ATT_reset,
- ATT_text, null_scale, ATT_graphics, ATT_move, ATT_vector,
- ***************
- *** 558,563
- null_justify_text, do_point, do_arrow}
- #endif
-
- #ifdef EPSON
- ,{"epson_lx800", "Epson LX-800, Star NL-10, NX-1000 and lots of others",
- EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR,
-
- --- 603,636 -----
- null_justify_text, do_point, do_arrow}
- #endif
-
- + #ifdef EEPIC
- + ,{"eepic", "EEPIC -- extended LaTeX picture environment",
- + EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR,
- + EEPIC_VTIC, EEPIC_HTIC, EEPIC_init, EEPIC_reset,
- + EEPIC_text, EEPIC_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector,
- + EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle,
- + EEPIC_justify_text, EEPIC_point, EEPIC_arrow}
- + #endif
- +
- + #ifdef EMTEX
- +
- + ,{"emtex", "LATEX picture environment with emTeX specials",
- + LATEX_XMAX, LATEX_YMAX, LATEX_VCHAR, LATEX_HCHAR,
- + LATEX_VTIC, LATEX_HTIC, EMTEX_init, EMTEX_reset,
- + EMTEX_text, LATEX_scale, LATEX_graphics, LATEX_move, LATEX_vector,
- + LATEX_linetype, LATEX_put_text, LATEX_text_angle,
- + LATEX_justify_text, LATEX_point, LATEX_arrow}
- + #endif
- +
- + #ifdef EPS60
- + ,{"epson_60dpi", "Epson-style 60-dot per inch printers",
- + EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
- + EPSONVTIC, EPSONHTIC, EPS60init, EPSONreset,
- + EPS60text, null_scale, EPSONgraphics, EPSONmove, EPSONvector,
- + EPSONlinetype, EPSONput_text, EPSON_text_angle,
- + null_justify_text, do_point, do_arrow}
- + #endif
- +
- #ifdef EPSON
- ,{"epson_lx800", "Epson LX-800, Star NL-10, NX-1000 and lots of others",
- EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR,
- ***************
- *** 675,689
- LATEX_justify_text, LATEX_point, LATEX_arrow}
- #endif
-
- - #ifdef EEPIC
- - ,{"eepic", "EEPIC -- extended LaTeX picture environment",
- - EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR,
- - EEPIC_VTIC, EEPIC_HTIC, EEPIC_init, EEPIC_reset,
- - EEPIC_text, EEPIC_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector,
- - EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle,
- - EEPIC_justify_text, EEPIC_point, EEPIC_arrow}
- - #endif
- -
- #ifdef NEC
- ,{"nec_cp6m", "NEC printer CP6 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
-
- --- 748,753 -----
- LATEX_justify_text, LATEX_point, LATEX_arrow}
- #endif
-
- #ifdef NEC
- ,{"nec_cp6m", "NEC printer CP6 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ***************
- *** 769,774
- null_justify_text, line_and_point, do_arrow}
- #endif
-
- #ifdef SUN
- ,{"sun", "SunView window system",
- SUN_XMAX, SUN_YMAX, SUN_VCHAR, SUN_HCHAR,
-
- --- 833,847 -----
- null_justify_text, line_and_point, do_arrow}
- #endif
-
- + #ifdef STARC
- + ,{"starc", "Star Color Printer",
- + STARCXMAX, STARCYMAX, STARCVCHAR, STARCHCHAR,
- + STARCVTIC, STARCHTIC, STARCinit, STARCreset,
- + STARCtext, null_scale, STARCgraphics, STARCmove, STARCvector,
- + STARClinetype, STARCput_text, STARC_text_angle,
- + null_justify_text, line_and_point, do_arrow}
- + #endif
- +
- #ifdef SUN
- ,{"sun", "SunView window system",
- SUN_XMAX, SUN_YMAX, SUN_VCHAR, SUN_HCHAR,
- ***************
- *** 778,783
- SUN_justify_text, line_and_point, do_arrow}
- #endif
-
- #ifdef TEK
- ,{"tek40xx", "Tektronix 4010 and others; most TEK emulators",
- TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
-
- --- 851,874 -----
- SUN_justify_text, line_and_point, do_arrow}
- #endif
-
- + #ifdef TANDY60
- + ,{"tandy_60dpi", "Tandy DMP-130 series 60-dot per inch graphics",
- + EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
- + EPSONVTIC, EPSONHTIC, EPS60init, EPSONreset,
- + TANDY60text, null_scale, EPSONgraphics, EPSONmove, EPSONvector,
- + EPSONlinetype, EPSONput_text, EPSON_text_angle,
- + null_justify_text, do_point, do_arrow}
- + #endif
- +
- + #ifdef T410X
- + ,{"tek410x", "Tektronix 4106, 4107, 4109 and 420X terminals",
- + T410XXMAX, T410XYMAX, T410XVCHAR, T410XHCHAR,
- + T410XVTIC, T410XHTIC, T410X_init, T410X_reset,
- + T410X_text, null_scale, T410X_graphics, T410X_move, T410X_vector,
- + T410X_linetype, T410X_put_text, T410X_text_angle,
- + null_justify_text, T410X_point, do_arrow}
- + #endif
- +
- #ifdef TEK
- ,{"tek40xx", "Tektronix 4010 and others; most TEK emulators",
- TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
- ***************
- *** 813,818
- V384_linetype, V384_put_text, null_text_angle,
- null_justify_text, do_point, do_arrow}
- #endif
- };
-
- #define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry))
-
- --- 904,924 -----
- V384_linetype, V384_put_text, null_text_angle,
- null_justify_text, do_point, do_arrow}
- #endif
- +
- + #ifdef X11
- + ,{"x11", "X11 Window System",
- + X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR,
- + X11_VTIC, X11_HTIC, X11_init, X11_reset,
- + X11_text, null_scale, X11_graphics, X11_move, X11_vector,
- + X11_linetype, X11_put_text, null_text_angle,
- + X11_justify_text, line_and_point, do_arrow}
- + ,{"X11", "X11 Window System - multi-color points",
- + X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR,
- + X11_VTIC, X11_HTIC, X11_init, X11_reset,
- + X11_text, null_scale, X11_graphics, X11_move, X11_vector,
- + X11_linetype, X11_put_text, null_text_angle,
- + X11_justify_text, do_point, do_arrow}
- + #endif
- };
-
- #define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry))
- ***************
- *** 985,990
- case 4 : term_name = "egalib";
- break;
- case 7 : term_name = "hercules";
- break;
- case 9 : term_name = "vgalib";
- break;
-
- --- 1091,1098 -----
- case 4 : term_name = "egalib";
- break;
- case 7 : term_name = "hercules";
- + break;
- + case 8 : term_name = "att";
- break;
- case 9 : term_name = "vgalib";
- break;
- *** ./gnuplot_x11.c Thu Sep 6 09:22:16 1990
- --- ../patch1/gnuplot_x11.c Wed Sep 5 21:25:26 1990
- ***************
- *** 0
-
- --- 1,241 -----
- + /*-----------------------------------------------------------------------------
- + *
- + * gnuplot_x11 - X11 outboard terminal driver for gnuplot 2
- + *
- + * Requires installation of companion inboard x11 driver in gnuplot/term.c
- + *
- + * Acknowledgements:
- + * Chris Peterson (MIT) - original Xlib gnuplot support (and Xaw examples)
- + * Dana Chee (Bellcore) - mods to original support for gnuplot 2.0
- + * Arthur Smith (Cornell) - graphical-label-widget idea (xplot)
- + *
- + * This code is provided as is and with no warranties of any kind.
- + *
- + * Ed Kubaitis
- + * Computing Services Office - University of Illinois, Urbana
- + *---------------------------------------------------------------------------*/
- +
- + #include <stdio.h>
- + #include <X11/Intrinsic.h>
- + #include <X11/StringDefs.h>
- + #include <Cardinals.h> /* use -Idir for location on your system */
- + #include <Label.h> /* use -Idir for location on your system */
- +
- +
- + #define Color (D>1)
- + #define Ncolors 11
- + unsigned long colors[Ncolors];
- + char color_keys[Ncolors][30] = { "text", "border", "axis",
- + "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" };
- +
- + char color_values[Ncolors][30] = { "black", "black", "black",
- + "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" };
- +
- + char dashes[10][5] = { {0}, {1,6,0},
- + {0}, {4,2,0}, {1,3,0}, {4,4,0}, {1,5,0}, {4,4,4,1,0}, {4,2,0}, {1,3,0}
- + };
- +
- + Widget w_top, w_label;
- + Window win; Display *dpy;
- + Pixmap pixmap; GC gc = (GC)NULL;
- + XFontStruct *font;
- + unsigned long fg, bg;
- + Dimension W = 640 , H = 450; int D;
- + Arg args[5];
- + static void gnuplot(), resize();
- +
- + int cx=0, cy=0, vchar, nc = 0;
- + double xscale, yscale;
- + #define X(x) (Dimension) (x * xscale)
- + #define Y(y) (Dimension) ((4095-y) * yscale)
- + enum JUSTIFY { LEFT, CENTRE, RIGHT } jmode;
- + #define Nbuf 1024
- + char buf[Nbuf];
- + String *commands = NULL;
- +
- + /*-----------------------------------------------------------------------------
- + * main program - fire up application and callbacks
- + *---------------------------------------------------------------------------*/
- +
- + main(argc, argv) int argc; char *argv[]; {
- +
- + /* initialize application */
- + w_top = XtInitialize("gnuplot", "Gnuplot", NULL, 0, &argc, argv);
- + XtSetArg(args[0], XtNwidth, W);
- + XtSetArg(args[1], XtNheight, H);
- + w_label = XtCreateManagedWidget("", labelWidgetClass, w_top, args, TWO);
- + XtRealizeWidget(w_top);
- +
- + /* extract needed information */
- + dpy = XtDisplay(w_top); win = XtWindow(w_top); D = DisplayPlanes(dpy,0);
- + if (Color) {
- + char option[20], *value;
- + XColor used, exact;
- + int n;
- +
- + for(n=0; n<Ncolors; n++) {
- + strcpy(option, color_keys[n]);
- + strcat(option, "Color");
- + value = XGetDefault(dpy, "gnuplot", option);
- + if (!value) { value = color_values[n]; }
- + if (XAllocNamedColor(dpy, DefaultColormap(dpy,0), value, &used,&exact))
- + colors[n] = used.pixel;
- + else {
- + fprintf(stderr, "gnuplot: cannot allocate %s:%s\n", option, value);
- + fprintf(stderr, "gnuplot: assuming %s:black\n", option);
- + colors[n] = BlackPixel(dpy,0);
- + }
- + }
- + }
- + XtSetArg(args[0], XtNfont, &font);
- + XtSetArg(args[1], XtNforeground, &fg);
- + XtSetArg(args[2], XtNbackground, &bg);
- + XtSetArg(args[3], XtNwidth, &W);
- + XtSetArg(args[4], XtNheight,&H);
- + XtGetValues(w_label, args, FIVE);
- + vchar = (font->ascent + font->descent);
- +
- + /* add callbacks on input-from-gnuplot-on-stdin & window-resized */
- + XtAddInput(0, XtInputReadMask, gnuplot, NULL);
- + XtAddEventHandler(w_label, StructureNotifyMask, FALSE, resize, NULL);
- +
- + XtMainLoop();
- + }
- +
- + /*-----------------------------------------------------------------------------
- + * display - display accumulated commands from inboard driver
- + *---------------------------------------------------------------------------*/
- +
- + display() {
- + int n, x, y, sw, sl, lt, width, type;
- + char *buf, *str;
- +
- + /* set scaling factor between internal driver & window geometry */
- + xscale = (double)W / 4096.; yscale = (double)H / 4096.;
- +
- + /* return old pixmap & GC, if any */
- + if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
- +
- + /* create new pixmap & GC */
- + pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy), W, H, D);
- + gc = XCreateGC(dpy, pixmap, 0, NULL);
- + XSetFont(dpy, gc, font->fid);
- +
- + /* connect new pixmap to label widget */
- + XtSetArg(args[0], XtNbitmap, pixmap);
- + XtSetValues(w_label, args, ONE);
- +
- + /* erase pixmap */
- + if (Color) {
- + XSetForeground(dpy, gc, bg);
- + XFillRectangle(dpy, pixmap, gc, 0, 0, W, H);
- + XSetForeground(dpy, gc, fg);
- + XSetBackground(dpy, gc, bg);
- + }
- + else {
- + XSetFunction(dpy, gc, GXxor);
- + XCopyArea(dpy, pixmap, pixmap, gc, 0, 0, W, H, 0, 0);
- + XSetFunction(dpy, gc, GXcopyInverted);
- + }
- +
- + /* loop over accumulated commands from inboard driver */
- + for (n=0; n<nc; n++) {
- + buf = commands[n];
- +
- + /* X11_vector(x,y) - draw vector */
- + if (*buf == 'V') {
- + sscanf(buf, "V%4d%4d", &x, &y);
- + XDrawLine(dpy, pixmap, gc, X(cx), Y(cy), X(x), Y(y));
- + cx = x; cy = y;
- + }
- +
- + /* X11_move(x,y) - move */
- + else if (*buf == 'M')
- + sscanf(buf, "M%4d%4d", &cx, &cy);
- +
- + /* X11_put_text(x,y,str) - draw text */
- + else if (*buf == 'T') {
- + sscanf(buf, "T%4d%4d", &x, &y);
- + str = buf + 9; sl = strlen(str) - 1;
- + sw = XTextWidth(font, str, sl);
- + switch(jmode) {
- + case LEFT: sw = 0; break;
- + case CENTRE: sw = -sw/2; break;
- + case RIGHT: sw = -sw; break;
- + }
- + if (!Color)
- + XDrawString(dpy, pixmap, gc, X(x)+sw, Y(y)+vchar/3, str, sl);
- + else {
- + XSetForeground(dpy, gc, colors[0]);
- + XDrawString(dpy, pixmap, gc, X(x)+sw, Y(y)+vchar/3, str, sl);
- + XSetForeground(dpy, gc, colors[lt+1]);
- + }
- + }
- +
- + /* X11_justify_text(mode) - set text justification mode */
- + else if (*buf == 'J')
- + sscanf(buf, "J%4d", &jmode);
- +
- + /* X11_linetype(type) - set line type */
- + else if (*buf == 'L') {
- + sscanf(buf, "L%4d", <);
- + lt = (lt+2)%10;
- + width = (lt == 0) ? 2 : 0;
- + if (Color) {
- + if (lt != 1)
- + type = LineSolid;
- + else {
- + type = LineOnOffDash;
- + XSetDashes(dpy, gc, 0, dashes[lt], strlen(dashes[lt]));
- + }
- + XSetForeground(dpy, gc, colors[lt+1]);
- + }
- + else {
- + type = (lt == 0 || lt == 2) ? LineSolid : LineOnOffDash;
- + if (dashes[lt][0])
- + XSetDashes(dpy, gc, 0, dashes[lt], strlen(dashes[lt]));
- + }
- + XSetLineAttributes( dpy,gc, width, type, CapButt, JoinBevel);
- + }
- + }
- +
- + /* trigger expose events to display pixmap */
- + XClearArea(dpy, win, 0, 0, 0, 0, True);
- + }
- +
- + /*-----------------------------------------------------------------------------
- + * gnuplot - Xt callback on input from gnuplot inboard X11 driver
- + *---------------------------------------------------------------------------*/
- +
- + static void
- + gnuplot(cd, s, id) char *cd; int *s; XtInputId *id; {
- +
- + while (fgets(buf, Nbuf, stdin)) {
- + if (*buf == 'G') { /* enter graphics mode */
- + if (commands) {
- + int n;
- + for (n=0; n<nc; n++) XtFree(commands[n]);
- + XtFree(commands);
- + }
- + commands = NULL; nc = 0;
- + }
- + else if (*buf == 'E') { display(); break; } /* leave graphics mode */
- + else if (*buf == 'R') { exit(0); } /* leave X11/x11 mode */
- + else {
- + commands = (String *)XtRealloc(commands, (nc+1) * sizeof(String));
- + commands[nc++] = XtNewString(buf);
- + }
- + }
- + if (feof(stdin) || ferror(stdin)) exit(0);
- + }
- +
- + /*-----------------------------------------------------------------------------
- + * resize - Xt callback when window resized
- + *---------------------------------------------------------------------------*/
- +
- + static void
- + resize(w, cd, e) Widget w; char *cd; XConfigureEvent *e; {
- + if (e->type != ConfigureNotify) return;
- + W = e->width; H = e->height;
- + display();
- + }
-