102 typedef char * caddr_t;
113 #ifdef PL_HAVE_UNISTD_H
121 #if !defined ( M_PI )
122 #define M_PI 3.14159265358979323846
139 #define FPOS_T fpos_t
140 #define pl_fsetpos( a, b ) fsetpos( a, b )
141 #define pl_fgetpos( a, b ) fgetpos( a, b )
145 #define pl_fsetpos( a, b ) fseek( a, *b, 0 )
146 #define pl_fgetpos( a, b ) ( -1L == ( *b = ftell( a ) ) )
185 #define free_mem( a ) \
186 if ( a != NULL ) { free( (void *) a ); a = NULL; }
190 #define plsetvar( a, b ) \
191 if ( b != PL_NOTSET ) a = b;
196 #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
199 #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
202 #define ABS( a ) ( ( a ) < 0 ? -( a ) : ( a ) )
205 #define ROUND( a ) (PLINT) ( ( a ) < 0. ? ( ( a ) - .5 ) : ( ( a ) + .5 ) )
208 #define BETW( ix, ia, ib ) ( ( ( ix ) <= ( ia ) && ( ix ) >= ( ib ) ) || ( ( ix ) >= ( ia ) && ( ix ) <= ( ib ) ) )
211 #define SSQR( a, b ) sqrt( ( a ) * ( a ) + ( b ) * ( b ) )
214 #define SIGN( a ) ( ( a ) < 0 ? -1 : 1 )
217 #define TRANSFORM( x, y, xnew, ynew ) if ( plsc->coordinate_transform ) { plsc->coordinate_transform( ( x ), ( y ), ( xnew ), ( ynew ), plsc->coordinate_transform_data ); } else { *xnew = x; *ynew = y; }
222 #define PL_UNDEFINED -9999999
226 #ifdef PL_HAVE_SNPRINTF
229 #ifdef _PL_HAVE_SNPRINTF
230 #define snprintf _snprintf
231 #define snscanf _snscanf
232 #endif // _PL_HAVE_SNPRINTF
233 #else // !PL_HAVE_SNPRINTF
238 #define snprintf plsnprintf
239 #define snscanf plsnscanf
240 #endif // PL_HAVE_SNPRINTF
246 #if defined ( PL__HAVE_ISNAN )
247 # define isnan _isnan
248 # if defined ( _MSC_VER )
252 #if defined ( PL__HAVE_ISINF )
253 # define isinf _isinf
255 #if defined ( PL_HAVE_FINITE )
256 # define isfinite finite
258 #if defined ( PL__HAVE_FINITE )
259 # define isfinite _finite
264 #if !defined ( PL_HAVE_ISNAN )
265 # define isnan( x ) ( ( x ) != ( x ) )
267 #if !defined ( PL_HAVE_ISINF )
268 # define isinf( x ) ( !isnan( x ) && isnan( x - x ) )
270 #if !defined ( PL_HAVE_ISFINITE )
271 # define isfinite( x ) ( !isnan( x - x ) )
277 #define HUGE_VAL ( 1.0 / 0.0 )
286 #define PL_MAXPOLY 256 // Max segments in polyline or polygon
287 #define PL_NSTREAMS 100 // Max number of concurrent streams.
288 #define PL_RGB_COLOR -1 // A hack
291 #define GRAPHICS_MODE 1
293 #define PI 3.1415926535897932384
307 #define PIXELS_X 32768 // Number of virtual pixels in x
308 #define PIXELS_Y 24576 // Number of virtual pixels in x
309 #define DPMM 4. // dots per mm
310 #define VDPMM ( DPMM * 32 ) // virtual dots per mm
311 #define LPAGE_X ( PIXELS_X / VDPMM ) // virtual page length in x in mm (256)
312 #define LPAGE_Y ( PIXELS_Y / VDPMM ) // virtual page length in y in mm (192)
323 #define ORIENTATION 3
327 #define PLSTATE_WIDTH 1 // pen width
328 #define PLSTATE_COLOR0 2 // change to color in cmap 0
329 #define PLSTATE_COLOR1 3 // change to color in cmap 1
330 #define PLSTATE_FILL 4 // set area fill to a standard pattern
331 #define PLSTATE_CMAP0 5 // change to cmap 0
332 #define PLSTATE_CMAP1 6 // change to cmap 1
333 #define PLSTATE_CHR 7 // change character height
334 #define PLSTATE_SYM 8 // change symbol size
339 #define PLDI_MAP 0x01
340 #define PLDI_ORI 0x02
341 #define PLDI_PLT 0x04
342 #define PLDI_DEV 0x08
346 #ifndef PL_FILESIZE_KB
347 #define PL_FILESIZE_KB 1000
352 #define PLPLOT5_FONTS
355 #define PL_XFONT "plxtnd5.fnt"
356 #define PL_SFONT "plstnd5.fnt"
358 #define PL_XFONT "plxtnd4.fnt"
359 #define PL_SFONT "plstnd4.fnt"
401 #define PLPLOT_BIN_ENV "PLPLOT_BIN"
402 #define PLPLOT_LIB_ENV "PLPLOT_LIB"
403 #define PLPLOT_TCL_ENV "PLPLOT_TCL"
404 #define PLPLOT_HOME_ENV "PLPLOT_HOME"
407 #define PLPLOT_MAX_PATH 1024
488 PLFLT *affine_vectorA,
489 const PLFLT *affine_vectorB,
490 const PLFLT *affine_vectorC );
519 void ( *draw )(
short *,
short *,
PLINT ) );
526 void ( *draw )(
short *,
short *,
PLINT ) );
555 plexit(
const char *errormsg );
565 plwarn(
const char *errormsg );
570 plabort(
const char *errormsg );
735 #define LINE_ITEMS 20
884 plstrl(
const char *
string );
1217 plio_fread(
void *,
size_t,
size_t, FILE * );
1234 #ifdef ENABLE_DYNDRIVERS
1236 plGetDrvDir(
void );
1239 #ifdef PL_HAVE_FREETYPE
1247 plD_FreeType_Destroy(
PLStream * );
1250 pl_set_extended_cmap0(
PLStream *,
int,
int );
1270 #endif // __PLPLOTP_H__