98 typedef char * caddr_t;
109 #ifdef PL_HAVE_UNISTD_H
117 #if !defined ( M_PI )
118 #define M_PI 3.14159265358979323846
135 #define FPOS_T fpos_t
136 #define pl_fsetpos( a, b ) fsetpos( a, b )
137 #define pl_fgetpos( a, b ) fgetpos( a, b )
141 #define pl_fsetpos( a, b ) fseek( a, *b, 0 )
142 #define pl_fgetpos( a, b ) ( -1L == ( *b = ftell( a ) ) )
181 #define free_mem( a ) \
182 if ( a != NULL ) { free( (void *) a ); a = NULL; }
186 #define plsetvar( a, b ) \
187 if ( b != PL_NOTSET ) a = b;
192 #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
195 #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
198 #define ABS( a ) ( ( a ) < 0 ? -( a ) : ( a ) )
201 #define ROUND( a ) (PLINT) ( ( a ) < 0. ? ( ( a ) - .5 ) : ( ( a ) + .5 ) )
204 #define BETW( ix, ia, ib ) ( ( ( ix ) <= ( ia ) && ( ix ) >= ( ib ) ) || ( ( ix ) >= ( ia ) && ( ix ) <= ( ib ) ) )
207 #define SSQR( a, b ) sqrt( ( a ) * ( a ) + ( b ) * ( b ) )
210 #define SIGN( a ) ( ( a ) < 0 ? -1 : 1 )
213 #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; }
218 #define PL_UNDEFINED -9999999
222 #ifdef PL_HAVE_SNPRINTF
225 #ifdef _PL_HAVE_SNPRINTF
226 #define snprintf _snprintf
227 #define snscanf _snscanf
228 #endif // _PL_HAVE_SNPRINTF
229 #else // !PL_HAVE_SNPRINTF
234 #define snprintf plsnprintf
235 #define snscanf plsnscanf
236 #endif // PL_HAVE_SNPRINTF
242 #if defined ( PL__HAVE_ISNAN )
243 # define isnan _isnan
244 # if defined ( _MSC_VER )
248 #if defined ( PL__HAVE_ISINF )
249 # define isinf _isinf
251 #if defined ( PL_HAVE_FINITE )
252 # define isfinite finite
254 #if defined ( PL__HAVE_FINITE )
255 # define isfinite _finite
260 #if !defined ( PL_HAVE_ISNAN )
261 # define isnan( x ) ( ( x ) != ( x ) )
263 #if !defined ( PL_HAVE_ISINF )
264 # define isinf( x ) ( !isnan( x ) && isnan( x - x ) )
266 #if !defined ( PL_HAVE_ISFINITE )
267 # define isfinite( x ) ( !isnan( x - x ) )
273 #define HUGE_VAL ( 1.0 / 0.0 )
282 #define PL_MAXPOLY 256 // Max segments in polyline or polygon
283 #define PL_NSTREAMS 100 // Max number of concurrent streams.
284 #define PL_RGB_COLOR -1 // A hack
287 #define GRAPHICS_MODE 1
289 #define PI 3.1415926535897932384
303 #define PIXELS_X 32768 // Number of virtual pixels in x
304 #define PIXELS_Y 24576 // Number of virtual pixels in x
305 #define DPMM 4. // dots per mm
306 #define VDPMM ( DPMM * 32 ) // virtual dots per mm
307 #define LPAGE_X ( PIXELS_X / VDPMM ) // virtual page length in x in mm (256)
308 #define LPAGE_Y ( PIXELS_Y / VDPMM ) // virtual page length in y in mm (192)
319 #define ORIENTATION 3
323 #define PLSTATE_WIDTH 1 // pen width
324 #define PLSTATE_COLOR0 2 // change to color in cmap 0
325 #define PLSTATE_COLOR1 3 // change to color in cmap 1
326 #define PLSTATE_FILL 4 // set area fill to a standard pattern
327 #define PLSTATE_CMAP0 5 // change to cmap 0
328 #define PLSTATE_CMAP1 6 // change to cmap 1
329 #define PLSTATE_CHR 7 // change character height
330 #define PLSTATE_SYM 8 // change symbol size
335 #define PLDI_MAP 0x01
336 #define PLDI_ORI 0x02
337 #define PLDI_PLT 0x04
338 #define PLDI_DEV 0x08
342 #ifndef PL_FILESIZE_KB
343 #define PL_FILESIZE_KB 1000
348 #define PLPLOT5_FONTS
351 #define PL_XFONT "plxtnd5.fnt"
352 #define PL_SFONT "plstnd5.fnt"
354 #define PL_XFONT "plxtnd4.fnt"
355 #define PL_SFONT "plstnd4.fnt"
397 #define PLPLOT_BIN_ENV "PLPLOT_BIN"
398 #define PLPLOT_LIB_ENV "PLPLOT_LIB"
399 #define PLPLOT_TCL_ENV "PLPLOT_TCL"
400 #define PLPLOT_HOME_ENV "PLPLOT_HOME"
403 #define PLPLOT_MAX_PATH 1024
484 PLFLT *affine_vectorA,
485 const PLFLT *affine_vectorB,
486 const PLFLT *affine_vectorC );
515 void ( *draw )(
short *,
short *,
PLINT ) );
522 void ( *draw )(
short *,
short *,
PLINT ) );
551 plexit(
const char *errormsg );
561 plwarn(
const char *errormsg );
566 plabort(
const char *errormsg );
731 #define LINE_ITEMS 20
880 plstrl(
const char *
string );
1218 plio_fread(
void *,
size_t,
size_t, FILE * );
1235 #ifdef ENABLE_DYNDRIVERS
1237 plGetDrvDir(
void );
1240 #ifdef PL_HAVE_FREETYPE
1248 plD_FreeType_Destroy(
PLStream * );
1251 pl_set_extended_cmap0(
PLStream *,
int,
int );
1271 #endif // __PLPLOTP_H__