File: PORTING

package info (click to toggle)
gnuplot 4.0.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,396 kB
  • ctags: 6,623
  • sloc: ansic: 63,562; lisp: 5,011; cpp: 970; sh: 900; makefile: 756; objc: 647; asm: 539; csh: 297; awk: 235; pascal: 192; perl: 44
file content (231 lines) | stat: -rw-r--r-- 10,383 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

 The following information is mainly geared towards people who want
to port gnuplot to new platforms not covered by the installation
instructions in 0INSTALL and INSTALL.gnu. Please do also read the
file CodeStyle.

 We have tried to isolate most operating system dependent definitions
in the file syscfg.h. If you add a new platform, some definitions must
probably be added to syscfg.h as well.

Preprocessor Defines
********************

 These #defines should be checked before compilation. There are many
makefiles provided as templates. You probably need these only if porting
to a new machine. The HAVE_XXX defines should be taken care of by configure
if your platform supports GNU autoconf generated configure shell scripts.
If your platform/environment does not support configure, see Codestyle and
syscfg.h.

THIS LIST IS SOMEWHAT OUT OF DATE NOW - CHECK configure.in and
acconfig.h.

define      file            note
------      ----            --------
HAVE_BCOPY  Makefile        define if you have bcopy() and no memcpy()
HAVE_LGAMMA Makefile        define if you've got lgamma(3)
HAVE_GAMMA  Makefile        define if you've got gamma(3)
PC          Makefile        define if compiling on a PClone
MSDOS       Makefile        define if compiling under MSDOS;
                              automatically defined by Microsoft C 5.10
DOS32       Makefile        define for a 32-bit DOS extender (djgpp/emx)
WIN32       Makefile        define for a 32-bit MS-Windows version
HELPFILE    Makefile        name including path of gnuplot.gih file.
VERYLARGE   plot.h          define to be largest coordinate number.
SHELL       plot.h          default shell to spawn if SHELL environment
                              variable not found at run-time
NOCWDRC     Makefile        define to inhibit check of ./.gnuplot
READLINE    Makefile        define if you want command-line editing
HAVE_LIBREADLINE Makefile   define if you are linking with GNU readline

Header File Availability
========================

 It is generally assumed that standard ANSI/ISO header files are available.

Function Availability
=====================

 It is generally assumed that standard ANSI/ISO functions are available.

 If certain standard ANSI/ISO C functions are not available, two alternatives
come to mind: either try to achieve the same functionality without the
missing function, or provide a portable implementation. Examples for this
are in stdfn.c. See also stdfn.h. 

 The following defines are used to ensure availability of certain
non-standard functions.

 #define          function       see file        comments
-------------------------------------------------------------------
HAVE_ERF          erf()          specfun.c
HAVE_GAMMA        gamma()        specfun.c
HAVE_GETCWD       getcwd()       stdfn.h
HAVE_GETWD        getwd()        stdfn.h
HAVE_INDEX        index()        stdfn.h         pre-ANSI version of strchr()
HAVE_LGAMMA       lgamma()       specfun.c       prefered over gamma()
HAVE_ON_EXIT      on_exit()      term/x11.trm    atexit() substitute on SunOS
HAVE_RINDEX       rindex()       stdfn.h         pre-ANSI version of strrchr()
HAVE_SLEEP        sleep()        command.c
HAVE_SYSINFO      sysinfo()      gplt_x11.c      SysV function to get and set
                                                 system information. Used
                                                 instead of gethostname().
HAVE_STRNCASECMP  strncasecmp()  stdfn.c         non-case sensitive string
                                                 comparison
HAVE_STRNICMP     strnicmp()     stdfn.c         dto.
HAVE_TCGETATTR    tcgetattr()    readline.c

Terminal Selection Options
==========================

   These defines are used to include the drivers for various plotting 
terminals, printers, and protocols that a given version of gnuplot can 
access and the description of such for the help file.


define      file               note
------      ----               --------
TERMFLAGS   Various makefiles  (obsolete under Unix; use configure instead)
                               the set of terminals you want, from below or
                               term.h
SHORT_TERMLIST  term.h         edit term.h to specify desired devices at
                               the beginning (instead of commenting out, 
                               throughout the file, devices not desired.) 

ALL_TERM_DOC   docs/termdoc.c  on-line help documentation for all devices
                               rather than only for the drivers selected
                               in term.h.


   The following, non-authoritative, list serves as a guide to the range 
of devices that may be selected/deselected by editing term.h.

   AED         AED 512 and AED 767
   AIFM        Adobe Illustrator Format
   AMIGA       Amiga custom screen
   APOLLO      Apollo Graphics Primitive Resource (resizable window)
   ATARI       AES, VDI, MultoTOS
   ATT6300     PC with AT&T 6300 graphics
   BITGRAPH    BBN BitGraph
   CGI         SCO CGI, hcgi
   COREL       COREL! Draw Format
   CORONA      PC with Corona graphics 325
   DEBUG       Voluminous output for debugging to terminal
   DJSVGA      MSDOS SVGA with DJGPP compiler
   DXY800A     Roland DXY800A plotter
   DUMB        Printer or glass dumb terminal
   DXF         AutoCad (Release 10.x) dxf file format
   EEPIC       EEPIC-extended LaTeX driver, for EEPIC users
   EGALIB      PC with EGA/VGA graphics.
   EMTEX       LaTeX picture environment with emTeX specials
   EMXVGA      PC with VGA running DOS or OS/2
   EPS180      Epson-LQ style 24-pin 180-dot per inch printers
   EPS60       Epson-style 60-dot per inch printers
   EPSONP      Epson LX-800, Star NL-10, NX-1000 and lots of others
   EXCL        Talaris EXCL laser printer format
   FIG         Fig graphics language (requires object.h from TransFig)
   GIF         Gif output, requires special library
   GPIC        Gpic for groff
   GPR         Apollo Graphics Primitive Resource (fixed-size window)
   HERCULES    IBM PC/Clone with Hercules graphics board
   HP2648      HP2648, HP2647
   HP26        HP2623A and maybe others
   HP500C      HP Deskjet 500 C and maybe other Color Deskjets
   HP75        HP7580, and probably other HPs
   HPGL        HP7475 and (hopefully) lots of others
   HPLJII      HP Laserjet II
   HPPJ        HP PaintJet
   IMAGEN      Imagen laser printers (300dpi) (requires -Iterm also)
   IRIS        IRIS4D series computer
   KERMIT      MS-DOS Kermit Tektronix 4010 emulator
   LATEX       LaTeX picture environment
   LINUXVGA    Linux PC with (s)vgalib
   MF          Metafont Format
   MGR         MGR window manager
   MIF         FrameMaker MIF 3.00 Format
   MTOS        Atari MiNT/MULTITOS/Magic Terminal
   NEC         NEC CP6 pinwriter printer
   NEXT        NeXTStep Window System (only grey scale)
   OS2PM       OS/2 Presentation Manager
   PBM         PBMPLUS pbm, pgm, ppm formats
   PCL         HP PCL5 (actually  HPGL/2)
   PNG         Portable Network Graphics, requires separate library
   POSTSCRIPT  PostScript
   PRESCRIBE   Kyocera Laser printer
   PSLATEX     Postscript graphics, LaTeX labels and titles
   PSTRICKS    PSTRICKS 0.91 format
   QMS         QMS/QUIC laserprinter (Talaris 1200 and others)
   REGIS       ReGis graphics (vt125, vt220, vt240, Gigis...)
   RGIP        Redwood Graphics Interface Protocol
   SELANAR     Selanar
   STARC       Star Color Printer
   SUN         Sun Microsystems Workstation
   T410X       Tektronix 4106, 4107, 4109 and 420x terminals
   TABLE       Text output
   TANDY60     Tandy DMP-130 series 60-dot per inch graphics
   TEK         Tektronix 4010, and probably others
   TEXDRAW     TeXDraw format (for LaTeX)
   TGIF        TGIF X11 Drawing Tool
   TPIC        Tpic specials for TeX
   UNIXPC      unixpc (ATT 3b1 or ATT 7300)
   UNIXPLOT    unixplot
   V384        Vectrix 384 and tandy color printer
   VTTEK       VT like Tektronix 4010 emulator
   VWS         VAX Windowing System  (UIS libraries)
   X11         X11R4 window system


Platform Related Defines
========================

 These #defines are defined automatically by various compilers or
makefiles, some gnuplot routines check these defines to implement
features found in the various environments. This list is certainly
incomplete.

define        note
------        --------
AMIGA_AC_5    defined for Manx Aztec C 5.2a on the Amiga.
AMIGA_SC_6_1  defined for SAS/C 6.1 or later versions on the Amiga.
__amigaos__   defined by gcc on AmigaOS.
AMIGA         defined for all Amiga compilers.
apollo        defined by Apollo's C compilers.
_CRAY         defined by CRAY's C compiler.
__DECC        defined by DEC C compiler under VMS (?)
__TURBOC__    defined automatically by  Borland C++ 3.x.
unix          defined by most unix C compilers.
vms           (and VMS) defined by VMS C compilers.
__ZTC__       Zortech C compiler under MSDOS.
_Windows      defined by Borland C++ 3.0 compiling for MS-Windows.
__WATCOMC__   defined automatically by  Watcom C
__EMX__       defined by EMX gcc (available on DOS & OS/2).
OS2           to be defined by compilers under OS/2.

Defines Used in Gnuplot
=======================

 The following defines are used to achieve better portability. Most of
them are wrappers.

 #define          wraps/redefines            see file    comments
------------------------------------------------------------------
GP_GETCWD         getwd()/getcwd() alikes    stdfn.h
GP_FARMALLOC      faralloc()/malloc()        alloc.c     Windows environment
GP_FARREALLOC     farrealloc()/realloc()     alloc.c     Windows environment
GP_SLEEP          sleep()                    command.c
GP_SYSTEMINFO     sysinfo()/gethostname()    gplt_x11.c
GPFAR             `far' compiler directive   plot.h      MSDOS and Win16
GPHUGE            `huge' compiler directive  plot.h      MSDOS and Win16
GP_INLINE         `__inline' directive       plot.h
GPMAX             max (a,b)                  plot.h
GPMIN             min (a,b)                  plot.h

 The following symbols are defined when using DEBUG:

DEBUG_WHERE       prints filename and line number to stderr *without* linefeed
FPRINTF(a)        uses DEBUG_WHERE, passes a to fprintf

 Usage example: FPRINTF((stderr, "function foo returned %d\n", bar));
 Result:        readline.c:620 function foo returned -1