Annotation of OpenXM_contrib/gnuplot/0PORTING, Revision 1.1
1.1 ! maekawa 1:
! 2: The following information is mainly geared towards people who want
! 3: to port gnuplot to new platforms not covered by the installation
! 4: instructions in 0INSTALL and INSTALL.gnu. Please do also read the
! 5: file CodeStyle.
! 6:
! 7: Some operating system dependent preprocessor symbols are defined near
! 8: the top of plot.h. If you add a new platform, some definitions must
! 9: probably be added to plot.h as well.
! 10:
! 11: Preprocessor Defines
! 12: ********************
! 13:
! 14: These #defines should be checked before compilation. There are many
! 15: makefiles provided as templates. You probably need these only if porting
! 16: to a new machine. The HAVE_XXX and NO_XXX defines should be taken care
! 17: of by configure if your platform supports GNU autoconf generated
! 18: configure shell scripts.
! 19:
! 20: THIS LIST IS SOMEWHAT OUT OF DATE NOW - CHECK configure.in, acconfig.h
! 21: and config.hin
! 22:
! 23: define file note
! 24: ------ ---- --------
! 25: HAVE_BCOPY Makefile define if you have bcopy() and no memcpy()
! 26: HAVE_LGAMMA Makefile define if you've got lgamma(3)
! 27: HAVE_GAMMA Makefile define if you've got gamma(3)
! 28: NO_MEMCPY Makefile define if your memcpy() is called bcopy()
! 29: NO_MEMSET Makefile define if you have bzero() but not memset()
! 30: PC Makefile define if compiling on a PClone
! 31: MSDOS Makefile define if compiling under MSDOS;
! 32: automatically defined by Microsoft C 5.10
! 33: DOS32 Makefile define for a 32-bit DOS extender (djgpp/emx)
! 34: WIN32 Makefile define for a 32-bit MS-Windows version
! 35: HELPFILE Makefile name including path of gnuplot.gih file.
! 36: VERYLARGE plot.h define to be largest coordinate number.
! 37: SHELL plot.h default shell to spawn if SHELL environment
! 38: variable not found at run-time
! 39: NOCWDRC Makefile define to inhibit check of ./.gnuplot
! 40: READLINE Makefile define if you want command-line editing
! 41: GNU_READLINE Makefile define if you are linking with gnu readline
! 42:
! 43: Header File Availability
! 44: ========================
! 45:
! 46: Generally, it is assumed that standard ANSI/ISO header files are available.
! 47: The code is protected against missing standard header files with
! 48: NO_XXX_H defines:
! 49:
! 50: NO_STRING_H string.h absent
! 51: NO_STDLIB_H stdlib.h absent
! 52: NO_ERRNO_H errno.h absent
! 53: NO_LIMITS_H limits.h absent
! 54: NO_LOCALE_H locale.h absent
! 55: NO_TIME_H time.h absent
! 56: NO_SYS_TYPES_H sys/types.h absent (not ANSI/ISO, but pretty standard)
! 57:
! 58: If non-standard header files are required, HAVE_XXX_H defines are used:
! 59:
! 60: HAVE_UNISTD_H
! 61: HAVE_LIBC_H (unistd.h alternative on NEXT)
! 62: HAVE_SGTTY_H needed if there is no termios.h
! 63: HAVE_SYS_BSDTYPES_H
! 64: HAVE_SYS_SELECT_H (needed for FD_* macros)
! 65: HAVE_SYS_STAT_H
! 66: HAVE_SYS_SYSTEMINFO_H
! 67: HAVE_TERMIOS_H
! 68: HAVE_VALUES_H needed if there is no limits.h
! 69:
! 70: Note that configure use the HAVE_XXXX_H form, though. The transformation
! 71: into NO_XXXX_H is done in syscfg.h. The same applies to function defines
! 72: (see below).
! 73:
! 74: Function Availability
! 75: =====================
! 76:
! 77: It is generally assumed that standard ANSI/ISO functions are available.
! 78: The code is protected against missing standard functions with NO_XXX defines:
! 79:
! 80: NO_ATEXIT - atexit() not available
! 81: NO_MEMCPY - memcpy() not available
! 82: NO_MEMSET - memset() not available
! 83: NO_SETVBUF - setvbuf() not available
! 84: NO_STRCHR - strchr() not available
! 85: NO_STRERROR - strerror() not available
! 86: NO_STRSTR - strstr() not available
! 87: NO_TEMPNAM - tempnam() not available
! 88:
! 89: If certain standard ANSI/ISO C functions are not available, two alternatives
! 90: come to mind: either try to achieve the same functionality without the
! 91: missing function, or provide a portable implementation. Examples for this
! 92: are in stdfn.c. See also stdfn.h.
! 93:
! 94: The following defines are used to ensure availability of certain
! 95: non-standard functions.
! 96:
! 97: #define function see file comments
! 98: -------------------------------------------------------------------
! 99: HAVE_ERF erf() specfun.c
! 100: HAVE_GAMMA gamma() specfun.c
! 101: HAVE_GETCWD getcwd() stdfn.h
! 102: HAVE_GETWD getwd() stdfn.h
! 103: HAVE_INDEX index() stdfn.h pre-ANSI version of strchr()
! 104: HAVE_LGAMMA lgamma() specfun.c prefered over gamma()
! 105: HAVE_ON_EXIT on_exit() term/x11.trm atexit() substitute on SunOS
! 106: HAVE_RINDEX rindex() stdfn.h pre-ANSI version of strrchr()
! 107: HAVE_SLEEP sleep() command.c
! 108: HAVE_SYSINFO sysinfo() gplt_x11.c SysV function to get and set
! 109: system information. Used
! 110: instead of gethostname().
! 111: HAVE_STRNCASECMP strncasecmp() stdfn.c
! 112: HAVE_STRNICMP strnicmp() stdfn.c
! 113: HAVE_TCGETATTR tcgetattr() readline.c
! 114:
! 115: Terminal Selection Options
! 116: ==========================
! 117:
! 118: These defines are used to include the drivers for various plotting
! 119: terminals, printers, and protocols that a given version of gnuplot can
! 120: access and the description of such for the help file.
! 121:
! 122:
! 123: define file note
! 124: ------ ---- --------
! 125: TERMFLAGS Various makefiles (obsolete under Unix; use configure instead)
! 126: the set of terminals you want, from below or
! 127: term.h
! 128: SHORT_TERMLIST term.h edit term.h to specify desired devices at
! 129: the beginning (instead of commenting out,
! 130: throughout the file, devices not desired.)
! 131:
! 132: ALL_TERM_DOC docs/termdoc.c on-line help documentation for all devices
! 133: rather than only for the drivers selected
! 134: in term.h.
! 135:
! 136:
! 137: The following, non-authoritative, list serves as a guide to the range
! 138: of devices that may be selected/deselected by editing term.h.
! 139:
! 140: AED AED 512 and AED 767
! 141: AIFM Adobe Illustrator Format
! 142: AMIGASCREEN Amiga custom screen
! 143: APOLLO Apollo Graphics Primitive Resource (resizable window)
! 144: ATARI AES, VDI, MultoTOS
! 145: ATT6300 PC with AT&T 6300 graphics
! 146: BITGRAPH BBN BitGraph
! 147: CGI SCO CGI, hcgi
! 148: COREL COREL! Draw Format
! 149: CORONA PC with Corona graphics 325
! 150: DEBUG Voluminous output for debugging to terminal
! 151: DJSVGA MSDOS SVGA with DJGPP compiler
! 152: DXY800A Roland DXY800A plotter
! 153: DUMB Printer or glass dumb terminal
! 154: DXF AutoCad (Release 10.x) dxf file format
! 155: EEPIC EEPIC-extended LaTeX driver, for EEPIC users
! 156: EGALIB PC with EGA/VGA graphics.
! 157: EMTEX LaTeX picture environment with emTeX specials
! 158: EMXVGA PC with VGA running DOS or OS/2
! 159: EPS180 Epson-LQ style 24-pin 180-dot per inch printers
! 160: EPS60 Epson-style 60-dot per inch printers
! 161: EPSONP Epson LX-800, Star NL-10, NX-1000 and lots of others
! 162: EXCL Talaris EXCL laser printer format
! 163: FIG Fig graphics language (requires object.h from TransFig)
! 164: GIF Gif output, requires special library
! 165: GPIC Gpic for groff
! 166: GPR Apollo Graphics Primitive Resource (fixed-size window)
! 167: HERCULES IBM PC/Clone with Hercules graphics board
! 168: HP2648 HP2648, HP2647
! 169: HP26 HP2623A and maybe others
! 170: HP500C HP Deskjet 500 C and maybe other Color Deskjets
! 171: HP75 HP7580, and probably other HPs
! 172: HPGL HP7475 and (hopefully) lots of others
! 173: HPLJII HP Laserjet II
! 174: HPPJ HP PaintJet
! 175: IMAGEN Imagen laser printers (300dpi) (requires -Iterm also)
! 176: IRIS IRIS4D series computer
! 177: KERMIT MS-DOS Kermit Tektronix 4010 emulator
! 178: LATEX LaTeX picture environment
! 179: LINUXVGA Linux PC with (s)vgalib
! 180: MF Metafont Format
! 181: MGR MGR window manager
! 182: MIF FrameMaker MIF 3.00 Format
! 183: MTOS Atari MiNT/MULTITOS/Magic Terminal
! 184: NEC NEC CP6 pinwriter printer
! 185: NEXT NeXTStep Window System (only grey scale)
! 186: OS2PM OS/2 Presentation Manager
! 187: PBM PBMPLUS pbm, pgm, ppm formats
! 188: PCL HP PCL5 (actually HPGL/2)
! 189: PNG Portable Network Graphics, requires separate library
! 190: POSTSCRIPT PostScript
! 191: PRESCRIBE Kyocera Laser printer
! 192: PSLATEX Postscript graphics, LaTeX labels and titles
! 193: PSTRICKS PSTRICKS 0.91 format
! 194: QMS QMS/QUIC laserprinter (Talaris 1200 and others)
! 195: REGIS ReGis graphics (vt125, vt220, vt240, Gigis...)
! 196: RGIP Redwood Graphics Interface Protocol
! 197: SELANAR Selanar
! 198: STARC Star Color Printer
! 199: SUN Sun Microsystems Workstation
! 200: T410X Tektronix 4106, 4107, 4109 and 420x terminals
! 201: TABLE Text output
! 202: TANDY60 Tandy DMP-130 series 60-dot per inch graphics
! 203: TEK Tektronix 4010, and probably others
! 204: TEXDRAW TeXDraw format (for LaTeX)
! 205: TGIF TGIF X11 Drawing Tool
! 206: TPIC Tpic specials for TeX
! 207: UNIXPC unixpc (ATT 3b1 or ATT 7300)
! 208: UNIXPLOT unixplot
! 209: V384 Vectrix 384 and tandy color printer
! 210: VTTEK VT like Tektronix 4010 emulator
! 211: VWS VAX Windowing System (UIS libraries)
! 212: X11 X11R4 window system
! 213:
! 214:
! 215: Platform Related Defines
! 216: ========================
! 217:
! 218: These #defines are defined automatically by various compilers or
! 219: makefiles, some gnuplot routines check these defines to implement
! 220: features found in the various environments. This list is certainly
! 221: incomplete.
! 222:
! 223: define note
! 224: ------ --------
! 225: ANSI_C if the compiler can handle ANSI prototypes
! 226: AMIGA_AC_5 defined for Manx Aztec C 5.2a on the Amiga.
! 227: AMIGA_SC_6_1 defined for SAS/C 6.1 or later versions on the Amiga.
! 228: __amigaos__ defined by gcc on AmigaOS.
! 229: AMIGA defined for all Amiga compilers.
! 230: apollo defined by Apollo's C compilers.
! 231: _CRAY defined by CRAY's C compiler.
! 232: __DECC defined by DEC C compiler under VMS (?)
! 233: __TURBOC__ defined automatically by Borland C++ 3.x.
! 234: unix defined by most unix C compilers.
! 235: vms (and VMS) defined by VMS C compilers.
! 236: __ZTC__ Zortech C compiler under MSDOS.
! 237: _Windows defined by Borland C++ 3.0 compiling for MS-Windows.
! 238: __WATCOMC__ defined automatically by Watcom C
! 239: __EMX__ defined by EMX gcc (available on DOS & OS/2).
! 240: OS2 defined by compilers under OS/2.
! 241:
! 242: Defines Used in Gnuplot
! 243: =======================
! 244:
! 245: The following defines are used to achieve better portability. Most of
! 246: them are wrappers.
! 247:
! 248: #define wraps/redefines see file comments
! 249: ------------------------------------------------------------------
! 250: GP_GETCWD getwd()/getcwd() alikes stdfn.h
! 251: GP_FARMALLOC faralloc()/malloc() alloc.c Windows environment
! 252: GP_FARREALLOC farrealloc()/realloc() alloc.c Windows environment
! 253: GP_SLEEP sleep() command.c
! 254: GP_SYSTEMINFO sysinfo()/gethostname() gplt_x11.c
! 255: GPFAR `far' compiler directive plot.h MSDOS and Win16
! 256: GPHUGE `huge' compiler directive plot.h MSDOS and Win16
! 257: GP_INLINE `__inline' directive plot.h
! 258: GPMAX max (a,b) plot.h
! 259: GPMIN min (a,b) plot.h
! 260:
! 261: The following symbols are defined when using DEBUG:
! 262:
! 263: DEBUG_WHERE prints filename and line number to stderr *without* linefeed
! 264: FPRINTF(a) uses DEBUG_WHERE, passes a to fprintf
! 265:
! 266: Usage example: FPRINTF((stderr, "function foo returned %d\n", bar));
! 267: Result: readline.c:620 function foo returned -1
! 268:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>