home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-01-05 | 49.5 KB | 1,786 lines |
- diff -cr ./term.c ../gnuplot2.02/term.c
- *** ./term.c Tue Sep 18 14:59:25 1990
- --- ../gnuplot2.02/term.c Mon Dec 10 10:08:24 1990
- ***************
- *** 29,34
-
- #include <stdio.h>
- #include "plot.h"
- #include "term.h"
-
- /* for use by all drivers */
-
- --- 29,35 -----
-
- #include <stdio.h>
- #include "plot.h"
- + #include "setshow.h"
- #include "term.h"
- #include "bitmap.h"
-
- ***************
- *** 30,35
- #include <stdio.h>
- #include "plot.h"
- #include "term.h"
-
- /* for use by all drivers */
- #define sign(x) ((x) >= 0 ? 1 : -1)
-
- --- 31,37 -----
- #include "plot.h"
- #include "setshow.h"
- #include "term.h"
- + #include "bitmap.h"
-
- /* for use by all drivers */
- #define sign(x) ((x) >= 0 ? 1 : -1)
- ***************
- *** 61,78
- #ifdef __TURBOC__
- char *turboc_init();
- #endif
- !
- ! #ifdef vms
- ! /* these are needed to sense a regis terminal and
- ! * to do a SET TERM/NOWRAP */
- ! #include <descrip.h>
- ! #include <dvidef.h>
- ! #include <iodef.h>
- ! #include <ttdef.h>
- ! #include <tt2def.h>
- ! static unsigned short chan;
- ! static int old_char_buf[3], new_char_buf[3];
- ! $DESCRIPTOR(sysoutput_desc,"SYS$OUTPUT");
- char *vms_init();
- #endif
-
-
- --- 63,72 -----
- #ifdef __TURBOC__
- char *turboc_init();
- #endif
- ! #ifdef PC
- ! void reopen_binary();
- ! #endif
- ! #ifdef VMS
- char *vms_init();
- void vms_reset();
- void term_mode_tek();
- ***************
- *** 74,79
- static int old_char_buf[3], new_char_buf[3];
- $DESCRIPTOR(sysoutput_desc,"SYS$OUTPUT");
- char *vms_init();
- #endif
-
-
-
- --- 68,80 -----
- #endif
- #ifdef VMS
- char *vms_init();
- + void vms_reset();
- + void term_mode_tek();
- + void term_mode_native();
- + void term_pasthru();
- + void term_nopasthru();
- + void reopen_binary();
- + void fflush_binary();
- #endif
-
- /* This is needed because the unixplot library only writes to stdout. */
- ***************
- *** 76,82
- char *vms_init();
- #endif
-
- -
- /* This is needed because the unixplot library only writes to stdout. */
- #ifdef UNIXPLOT
- FILE save_stdout;
-
- --- 77,82 -----
- void fflush_binary();
- #endif
-
- /* This is needed because the unixplot library only writes to stdout. */
- #ifdef UNIXPLOT
- FILE save_stdout;
- ***************
- *** 225,235
-
- }
-
- - #ifdef PC
- - #ifndef __TURBOC__
- - #define FONT57
- - #endif
- - #endif
-
- #ifdef NEC
- #ifndef EPSON
-
- --- 225,230 -----
-
- }
-
-
- #ifdef PC /* all PC types */
- #include "term/pc.trm"
- ***************
- *** 231,279
- #endif
- #endif
-
- - #ifdef NEC
- - #ifndef EPSON
- - #define EPSON
- - #endif
- - #endif
- -
- - #ifdef PROPRINTER
- - #ifndef EPSON
- - #define EPSON
- - #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
- -
- - #ifdef UNIXPC
- - #define FONT57
- - #endif
- -
- - #ifdef FONT57
- - #include "term/font5x7.trm"
- - #endif /* FONT57 */
- -
- -
- #ifdef PC /* all PC types */
- #include "term/pc.trm"
- #endif
-
- --- 226,231 -----
- }
-
-
- #ifdef PC /* all PC types */
- #include "term/pc.trm"
- #endif
- ***************
- *** 279,285
- #endif
-
- /*
- ! all TEK types (TEK,BITGRAPH,KERMIT,SELANAR) are ifdef'd in tek.trm,
- but most require various TEK routines. Hence TEK must be defined for
- the others to compile.
- */
-
- --- 231,237 -----
- #endif
-
- /*
- ! all TEK types (TEK,BITGRAPH,KERMIT,VTTEK,SELANAR) are ifdef'd in tek.trm,
- but most require various TEK routines. Hence TEK must be defined for
- the others to compile.
- */
- ***************
- *** 301,306
- # endif
- #endif
-
- #ifdef T410X /* Tektronix 4106, 4107, 4109 and 420x terminals */
- #include "term/t410x.trm"
- #endif
-
- --- 253,264 -----
- # endif
- #endif
-
- + #ifdef VTTEK
- + # ifndef TEK
- + # define TEK
- + # endif
- + #endif
- +
- #ifdef T410X /* Tektronix 4106, 4107, 4109 and 420x terminals */
- #include "term/t410x.trm"
- #endif
- ***************
- *** 305,311
- #include "term/t410x.trm"
- #endif
-
- ! #ifdef TEK /* all TEK types, TEK, BBN, SELANAR, KERMIT */
- #include "term/tek.trm"
- #endif
-
-
- --- 263,269 -----
- #include "term/t410x.trm"
- #endif
-
- ! #ifdef TEK /* all TEK types, TEK, BBN, SELANAR, KERMIT, VTTEK */
- #include "term/tek.trm"
- #endif
-
- ***************
- *** 313,320
- #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 */
-
- --- 271,278 -----
- #include "term/epson.trm"
- #endif
-
- ! #ifdef HPLJII /* HP LaserJet II */
- ! #include "term/hpljii.trm"
- #endif
-
- #ifdef FIG /* Fig 1.4FS Interactive graphics program */
- ***************
- *** 346,351
- #include "term/post.trm"
- #endif
-
- #ifdef HPLJET /* hplaserjet */
- #include "term/hpljet.trm"
- #endif
-
- --- 304,313 -----
- #include "term/post.trm"
- #endif
-
- + #ifdef PRESCRIBE /* PRESCRIBE type */
- + #include "term/kyo.trm"
- + #endif
- +
- #ifdef HPLJET /* hplaserjet */
- #include "term/hpljet.trm"
- #endif
- ***************
- *** 358,363
- #include "term/aed.trm"
- #endif /* AED */
-
- #ifdef HP2648
- /* also works for HP2647 */
- #include "term/hp2648.trm"
-
- --- 320,329 -----
- #include "term/aed.trm"
- #endif /* AED */
-
- + #ifdef CGI
- + #include "term/cgi.trm"
- + #endif /* CGI */
- +
- #ifdef HP2648
- /* also works for HP2647 */
- #include "term/hp2648.trm"
- ***************
- *** 594,599
- null_justify_text, line_and_point, do_arrow}
- #endif
-
- #ifdef DXY800A
- ,{"dxy800a", "Roland DXY800A plotter",
- DXY_XMAX, DXY_YMAX, DXY_VCHAR, DXY_HCHAR,
-
- --- 560,581 -----
- null_justify_text, line_and_point, do_arrow}
- #endif
-
- + #ifdef CGI
- + ,{"cgi", "SCO CGI drivers (requires CGIDISP or CGIPRNT env variable)",
- + CGI_XMAX, CGI_YMAX, 0, 0,
- + CGI_VTIC, 0, CGI_init, CGI_reset,
- + CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector,
- + CGI_linetype, CGI_put_text, CGI_text_angle,
- + CGI_justify_text, CGI_point, do_arrow}
- +
- + ,{"hcgi", "SCO CGI drivers (hardcopy, requires CGIPRNT env variable)",
- + CGI_XMAX, CGI_YMAX, 0, 0,
- + CGI_VTIC, 0, HCGI_init, CGI_reset,
- + CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector,
- + CGI_linetype, CGI_put_text, CGI_text_angle,
- + CGI_justify_text, CGI_point, do_arrow}
- + #endif
- +
- #ifdef DXY800A
- ,{"dxy800a", "Roland DXY800A plotter",
- DXY_XMAX, DXY_YMAX, DXY_VCHAR, DXY_HCHAR,
- ***************
- *** 625,632
- #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
-
- --- 607,614 -----
- #ifdef EPS60
- ,{"epson_60dpi", "Epson-style 60-dot per inch printers",
- EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
- ! EPSONVTIC, EPSONHTIC, EPSONinit, EPSONreset,
- ! EPS60text, null_scale, EPS60graphics, EPSONmove, EPSONvector,
- EPSONlinetype, EPSONput_text, EPSON_text_angle,
- null_justify_text, do_point, do_arrow}
- #endif
- ***************
- *** 632,638
- #endif
-
- #ifdef EPSON
- ! ,{"epson_lx800", "Epson LX-800, Star NL-10, NX-1000 and lots of others",
- EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR,
- EPSONVTIC, EPSONHTIC, EPSONinit, EPSONreset,
- EPSONtext, null_scale, EPSONgraphics, EPSONmove, EPSONvector,
-
- --- 614,620 -----
- #endif
-
- #ifdef EPSON
- ! ,{"epson_lx800", "Epson LX-800, Star NL-10, NX-1000, PROPRINTER ...",
- EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR,
- EPSONVTIC, EPSONHTIC, EPSONinit, EPSONreset,
- EPSONtext, null_scale, EPSONgraphics, EPSONmove, EPSONvector,
- ***************
- *** 685,709
- null_justify_text, do_point, do_arrow}
- #endif
-
- ! #ifdef HPLJET
- ! ,{"laserjet1", "HP Laserjet, smallest size",
- ! HPLJETXMAX, HPLJETYMAX, HPLJET1VCHAR, HPLJET1HCHAR,
- ! HPLJETVTIC, HPLJETHTIC, HPLJET1init, HPLJETreset,
- ! HPLJETtext, null_scale, HPLJETgraphics, HPLJETmove, HPLJETvector,
- ! HPLJETlinetype, HPLJETput_text, null_text_angle,
- ! null_justify_text, line_and_point, do_arrow}
- ! ,{"laserjet2", "HP Laserjet, medium size",
- ! HPLJETXMAX, HPLJETYMAX, HPLJET2VCHAR, HPLJET2HCHAR,
- ! HPLJETVTIC, HPLJETHTIC, HPLJET2init, HPLJETreset,
- ! HPLJETtext, null_scale, HPLJETgraphics, HPLJETmove, HPLJETvector,
- ! HPLJETlinetype, HPLJETput_text, null_text_angle,
- ! null_justify_text, line_and_point, do_arrow}
- ! ,{"laserjet3", "HP Laserjet, largest size",
- ! HPLJETXMAX, HPLJETYMAX, HPLJET3VCHAR, HPLJET3HCHAR,
- ! HPLJETVTIC, HPLJETHTIC, HPLJET3init, HPLJETreset,
- ! HPLJETtext, null_scale, HPLJETgraphics, HPLJETmove, HPLJETvector,
- ! HPLJETlinetype, HPLJETput_text, null_text_angle,
- ! null_justify_text, line_and_point, do_arrow}
- #endif
-
- #ifdef IMAGEN
-
- --- 667,701 -----
- null_justify_text, do_point, do_arrow}
- #endif
-
- ! #ifdef HPLJII
- ! ,{"hpljii_300ppi", "HP Laserjet series II with 300 pixels per inch",
- ! HPLJII_300PPI_XMAX, HPLJII_300PPI_YMAX, HPLJII_300PPI_VCHAR,
- ! HPLJII_300PPI_HCHAR, HPLJII_300PPI_VTIC, HPLJII_300PPI_HTIC,
- ! HPLJIIinit, HPLJIIreset, HPLJIItext, null_scale,
- ! HPLJII_300PPIgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
- ! HPLJIIput_text, HPLJIItext_angle, null_justify_text, line_and_point,
- ! do_arrow}
- ! ,{"hpljii_150ppi", "HP Laserjet series II with 150 pixels per inch",
- ! HPLJII_150PPI_XMAX, HPLJII_150PPI_YMAX, HPLJII_150PPI_VCHAR,
- ! HPLJII_150PPI_HCHAR, HPLJII_150PPI_VTIC, HPLJII_150PPI_HTIC,
- ! HPLJIIinit, HPLJIIreset, HPLJIItext, null_scale,
- ! HPLJII_150PPIgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
- ! HPLJIIput_text, HPLJIItext_angle, null_justify_text, line_and_point,
- ! do_arrow}
- ! ,{"hpljii_100ppi", "HP Laserjet series II with 100 pixels per inch",
- ! HPLJII_100PPI_XMAX, HPLJII_100PPI_YMAX, HPLJII_100PPI_VCHAR,
- ! HPLJII_100PPI_HCHAR, HPLJII_100PPI_VTIC, HPLJII_100PPI_HTIC,
- ! HPLJIIinit, HPLJIIreset, HPLJIItext, null_scale,
- ! HPLJII_100PPIgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
- ! HPLJIIput_text, HPLJIItext_angle, null_justify_text, line_and_point,
- ! do_arrow}
- ! ,{"hpljii_75ppi", "HP Laserjet series II with 75 pixels per inch",
- ! HPLJII_75PPI_XMAX, HPLJII_75PPI_YMAX, HPLJII_75PPI_VCHAR,
- ! HPLJII_75PPI_HCHAR, HPLJII_75PPI_VTIC, HPLJII_75PPI_HTIC,
- ! HPLJIIinit, HPLJIIreset, HPLJIItext, null_scale,
- ! HPLJII_75PPIgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
- ! HPLJIIput_text, HPLJIItext_angle, null_justify_text, line_and_point,
- ! do_arrow}
- #endif
-
- #ifdef IMAGEN
- ***************
- *** 749,755
- #endif
-
- #ifdef NEC
- ! ,{"nec_cp6m", "NEC printer CP6 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- NECVTIC, NECHTIC, NECMinit, NECreset,
- NECtext, null_scale, NECgraphics, NECmove, NECvector,
-
- --- 741,747 -----
- #endif
-
- #ifdef NEC
- ! ,{"nec_cp6m", "NEC printer CP6, Epson LQ-800 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- NECVTIC, NECHTIC, NECinit, NECreset,
- NECtext, null_scale, NECMgraphics, NECmove, NECvector,
- ***************
- *** 751,758
- #ifdef NEC
- ,{"nec_cp6m", "NEC printer CP6 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECMinit, NECreset,
- ! NECtext, null_scale, NECgraphics, NECmove, NECvector,
- NECMlinetype, NECput_text, NEC_text_angle,
- null_justify_text, line_and_point, do_arrow}
- ,{"nec_cp6c", "NEC printer CP6 Color",
-
- --- 743,750 -----
- #ifdef NEC
- ,{"nec_cp6m", "NEC printer CP6, Epson LQ-800 Monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECinit, NECreset,
- ! NECtext, null_scale, NECMgraphics, NECmove, NECvector,
- NECMlinetype, NECput_text, NEC_text_angle,
- null_justify_text, line_and_point, do_arrow}
- ,{"nec_cp6c", "NEC printer CP6 Color",
- ***************
- *** 757,764
- null_justify_text, line_and_point, do_arrow}
- ,{"nec_cp6c", "NEC printer CP6 Color",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECCinit, NECreset,
- ! NECtext, null_scale, NECgraphics, NECmove, NECvector,
- NECClinetype, NECput_text, NEC_text_angle,
- null_justify_text, do_point, do_arrow}
- ,{"nec_cp6d", "NEC printer CP6 Draft monochrome",
-
- --- 749,756 -----
- null_justify_text, line_and_point, do_arrow}
- ,{"nec_cp6c", "NEC printer CP6 Color",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECinit, NECreset,
- ! NECtext, null_scale, NECCgraphics, NECmove, NECvector,
- NECClinetype, NECput_text, NEC_text_angle,
- null_justify_text, do_point, do_arrow}
- ,{"nec_cp6d", "NEC printer CP6, Epson LQ-800 Draft monochrome",
- ***************
- *** 761,767
- NECtext, null_scale, NECgraphics, NECmove, NECvector,
- NECClinetype, NECput_text, NEC_text_angle,
- null_justify_text, do_point, do_arrow}
- ! ,{"nec_cp6d", "NEC printer CP6 Draft monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- NECVTIC, NECHTIC, NECMinit, NECreset,
- NECdraft_text, null_scale, NECgraphics, NECmove, NECvector,
-
- --- 753,759 -----
- NECtext, null_scale, NECCgraphics, NECmove, NECvector,
- NECClinetype, NECput_text, NEC_text_angle,
- null_justify_text, do_point, do_arrow}
- ! ,{"nec_cp6d", "NEC printer CP6, Epson LQ-800 Draft monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- NECVTIC, NECHTIC, NECinit, NECreset,
- NECdraft_text, null_scale, NECMgraphics, NECmove, NECvector,
- ***************
- *** 763,770
- null_justify_text, do_point, do_arrow}
- ,{"nec_cp6d", "NEC printer CP6 Draft monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECMinit, NECreset,
- ! NECdraft_text, null_scale, NECgraphics, NECmove, NECvector,
- NECMlinetype, NECput_text, NEC_text_angle,
- null_justify_text, line_and_point, do_arrow}
- #endif
-
- --- 755,762 -----
- null_justify_text, do_point, do_arrow}
- ,{"nec_cp6d", "NEC printer CP6, Epson LQ-800 Draft monochrome",
- NECXMAX, NECYMAX, NECVCHAR, NECHCHAR,
- ! NECVTIC, NECHTIC, NECinit, NECreset,
- ! NECdraft_text, null_scale, NECMgraphics, NECmove, NECvector,
- NECMlinetype, NECput_text, NEC_text_angle,
- null_justify_text, line_and_point, do_arrow}
- #endif
- ***************
- *** 796,809
- PS_justify_text, PS_point, do_arrow}
- #endif
-
- ! #ifdef PROPRINTER
- ! ,{"proprinter", "IBM Proprinter",
- ! EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR,
- ! EPSONVTIC, EPSONHTIC, EPSONinit, EPSONreset,
- ! PROPRINTERtext, null_scale, EPSONgraphics, EPSONmove, EPSONvector,
- ! EPSONlinetype, EPSONput_text, EPSON_text_angle,
- ! null_justify_text, line_and_point, do_arrow}
- ! #endif
-
- #ifdef QMS
- ,{"qms", "QMS/QUIC Laser printer (also Talaris 1200 and others)",
-
- --- 788,807 -----
- PS_justify_text, PS_point, do_arrow}
- #endif
-
- ! #ifdef PRESCRIBE
- ! ,{"prescribe", "Prescribe - for the Kyocera Laser Printer",
- ! PRE_XMAX, PRE_YMAX, PRE_VCHAR, PRE_HCHAR,
- ! PRE_VTIC, PRE_HTIC, PRE_init, PRE_reset,
- ! PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector,
- ! PRE_linetype, PRE_put_text, null_text_angle,
- ! PRE_justify_text, line_and_point, do_arrow}
- ! ,{"kyo", "Kyocera Laser Printer with Courier font",
- ! PRE_XMAX, PRE_YMAX, KYO_VCHAR, KYO_HCHAR,
- ! PRE_VTIC, PRE_HTIC, KYO_init, PRE_reset,
- ! PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector,
- ! PRE_linetype, PRE_put_text, null_text_angle,
- ! PRE_justify_text, line_and_point, do_arrow}
- ! #endif /* PRESCRIBE */
-
- #ifdef QMS
- ,{"qms", "QMS/QUIC Laser printer (also Talaris 1200 and others)",
- ***************
- *** 854,861
- #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
-
- --- 852,859 -----
- #ifdef TANDY60
- ,{"tandy_60dpi", "Tandy DMP-130 series 60-dot per inch graphics",
- EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
- ! EPSONVTIC, EPSONHTIC, EPSONinit, EPSONreset,
- ! TANDY60text, null_scale, EPS60graphics, EPSONmove, EPSONvector,
- EPSONlinetype, EPSONput_text, EPSON_text_angle,
- null_justify_text, do_point, do_arrow}
- #endif
- ***************
- *** 905,910
- null_justify_text, do_point, do_arrow}
- #endif
-
- #ifdef X11
- ,{"x11", "X11 Window System",
- X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR,
-
- --- 903,917 -----
- null_justify_text, do_point, do_arrow}
- #endif
-
- + #ifdef VTTEK
- + ,{"vttek", "VT-like tek40xx terminal emulator",
- + TEK40XMAX,TEK40YMAX,TEK40VCHAR, TEK40HCHAR,
- + TEK40VTIC, TEK40HTIC, VTTEK40init, VTTEK40reset,
- + TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector,
- + VTTEK40linetype, VTTEK40put_text, null_text_angle,
- + null_justify_text, line_and_point, do_arrow}
- + #endif
- +
- #ifdef X11
- ,{"x11", "X11 Window System",
- X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR,
- ***************
- *** 1014,1020
- {
- char *term_name = NULL;
- int t;
- - #ifdef SUN /* turbo C doesn't like unused variables */
- char *term = NULL; /* from TERM environment var */
- #endif
- char *gnuterm = NULL;
-
- --- 1021,1026 -----
- {
- char *term_name = NULL;
- int t;
- char *term = NULL; /* from TERM environment var */
- #ifdef X11
- char *display = NULL;
- ***************
- *** 1016,1021
- int t;
- #ifdef SUN /* turbo C doesn't like unused variables */
- char *term = NULL; /* from TERM environment var */
- #endif
- char *gnuterm = NULL;
-
-
- --- 1022,1029 -----
- char *term_name = NULL;
- int t;
- char *term = NULL; /* from TERM environment var */
- + #ifdef X11
- + char *display = NULL;
- #endif
- char *gnuterm = NULL;
-
- ***************
- *** 1026,1031
- else {
- #ifdef __TURBOC__
- term_name = turboc_init();
- #endif
-
- #ifdef vms
-
- --- 1034,1040 -----
- else {
- #ifdef __TURBOC__
- term_name = turboc_init();
- + term = (char *)NULL; /* shut up turbo C */
- #endif
-
- #ifdef vms
- ***************
- *** 1039,1044
- term_name = "sun";
- #endif /* sun */
-
- #ifdef UNIXPC
- if (iswind() == 0) {
- term_name = "unixpc";
-
- --- 1048,1063 -----
- term_name = "sun";
- #endif /* sun */
-
- + #ifdef X11
- + term = getenv("TERM"); /* try $TERM */
- + if (term_name == (char *)NULL
- + && term != (char *)NULL && strcmp(term, "xterm") == 0)
- + term_name = "x11";
- + display = getenv("DISPLAY");
- + if (term_name == (char *)NULL && display != (char *)NULL)
- + term_name = "x11";
- + #endif /* x11 */
- +
- #ifdef UNIXPC
- if (iswind() == 0) {
- term_name = "unixpc";
- ***************
- *** 1044,1049
- term_name = "unixpc";
- }
- #endif /* unixpc */
- }
-
- /* We have a name, try to set term type */
-
- --- 1063,1073 -----
- term_name = "unixpc";
- }
- #endif /* unixpc */
- +
- + #ifdef CGI
- + if (getenv("CGIDISP") || getenv("CGIPRNT"))
- + term_name = "cgi";
- + #endif /*CGI */
- }
-
- /* We have a name, try to set term type */
- ***************
- *** 1103,1109
- }
- #endif /* __TURBOC__ */
-
- - #ifdef vms
- /*
- * Determine if we have a regis terminal.
- * and do a SET TERM/NOWRAP
-
- --- 1127,1132 -----
- }
- #endif /* __TURBOC__ */
-
- /*
- This is always defined so we don't have to have command.c know if it
- is there or not.
- ***************
- *** 1105,1178
-
- #ifdef vms
- /*
- - * Determine if we have a regis terminal.
- - * and do a SET TERM/NOWRAP
- - */
- - char *
- - vms_init()
- - {
- - char *term_str="tt:";
- - typedef struct
- - {
- - short cond_value;
- - short count;
- - int info;
- - } status_block;
- - typedef struct
- - {
- - short buffer_len;
- - short item_code;
- - int buffer_addr;
- - int ret_len_addr;
- - } item_desc;
- - struct {
- - item_desc dev_type;
- - int terminator;
- - } dvi_list;
- - int status, dev_type, zero=0;
- - char buffer[255];
- - $DESCRIPTOR(term_desc, term_str);
- -
- - /* This does the equivalent of a SET TERM/NOWRAP command */
- - int i;
- - sys$assign(&sysoutput_desc,&chan,0,0);
- - sys$qiow(0,chan,IO$_SENSEMODE,0,0,0,old_char_buf,12,0,0,0,0);
- - for (i = 0 ; i < 3 ; ++i) new_char_buf[i] = old_char_buf[i];
- - new_char_buf[1] &= ~(TT$M_WRAP);
- - sys$qiow(0,chan,IO$_SETMODE,0,0,0,new_char_buf,12,0,0,0,0);
- - sys$dassgn(chan);
- -
- - /* set up dvi item list */
- - dvi_list.dev_type.buffer_len = 4;
- - dvi_list.dev_type.item_code = DVI$_TT_REGIS;
- - dvi_list.dev_type.buffer_addr = &dev_type;
- - dvi_list.dev_type.ret_len_addr = 0;
- -
- - dvi_list.terminator = 0;
- -
- - /* See what type of terminal we have. */
- - status = SYS$GETDVIW (0, 0, &term_desc, &dvi_list, 0, 0, 0, 0);
- - if ((status & 1) && dev_type) {
- - return("regis");
- - }
- - return(NULL);
- - }
- -
- -
- -
- - /*
- - * vms_reset
- - */
- - vms_reset()
- - {
- - /* set wrap back to original state */
- - sys$assign(&sysoutput_desc,&chan,0,0);
- - sys$qiow(0,chan,IO$_SETMODE,0,0,0,old_char_buf,12,0,0,0,0);
- - sys$dassgn(chan);
- - }
- - #endif /* VMS */
- -
- - /*
- This is always defined so we don't have to have command.c know if it
- is there or not.
- */
-
- --- 1128,1133 -----
- #endif /* __TURBOC__ */
-
- /*
- This is always defined so we don't have to have command.c know if it
- is there or not.
- */
- ***************
- *** 1237,1242
- register struct termentry *t = &term_tbl[term];
- char *str;
- int x,y, xl,yl, i;
- char label[MAX_ID_LEN];
-
- if (!term_init) {
-
- --- 1192,1198 -----
- register struct termentry *t = &term_tbl[term];
- char *str;
- int x,y, xl,yl, i;
- + unsigned int xmax, ymax;
- char label[MAX_ID_LEN];
-
- if (!term_init) {
- ***************
- *** 1244,1249
- term_init = TRUE;
- }
- screen_ok = FALSE;
- (*t->graphics)();
- /* border linetype */
- (*t->linetype)(-2);
-
- --- 1200,1208 -----
- term_init = TRUE;
- }
- screen_ok = FALSE;
- + (void)(*t->scale)(xsize, ysize);
- + xmax = (unsigned int)(t->xmax * xsize);
- + ymax = (unsigned int)(t->ymax * ysize);
- (*t->graphics)();
- /* border linetype */
- (*t->linetype)(-2);
- ***************
- *** 1248,1256
- /* border linetype */
- (*t->linetype)(-2);
- (*t->move)(0,0);
- ! (*t->vector)(t->xmax-1,0);
- ! (*t->vector)(t->xmax-1,t->ymax-1);
- ! (*t->vector)(0,t->ymax-1);
- (*t->vector)(0,0);
- (void) (*t->justify_text)(LEFT);
- (*t->put_text)(t->h_char*5,t->ymax-t->v_char*3,"Terminal Test");
-
- --- 1207,1215 -----
- /* border linetype */
- (*t->linetype)(-2);
- (*t->move)(0,0);
- ! (*t->vector)(xmax-1,0);
- ! (*t->vector)(xmax-1,ymax-1);
- ! (*t->vector)(0,ymax-1);
- (*t->vector)(0,0);
- (void) (*t->justify_text)(LEFT);
- (*t->put_text)(t->h_char*5,ymax-t->v_char*3,"Terminal Test");
- ***************
- *** 1253,1259
- (*t->vector)(0,t->ymax-1);
- (*t->vector)(0,0);
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(t->h_char*5,t->ymax-t->v_char*3,"Terminal Test");
- /* axis linetype */
- (*t->linetype)(-1);
- (*t->move)(t->xmax/2,0);
-
- --- 1212,1218 -----
- (*t->vector)(0,ymax-1);
- (*t->vector)(0,0);
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(t->h_char*5,ymax-t->v_char*3,"Terminal Test");
- /* axis linetype */
- (*t->linetype)(-1);
- (*t->move)(xmax/2,0);
- ***************
- *** 1256,1265
- (*t->put_text)(t->h_char*5,t->ymax-t->v_char*3,"Terminal Test");
- /* axis linetype */
- (*t->linetype)(-1);
- ! (*t->move)(t->xmax/2,0);
- ! (*t->vector)(t->xmax/2,t->ymax-1);
- ! (*t->move)(0,t->ymax/2);
- ! (*t->vector)(t->xmax-1,t->ymax/2);
- /* test width and height of characters */
- (*t->linetype)(-2);
- (*t->move)( t->xmax/2-t->h_char*10,t->ymax/2+t->v_char/2);
-
- --- 1215,1224 -----
- (*t->put_text)(t->h_char*5,ymax-t->v_char*3,"Terminal Test");
- /* axis linetype */
- (*t->linetype)(-1);
- ! (*t->move)(xmax/2,0);
- ! (*t->vector)(xmax/2,ymax-1);
- ! (*t->move)(0,ymax/2);
- ! (*t->vector)(xmax-1,ymax/2);
- /* test width and height of characters */
- (*t->linetype)(-2);
- (*t->move)( xmax/2-t->h_char*10,ymax/2+t->v_char/2);
- ***************
- *** 1262,1273
- (*t->vector)(t->xmax-1,t->ymax/2);
- /* test width and height of characters */
- (*t->linetype)(-2);
- ! (*t->move)( t->xmax/2-t->h_char*10,t->ymax/2+t->v_char/2);
- ! (*t->vector)(t->xmax/2+t->h_char*10,t->ymax/2+t->v_char/2);
- ! (*t->vector)(t->xmax/2+t->h_char*10,t->ymax/2-t->v_char/2);
- ! (*t->vector)(t->xmax/2-t->h_char*10,t->ymax/2-t->v_char/2);
- ! (*t->vector)(t->xmax/2-t->h_char*10,t->ymax/2+t->v_char/2);
- ! (*t->put_text)(t->xmax/2-t->h_char*10,t->ymax/2,
- "12345678901234567890");
- /* test justification */
- (void) (*t->justify_text)(LEFT);
-
- --- 1221,1232 -----
- (*t->vector)(xmax-1,ymax/2);
- /* test width and height of characters */
- (*t->linetype)(-2);
- ! (*t->move)( xmax/2-t->h_char*10,ymax/2+t->v_char/2);
- ! (*t->vector)(xmax/2+t->h_char*10,ymax/2+t->v_char/2);
- ! (*t->vector)(xmax/2+t->h_char*10,ymax/2-t->v_char/2);
- ! (*t->vector)(xmax/2-t->h_char*10,ymax/2-t->v_char/2);
- ! (*t->vector)(xmax/2-t->h_char*10,ymax/2+t->v_char/2);
- ! (*t->put_text)(xmax/2-t->h_char*10,ymax/2,
- "12345678901234567890");
- /* test justification */
- (void) (*t->justify_text)(LEFT);
- ***************
- *** 1271,1277
- "12345678901234567890");
- /* test justification */
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(t->xmax/2,t->ymax/2+t->v_char*6,"left justified");
- str = "centre+d text";
- if ((*t->justify_text)(CENTRE))
- (*t->put_text)(t->xmax/2,
-
- --- 1230,1236 -----
- "12345678901234567890");
- /* test justification */
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(xmax/2,ymax/2+t->v_char*6,"left justified");
- str = "centre+d text";
- if ((*t->justify_text)(CENTRE))
- (*t->put_text)(xmax/2,
- ***************
- *** 1274,1281
- (*t->put_text)(t->xmax/2,t->ymax/2+t->v_char*6,"left justified");
- str = "centre+d text";
- if ((*t->justify_text)(CENTRE))
- ! (*t->put_text)(t->xmax/2,
- ! t->ymax/2+t->v_char*5,str);
- else
- (*t->put_text)(t->xmax/2-strlen(str)*t->h_char/2,
- t->ymax/2+t->v_char*5,str);
-
- --- 1233,1240 -----
- (*t->put_text)(xmax/2,ymax/2+t->v_char*6,"left justified");
- str = "centre+d text";
- if ((*t->justify_text)(CENTRE))
- ! (*t->put_text)(xmax/2,
- ! ymax/2+t->v_char*5,str);
- else
- (*t->put_text)(xmax/2-strlen(str)*t->h_char/2,
- ymax/2+t->v_char*5,str);
- ***************
- *** 1277,1284
- (*t->put_text)(t->xmax/2,
- t->ymax/2+t->v_char*5,str);
- else
- ! (*t->put_text)(t->xmax/2-strlen(str)*t->h_char/2,
- ! t->ymax/2+t->v_char*5,str);
- str = "right justified";
- if ((*t->justify_text)(RIGHT))
- (*t->put_text)(t->xmax/2,
-
- --- 1236,1243 -----
- (*t->put_text)(xmax/2,
- ymax/2+t->v_char*5,str);
- else
- ! (*t->put_text)(xmax/2-strlen(str)*t->h_char/2,
- ! ymax/2+t->v_char*5,str);
- str = "right justified";
- if ((*t->justify_text)(RIGHT))
- (*t->put_text)(xmax/2,
- ***************
- *** 1281,1288
- t->ymax/2+t->v_char*5,str);
- str = "right justified";
- if ((*t->justify_text)(RIGHT))
- ! (*t->put_text)(t->xmax/2,
- ! t->ymax/2+t->v_char*4,str);
- else
- (*t->put_text)(t->xmax/2-strlen(str)*t->h_char,
- t->ymax/2+t->v_char*4,str);
-
- --- 1240,1247 -----
- ymax/2+t->v_char*5,str);
- str = "right justified";
- if ((*t->justify_text)(RIGHT))
- ! (*t->put_text)(xmax/2,
- ! ymax/2+t->v_char*4,str);
- else
- (*t->put_text)(xmax/2-strlen(str)*t->h_char,
- ymax/2+t->v_char*4,str);
- ***************
- *** 1284,1291
- (*t->put_text)(t->xmax/2,
- t->ymax/2+t->v_char*4,str);
- else
- ! (*t->put_text)(t->xmax/2-strlen(str)*t->h_char,
- ! t->ymax/2+t->v_char*4,str);
- /* test text angle */
- str = "rotated ce+ntred text";
- if ((*t->text_angle)(1)) {
-
- --- 1243,1250 -----
- (*t->put_text)(xmax/2,
- ymax/2+t->v_char*4,str);
- else
- ! (*t->put_text)(xmax/2-strlen(str)*t->h_char,
- ! ymax/2+t->v_char*4,str);
- /* test text angle */
- str = "rotated ce+ntred text";
- if ((*t->text_angle)(1)) {
- ***************
- *** 1291,1297
- if ((*t->text_angle)(1)) {
- if ((*t->justify_text)(CENTRE))
- (*t->put_text)(t->v_char,
- ! t->ymax/2,str);
- else
- (*t->put_text)(t->v_char,
- t->ymax/2-strlen(str)*t->h_char/2,str);
-
- --- 1250,1256 -----
- if ((*t->text_angle)(1)) {
- if ((*t->justify_text)(CENTRE))
- (*t->put_text)(t->v_char,
- ! ymax/2,str);
- else
- (*t->put_text)(t->v_char,
- ymax/2-strlen(str)*t->h_char/2,str);
- ***************
- *** 1294,1300
- t->ymax/2,str);
- else
- (*t->put_text)(t->v_char,
- ! t->ymax/2-strlen(str)*t->h_char/2,str);
- }
- else {
- (void) (*t->justify_text)(LEFT);
-
- --- 1253,1259 -----
- ymax/2,str);
- else
- (*t->put_text)(t->v_char,
- ! ymax/2-strlen(str)*t->h_char/2,str);
- }
- else {
- (void) (*t->justify_text)(LEFT);
- ***************
- *** 1298,1304
- }
- else {
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(t->h_char*2,t->ymax/2-t->v_char*2,"Can't rotate text");
- }
- (void) (*t->justify_text)(LEFT);
- (void) (*t->text_angle)(0);
-
- --- 1257,1263 -----
- }
- else {
- (void) (*t->justify_text)(LEFT);
- ! (*t->put_text)(t->h_char*2,ymax/2-t->v_char*2,"Can't rotate text");
- }
- (void) (*t->justify_text)(LEFT);
- (void) (*t->text_angle)(0);
- ***************
- *** 1303,1313
- (void) (*t->justify_text)(LEFT);
- (void) (*t->text_angle)(0);
- /* test tic size */
- ! (*t->move)(t->xmax/2+t->h_tic*2,0);
- ! (*t->vector)(t->xmax/2+t->h_tic*2,t->v_tic);
- ! (*t->move)(t->xmax/2,t->v_tic*2);
- ! (*t->vector)(t->xmax/2+t->h_tic,t->v_tic*2);
- ! (*t->put_text)(t->xmax/2+t->h_tic*2,t->v_tic*2+t->v_char/2,"test tics");
- /* test line and point types */
- x = t->xmax - t->h_char*4 - t->h_tic*4;
- y = t->ymax - t->v_char;
-
- --- 1262,1272 -----
- (void) (*t->justify_text)(LEFT);
- (void) (*t->text_angle)(0);
- /* test tic size */
- ! (*t->move)(xmax/2+t->h_tic*2,0);
- ! (*t->vector)(xmax/2+t->h_tic*2,t->v_tic);
- ! (*t->move)(xmax/2,t->v_tic*2);
- ! (*t->vector)(xmax/2+t->h_tic,t->v_tic*2);
- ! (*t->put_text)(xmax/2+t->h_tic*2,t->v_tic*2+t->v_char/2,"test tics");
- /* test line and point types */
- x = xmax - t->h_char*4 - t->h_tic*4;
- y = ymax - t->v_char;
- ***************
- *** 1309,1316
- (*t->vector)(t->xmax/2+t->h_tic,t->v_tic*2);
- (*t->put_text)(t->xmax/2+t->h_tic*2,t->v_tic*2+t->v_char/2,"test tics");
- /* test line and point types */
- ! x = t->xmax - t->h_char*4 - t->h_tic*4;
- ! y = t->ymax - t->v_char;
- for ( i = -2; y > t->v_char; i++ ) {
- (*t->linetype)(i);
- (void) sprintf(label,"%d",i);
-
- --- 1268,1275 -----
- (*t->vector)(xmax/2+t->h_tic,t->v_tic*2);
- (*t->put_text)(xmax/2+t->h_tic*2,t->v_tic*2+t->v_char/2,"test tics");
- /* test line and point types */
- ! x = xmax - t->h_char*4 - t->h_tic*4;
- ! y = ymax - t->v_char;
- for ( i = -2; y > t->v_char; i++ ) {
- (*t->linetype)(i);
- (void) sprintf(label,"%d",i);
- ***************
- *** 1326,1333
- }
- /* test some arrows */
- (*t->linetype)(0);
- ! x = t->xmax/4;
- ! y = t->ymax/4;
- xl = t->h_tic*5;
- yl = t->v_tic*5;
- (*t->arrow)(x,y,x+xl,y);
-
- --- 1285,1292 -----
- }
- /* test some arrows */
- (*t->linetype)(0);
- ! x = xmax/4;
- ! y = ymax/4;
- xl = t->h_tic*5;
- yl = t->v_tic*5;
- (*t->arrow)(x,y,x+xl,y);
- ***************
- *** 1341,1343
- /* and back into text mode */
- (*t->text)();
- }
-
- --- 1300,1519 -----
- /* and back into text mode */
- (*t->text)();
- }
- +
- +
- + #ifdef PC
- + /* output for some terminal types must be binary to stop non Unix computers
- + changing \n to \r\n.
- + If the output is not STDOUT, the following code reopens outfile
- + with binary mode. */
- + void
- + reopen_binary()
- + {
- + char filename[MAX_ID_LEN+1];
- +
- + 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
- +
- + #ifdef VMS
- + /* these are needed to modify terminal characteristics */
- + #include <descrip.h>
- + #include <iodef.h>
- + #include <ttdef.h>
- + #include <tt2def.h>
- + #include <dcdef.h>
- + #include <ssdef.h>
- + #include <stat.h>
- + #include <fab.h>
- + static unsigned short chan;
- + static int old_char_buf[3], cur_char_buf[3];
- + $DESCRIPTOR(sysoutput_desc,"SYS$OUTPUT");
- +
- + char *vms_init()
- + /*
- + * Determine if we have a regis terminal
- + * and save terminal characteristics
- + */
- + {
- + /* Save terminal characteristics in old_char_buf and
- + initialise cur_char_buf to current settings. */
- + int i;
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + sys$qiow(0,chan,IO$_SENSEMODE,0,0,0,old_char_buf,12,0,0,0,0);
- + for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
- + sys$dassgn(chan);
- +
- + /* Test if terminal is regis */
- + if ((cur_char_buf[2] & TT2$M_REGIS) == TT2$M_REGIS) return("regis");
- + return(NULL);
- + }
- +
- + void
- + vms_reset()
- + /* set terminal to original state */
- + {
- + int i;
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + sys$qiow(0,chan,IO$_SETMODE,0,0,0,old_char_buf,12,0,0,0,0);
- + for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
- + sys$dassgn(chan);
- + }
- +
- + void
- + term_mode_tek()
- + /* set terminal mode to tektronix */
- + {
- + long status;
- + if (outfile != stdout) return; /* don't modify if not stdout */
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + cur_char_buf[0] = 0x004A0000 | DC$_TERM | (TT$_TEK401X<<8);
- + cur_char_buf[1] = (cur_char_buf[1] & 0x00FFFFFF) | 0x18000000;
- +
- + cur_char_buf[1] &= ~TT$M_CRFILL;
- + cur_char_buf[1] &= ~TT$M_ESCAPE;
- + cur_char_buf[1] &= ~TT$M_HALFDUP;
- + cur_char_buf[1] &= ~TT$M_LFFILL;
- + cur_char_buf[1] &= ~TT$M_MECHFORM;
- + cur_char_buf[1] &= ~TT$M_NOBRDCST;
- + cur_char_buf[1] &= ~TT$M_NOECHO;
- + cur_char_buf[1] &= ~TT$M_READSYNC;
- + cur_char_buf[1] &= ~TT$M_REMOTE;
- + cur_char_buf[1] |= TT$M_LOWER;
- + cur_char_buf[1] |= TT$M_TTSYNC;
- + cur_char_buf[1] |= TT$M_WRAP;
- + cur_char_buf[1] &= ~TT$M_EIGHTBIT;
- + cur_char_buf[1] &= ~TT$M_MECHTAB;
- + cur_char_buf[1] &= ~TT$M_SCOPE;
- + cur_char_buf[1] |= TT$M_HOSTSYNC;
- +
- + cur_char_buf[2] &= ~TT2$M_APP_KEYPAD;
- + cur_char_buf[2] &= ~TT2$M_BLOCK;
- + cur_char_buf[2] &= ~TT2$M_DECCRT3;
- + cur_char_buf[2] &= ~TT2$M_LOCALECHO;
- + cur_char_buf[2] &= ~TT2$M_PASTHRU;
- + cur_char_buf[2] &= ~TT2$M_REGIS;
- + cur_char_buf[2] &= ~TT2$M_SIXEL;
- + cur_char_buf[2] |= TT2$M_BRDCSTMBX;
- + cur_char_buf[2] |= TT2$M_EDITING;
- + cur_char_buf[2] |= TT2$M_INSERT;
- + cur_char_buf[2] |= TT2$M_PRINTER;
- + cur_char_buf[2] &= ~TT2$M_ANSICRT;
- + cur_char_buf[2] &= ~TT2$M_AVO;
- + cur_char_buf[2] &= ~TT2$M_DECCRT;
- + cur_char_buf[2] &= ~TT2$M_DECCRT2;
- + cur_char_buf[2] &= ~TT2$M_DRCS;
- + cur_char_buf[2] &= ~TT2$M_EDIT;
- + cur_char_buf[2] |= TT2$M_FALLBACK;
- +
- + status = sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
- + if (status == SS$_BADPARAM) {
- + /* terminal fallback utility not installed on system */
- + cur_char_buf[2] &= ~TT2$M_FALLBACK;
- + sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
- + }
- + else {
- + if (status != SS$_NORMAL)
- + lib$signal(status,0,0);
- + }
- + sys$dassgn(chan);
- + }
- +
- + void
- + term_mode_native()
- + /* set terminal mode back to native */
- + {
- + int i;
- + if (outfile != stdout) return; /* don't modify if not stdout */
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + sys$qiow(0,chan,IO$_SETMODE,0,0,0,old_char_buf,12,0,0,0,0);
- + for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
- + sys$dassgn(chan);
- + }
- +
- + void
- + term_pasthru()
- + /* set terminal mode pasthru */
- + {
- + if (outfile != stdout) return; /* don't modify if not stdout */
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + cur_char_buf[2] |= TT2$M_PASTHRU;
- + sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
- + sys$dassgn(chan);
- + }
- +
- + void
- + term_nopasthru()
- + /* set terminal mode nopasthru */
- + {
- + if (outfile != stdout) return; /* don't modify if not stdout */
- + sys$assign(&sysoutput_desc,&chan,0,0);
- + cur_char_buf[2] &= ~TT2$M_PASTHRU;
- + sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
- + sys$dassgn(chan);
- + }
- +
- + void
- + reopen_binary()
- + /* close the file outfile outfile and reopen it with binary type
- + if not already done or outfile == stdout */
- + {
- + stat_t stat_buf;
- + char filename[MAX_ID_LEN+1];
- + if (outfile != stdout) { /* don't modify if not stdout */
- + if (!fstat(fileno(outfile),&stat_buf)) {
- + if (stat_buf.st_fab_rfm != FAB$C_FIX) {
- + /* modify only if not already done */
- + (void) fclose(outfile);
- + (void) strcpy(filename,outstr+1); /* remove quotes */
- + filename[strlen(filename)-1] = '\0';
- + (void) delete(filename);
- + if ((outfile = fopen(filename,"wb","rfm=fix","bls=512","mrs=512"))
- + == (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);
- + }
- + }
- + }
- + }
- + else{
- + os_error("cannot reopen file with binary type; output remains ascii",
- + NO_CARET);
- + }
- + }
- + }
- +
- + void
- + fflush_binary()
- + {
- + typedef short int INT16; /* signed 16-bit integers */
- + register INT16 k; /* loop index */
- + if (outfile != stdout) {
- + /* Stupid VMS fflush() raises error and loses last data block
- + unless it is full for a fixed-length record binary file.
- + Pad it here with NULL characters. */
- + for (k = (INT16)((*outfile)->_cnt); k > 0; --k)
- + putc('\0',outfile);
- + fflush(outfile);
- + }
- + }
- + #endif
- diff -cr ./term.h ../gnuplot2.02/term.h
- *** ./term.h Tue Sep 18 14:59:21 1990
- --- ../gnuplot2.02/term.h Tue Dec 11 16:41:23 1990
- ***************
- *** 39,45
-
- #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) */
-
- --- 39,45 -----
-
- #define AED /* AED 512 and AED 767 */
- #define BITGRAPH /* BBN BitGraph */
- ! /* #define CGI /* SCO CGI */
- /* #define IRIS4D /* IRIS4D series computer */
- #define KERMIT /* MS-Kermit Tektronix 4010 emulator */
- /* #define FIG /* Fig graphics language (requires object.h from TransFig) */
- ***************
- *** 50,55
- #define TEK /* Tektronix 4010, and probably others */
- /* #define UNIXPC /* unixpc (ATT 3b1 or ATT 7300) */
- /* #define UNIXPLOT /* unixplot */
- /* #define X11 /* X11R4 window system */
-
- #endif
-
- --- 50,56 -----
- #define TEK /* Tektronix 4010, and probably others */
- /* #define UNIXPC /* unixpc (ATT 3b1 or ATT 7300) */
- /* #define UNIXPLOT /* unixplot */
- + #define VTTEK /* VT-like tek40xx emulators */
- /* #define X11 /* X11R4 window system */
-
- #endif
- ***************
- *** 64,69
- #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 */
-
- --- 65,71 -----
- #define HP26 /* HP2623A and maybe others */
- #define HP75 /* HP7580, and probably other HPs */
- #define HPGL /* HP7475, HP7220 plotters, and (hopefully) lots of others */
- + #define HPLJII /* HP LaserJet II */
- #define IMAGEN /* Imagen laser printers (300dpi) (requires -Iterm also) */
- #define LATEX /* LATEX picture environment */
- #define NEC /* NEC CP6 pinwriter printer */
- ***************
- *** 68,74
- #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 */
-
- --- 70,76 -----
- #define LATEX /* LATEX picture environment */
- #define NEC /* NEC CP6 pinwriter printer */
- #define POSTSCRIPT /* Postscript */
- ! #define PRESCRIBE /* Kyocera Laser printer */
- #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 */
- Common subdirectories: ./translate and ../gnuplot2.02/translate
- diff -cr ./util.c ../gnuplot2.02/util.c
- *** ./util.c Tue Mar 27 09:02:13 1990
- --- ../gnuplot2.02/util.c Tue Dec 4 12:09:17 1990
- ***************
- *** 324,329
- }
- int_error("unknown type in real()",NO_CARET);
- /* NOTREACHED */
- }
-
-
-
- --- 324,330 -----
- }
- int_error("unknown type in real()",NO_CARET);
- /* NOTREACHED */
- + return((double)0.0);
- }
-
-
- ***************
- *** 339,344
- }
- int_error("unknown type in real()",NO_CARET);
- /* NOTREACHED */
- }
-
-
-
- --- 340,346 -----
- }
- int_error("unknown type in real()",NO_CARET);
- /* NOTREACHED */
- + return((double)0.0);
- }
-
-
- ***************
- *** 360,365
- }
- int_error("unknown type in magnitude()",NO_CARET);
- /* NOTREACHED */
- }
-
-
-
- --- 362,368 -----
- }
- int_error("unknown type in magnitude()",NO_CARET);
- /* NOTREACHED */
- + return((double)0.0);
- }
-
-
- ***************
- *** 385,390
- }
- int_error("unknown type in angle()",NO_CARET);
- /* NOTREACHED */
- }
-
-
-
- --- 388,394 -----
- }
- int_error("unknown type in angle()",NO_CARET);
- /* NOTREACHED */
- + return((double)0.0);
- }
-
-
- diff -cr ./version.c ../gnuplot2.02/version.c
- *** ./version.c Tue Sep 18 14:47:22 1990
- --- ../gnuplot2.02/version.c Wed Dec 19 09:24:06 1990
- ***************
- *** 1,6
- ! char version[] = "2.0";
- ! char patchlevel[] = "1";
- ! char date[] = "Tue Sep 18 14:46:32 EST 1990";
-
- /* override in Makefile */
- #ifndef CONTACT
-
- --- 1,6 -----
- ! char version[] = "2.0 ";
- ! char patchlevel[] = "2";
- ! char date[] = "Wed Dec 19 09:23:59 EST 1990";
-
- /* override in Makefile */
- #ifndef CONTACT
- diff -cr ./demo/param.demo ../gnuplot2.02/demo/param.demo
- *** ./demo/param.demo Fri Nov 23 17:50:22 1990
- --- ../gnuplot2.02/demo/param.demo Fri Nov 23 16:52:51 1990
- ***************
- *** 0
-
- --- 1,46 -----
- + #
- + # Show some of the new parametric capabilities.
- + #
- + set parametric
- + set dummy t
- + set autoscale
- + set samples 160
- + set title ""
- + plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x"
- + pause -1 "Hit return"
- +
- + plot sin(t)/t,t
- + pause -1 "Hit return"
- +
- + plot sin(t),cos(t)
- + pause -1 "Hit return"
- +
- + set xrange [-3:3]
- + set yrange [-3:3]
- + set title "Parametric Conic Sections"
- + plot -t,t,cos(t),cos(2*t),2*cos(t),sin(t),-cosh(t),sinh(t)
- + set title ""
- + pause -1 "Hit return"
- +
- + set xrange [-5:5]
- + set yrange [-5:5]
- + plot tan(t),t,t,tan(t)
- + pause -1 "Hit return"
- +
- + set trange [-3:3]
- + plot t,log(t),-t,log(t),sin(t),t**2
- + pause -1 "Hit return"
- +
- + set autoscale x
- + set yrange [-1.5:1.5]
- + set trange [0:10*pi]
- + plot sin(t)/t,cos(t)/t
- + pause -1 "Hit return"
- +
- + # undo what we've done above
- + set noparametric
- + set samples 160
- + set autoscale xy
- + set title ""
- + set offset 0,0,0,0
- + set key
- diff -cr ./demo/using.dat ../gnuplot2.02/demo/using.dat
- *** ./demo/using.dat Tue Nov 27 09:19:54 1990
- --- ../gnuplot2.02/demo/using.dat Mon Nov 26 02:15:31 1990
- ***************
- *** 0
-
- --- 1,168 -----
- + 891101 00 1.00 14 8.6 94.0
- + 891101 01 1.04 10 17.5 94.4
- + 891101 02 1.08 9 9.7 97.1
- + 891101 03 1.13 9 10.1 94.3
- + 891101 04 1.17 9 5.7 98.3
- + 891101 05 1.21 8 8.1 99.7
- + 891101 06 1.25 7 3.2 99.6
- + 891101 07 1.29 6 2.5 99.8
- + 891101 08 1.33 20 2.3 99.4
- + 891101 09 1.38 30 3.5 96.1
- + 891101 10 1.42 37 7.7 96.4
- + 891101 11 1.46 36 9.8 97.4
- + 891101 12 1.50 30 8.8 97.4
- + 891101 13 1.54 32 9.1 96.5
- + 891101 14 1.58 37 6.3 97.0
- + 891101 15 1.63 35 6.1 97.3
- + 891101 16 1.67 41 8.6 97.2
- + 891101 17 1.71 28 7.6 97.3
- + 891101 18 1.75 16 4.3 97.6
- + 891101 19 1.79 21 4.2 97.5
- + 891101 20 1.83 20 5.6 96.9
- + 891101 21 1.88 24 6.6 96.2
- + 891101 22 1.92 19 5.8 97.1
- + 891101 23 1.96 16 7.4 97.1
- + 891102 00 2.00 13 7.4 96.4
- + 891102 01 2.04 8 6.6 95.6
- + 891102 02 2.08 6 7.4 94.1
- + 891102 03 2.13 6 6.4 95.9
- + 891102 04 2.17 7 6.4 95.5
- + 891102 05 2.21 6 6.7 95.5
- + 891102 06 2.25 6 6.3 94.6
- + 891102 07 2.29 7 6.5 93.1
- + 891102 08 2.33 15 6.5 92.8
- + 891102 09 2.38 22 7.2 93.2
- + 891102 10 2.42 31 9.1 93.9
- + 891102 11 2.46 37 11.0 95.6
- + 891102 12 2.50 40 9.8 98.7
- + 891102 13 2.54 45 9.5 97.3
- + 891102 14 2.58 46 11.4 98.5
- + 891102 15 2.63 46 11.9 99.1
- + 891102 16 2.67 43 13.0 98.8
- + 891102 17 2.71 28 14.5 99.1
- + 891102 18 2.75 25 13.4 99.1
- + 891102 19 2.79 24 9.9 99.7
- + 891102 20 2.83 25 8.1 99.5
- + 891102 21 2.88 24 10.3 99.4
- + 891102 22 2.92 24 12.0 98.7
- + 891102 23 2.96 23 18.2 98.7
- + 891103 00 3.00 20 16.8 99.0
- + 891103 01 3.04 16 14.8 99.2
- + 891103 02 3.08 17 15.5 98.0
- + 891103 03 3.13 17 14.4 99.4
- + 891103 04 3.17 16 14.4 99.4
- + 891103 05 3.21 14 11.3 99.4
- + 891103 06 3.25 13 8.0 99.7
- + 891103 07 3.29 13 6.1 99.9
- + 891103 08 3.33 18 6.4 99.8
- + 891103 09 3.38 31 6.5 98.9
- + 891103 10 3.42 39 7.5 99.0
- + 891103 11 3.46 37 9.1 98.8
- + 891103 12 3.50 33 9.0 99.2
- + 891103 13 3.54 40 10.4 98.7
- + 891103 14 3.58 45 12.9 98.3
- + 891103 15 3.63 45 13.8 98.5
- + 891103 16 3.67 37 16.1 98.9
- + 891103 17 3.71 29 16.0 99.3 57
- + 891103 18 3.75 21 17.4 97.9 55
- + 891103 19 3.79 14 14.6 97.7
- + 891103 20 3.83 11 14.3 97.8 57
- + 891103 21 3.88 15 14.7 96.2 59
- + 891103 22 3.92 10 12.8 95.1 57
- + 891103 23 3.96 8 10.2 97.6
- + 891104 00 4.00 6 7.3 98.6
- + 891104 01 4.04 4 4.7 99.8
- + 891104 02 4.08 3 3.4 98.0
- + 891104 03 4.13 4 2.9 99.6
- + 891104 04 4.17 4 2.1 99.8
- + 891104 05 4.21 4 11.7 99.9
- + 891104 06 4.25 4 4.5 99.9
- + 891104 07 4.29 4 1.6 88.4
- + 891104 08 4.33 4 1.3 65.2
- + 891104 09 4.38 7 1.4 71.4
- + 891104 10 4.42 9 1.3 70.7
- + 891104 11 4.46 14 8.1 99.5
- + 891104 12 4.50 12 4.2 75.3
- + 891104 13 4.54 18 10.9 95.3
- + 891104 14 4.58 16 7.1 87.6
- + 891104 15 4.63 18 3.3 98.9
- + 891104 16 4.67 15 3.4 99.6
- + 891104 17 4.71 8 2.4 99.9
- + 891104 18 4.75 8 2.2 99.8
- + 891104 19 4.79 11 2.2 99.7
- + 891104 20 4.83 14 2.3 99.7
- + 891104 21 4.88 13 2.5 99.7
- + 891104 22 4.92 10 3.1 99.8
- + 891104 23 4.96 12 4.5 99.7
- + 891105 00 5.00 9 4.8 99.7
- + 891105 01 5.04 8 4.9 99.8
- + 891105 02 5.08 5 5.7 97.5
- + 891105 03 5.13 5 5.2 97.6
- + 891105 04 5.17 4 3.3 85.9
- + 891105 05 5.21 5 1.2 71.4
- + 891105 06 5.25 5 1.1 61.8
- + 891105 07 5.29 5 1.0 71.8
- + 891105 08 5.33 5 1.0 55.7
- + 891105 09 5.38 6 1.0 62.2
- + 891105 10 5.42 7 1.1 61.9
- + 891105 11 5.46 9 1.4 65.6
- + 891105 12 5.50 14 2.8 99.6
- + 891105 13 5.54 16 2.1 94.0
- + 891105 14 5.58 16 2.2 85.1
- + 891105 15 5.63 17 2.5 99.7
- + 891105 16 5.67 19 2.2 90.8
- + 891105 17 5.71 16 1.5 61.3
- + 891105 18 5.75 12 1.6 71.8
- + 891105 19 5.79 16 2.8 98.3
- + 891105 20 5.83 17 3.3 88.8
- + 891105 21 5.88 18 1.3 56.5
- + 891105 22 5.92 20 0.9 38.8
- + 891105 23 5.96 12 1.1 50.8
- + 891106 00 6.00 10 2.2 68.4
- + 891106 01 6.04 8 1.2 54.4
- + 891106 02 6.08 8 1.6 58.4
- + 891106 03 6.13 7 1.1 52.2
- + 891106 04 6.17 6 1.1 56.4
- + 891106 05 6.21 6 1.2 55.7
- + 891106 06 6.25 6 1.0 46.2
- + 891106 07 6.29 7 0.5 7.2
- + 891106 08 6.33 17 0.7 13.8
- + 891106 09 6.38 31 1.1 41.5
- + 891106 10 6.42 37 1.5 52.7
- + 891106 11 6.46 36 3.1 83.7
- + 891106 12 6.50 29 2.0 70.0
- + 891106 13 6.54 28 1.6 71.4
- + 891106 14 6.58 38 3.1 99.1
- + 891106 15 6.63 39 5.6 98.2
- + 891106 16 6.67 43 5.7 98.7 59
- + 891106 17 6.71 27 5.7 99.4
- + 891106 18 6.75 15 4.3 99.8
- + 891106 19 6.79 17 4.1 99.7
- + 891106 20 6.83 20 2.9 99.3
- + 891106 21 6.88 16 3.1 96.3
- + 891106 22 6.92 16 2.8 86.1
- + 891106 23 6.96 16 3.3 96.5
- + 891107 00 7.00 12 3.2 98.2
- + 891107 01 7.04 12 1.6 77.7
- + 891107 02 7.08 10 3.0 98.7
- + 891107 03 7.13 8 1.7 71.1
- + 891107 04 7.17 8 2.8 81.4
- + 891107 05 7.21 8 5.4 92.4
- + 891107 06 7.25 9 5.3 87.7
- + 891107 07 7.29 11 5.6 94.0
- + 891107 08 7.33 15 2.0 74.0
- + 891107 09 7.38 25 2.7 84.3
- + 891107 10 7.42 32 3.0 92.9
- + 891107 11 7.46 41 5.5 97.4
- + 891107 12 7.50 39 6.5 97.5
- + 891107 13 7.54 31 4.4 95.9
- + 891107 14 7.58 35 7.3 98.6
- + 891107 15 7.63 37 8.3 96.3
- + 891107 16 7.67 34 9.2 97.6
- + 891107 17 7.71 20 7.5 99.3
- + 891107 18 7.75 14 7.1 99.5
- + 891107 19 7.79 15 7.1 99.7
- + 891107 20 7.83 16 4.9 99.7
- + 891107 21 7.88 18 4.3 99.7
- + 891107 22 7.92 15 3.1 99.7
- + 891107 23 7.96 11 3.3 99.6
-