99 typedef char * caddr_t;
110 #ifdef PL_HAVE_UNISTD_H
118 #if !defined ( M_PI )
119 #define M_PI 3.14159265358979323846
136 #define FPOS_T fpos_t
137 #define pl_fsetpos( a, b ) fsetpos( a, b )
138 #define pl_fgetpos( a, b ) fgetpos( a, b )
142 #define pl_fsetpos( a, b ) fseek( a, *b, 0 )
143 #define pl_fgetpos( a, b ) ( -1L == ( *b = ftell( a ) ) )
182 #define free_mem( a ) \
183 if ( a != NULL ) { free( (void *) a ); a = NULL; }
187 #define plsetvar( a, b ) \
188 if ( b != PL_NOTSET ) a = b;
193 #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
196 #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
199 #define ABS( a ) ( ( a ) < 0 ? -( a ) : ( a ) )
202 #define ROUND( a ) (PLINT) ( ( a ) < 0. ? ( ( a ) - .5 ) : ( ( a ) + .5 ) )
205 #define BETW( ix, ia, ib ) ( ( ( ix ) <= ( ia ) && ( ix ) >= ( ib ) ) || ( ( ix ) >= ( ia ) && ( ix ) <= ( ib ) ) )
208 #define SSQR( a, b ) sqrt( ( a ) * ( a ) + ( b ) * ( b ) )
211 #define SIGN( a ) ( ( a ) < 0 ? -1 : 1 )
214 #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; }
219 #define PL_UNDEFINED -9999999
223 #ifdef PL_HAVE_SNPRINTF
226 #ifdef _PL_HAVE_SNPRINTF
227 #define snprintf _snprintf
228 #define snscanf _snscanf
229 #endif // _PL_HAVE_SNPRINTF
230 #else // !PL_HAVE_SNPRINTF
235 #define snprintf plsnprintf
236 #define snscanf plsnscanf
237 #endif // PL_HAVE_SNPRINTF
243 #if defined ( PL__HAVE_ISNAN )
244 # define isnan _isnan
245 # if defined ( _MSC_VER )
249 #if defined ( PL__HAVE_ISINF )
250 # define isinf _isinf
252 #if defined ( PL_HAVE_FINITE )
253 # define isfinite finite
255 #if defined ( PL__HAVE_FINITE )
256 # define isfinite _finite
261 #if !defined ( PL_HAVE_ISNAN )
262 # define isnan( x ) ( ( x ) != ( x ) )
264 #if !defined ( PL_HAVE_ISINF )
265 # define isinf( x ) ( !isnan( x ) && isnan( x - x ) )
267 #if !defined ( PL_HAVE_ISFINITE )
268 # define isfinite( x ) ( !isnan( x - x ) )
274 #define HUGE_VAL ( 1.0 / 0.0 )
283 #define PL_MAXPOLY 256 // Max segments in polyline or polygon
284 #define PL_NSTREAMS 100 // Max number of concurrent streams.
285 #define PL_RGB_COLOR -1 // A hack
288 #define GRAPHICS_MODE 1
290 #define PI 3.1415926535897932384
304 #define PIXELS_X 32768 // Number of virtual pixels in x
305 #define PIXELS_Y 24576 // Number of virtual pixels in x
306 #define DPMM 4. // dots per mm
307 #define VDPMM ( DPMM * 32 ) // virtual dots per mm
308 #define LPAGE_X ( PIXELS_X / VDPMM ) // virtual page length in x in mm (256)
309 #define LPAGE_Y ( PIXELS_Y / VDPMM ) // virtual page length in y in mm (192)
313 #define PLPLOT_MM_PER_INCH 25.4
314 #define PLPLOT_POINTS_PER_INCH 72.
315 #define PLPLOT_WIDTH_A4_MM 297.
316 #define PLPLOT_HEIGHT_A4_MM 210.
317 #define PLPLOT_WIDTH_A5_MM 210.
318 #define PLPLOT_HEIGHT_A5_MM 148.
326 #define PLPLOT_DEFAULT_PIXELS_PER_INCH 90.
329 #define PLPLOT_DEFAULT_WIDTH_PIXELS ( (int) ( PLPLOT_WIDTH_A5_MM * PLPLOT_DEFAULT_PIXELS_PER_INCH / PLPLOT_MM_PER_INCH ) )
330 #define PLPLOT_DEFAULT_HEIGHT_PIXELS ( (int) ( PLPLOT_HEIGHT_A5_MM * PLPLOT_DEFAULT_PIXELS_PER_INCH / PLPLOT_MM_PER_INCH ) )
341 #define PLPLOT_DEFAULT_WIDTH_MM ( (int) ( PLPLOT_WIDTH_A4_MM )
342 #define PLPLOT_DEFAULT_HEIGHT_MM ( (int) ( PLPLOT_HEIGHT_A4_MM )
346 #define PLPLOT_DEFAULT_WIDTH_POINTS ( (int) ( PLPLOT_WIDTH_A4_MM * PLPLOT_POINTS_PER_INCH / PLPLOT_MM_PER_INCH ) )
347 #define PLPLOT_DEFAULT_HEIGHT_POINTS ( (int) ( PLPLOT_HEIGHT_A4_MM * PLPLOT_POINTS_PER_INCH / PLPLOT_MM_PER_INCH ) )
358 #define ORIENTATION 3
362 #define PLSTATE_WIDTH 1 // pen width
363 #define PLSTATE_COLOR0 2 // change to color in cmap 0
364 #define PLSTATE_COLOR1 3 // change to color in cmap 1
365 #define PLSTATE_FILL 4 // set area fill to a standard pattern
366 #define PLSTATE_CMAP0 5 // change to cmap 0
367 #define PLSTATE_CMAP1 6 // change to cmap 1
368 #define PLSTATE_CHR 7 // change character height
369 #define PLSTATE_SYM 8 // change symbol size
374 #define PLDI_MAP 0x01
375 #define PLDI_ORI 0x02
376 #define PLDI_PLT 0x04
377 #define PLDI_DEV 0x08
381 #ifndef PL_FILESIZE_KB
382 #define PL_FILESIZE_KB 1000
387 #define PLPLOT5_FONTS
390 #define PL_XFONT "plxtnd5.fnt"
391 #define PL_SFONT "plstnd5.fnt"
393 #define PL_XFONT "plxtnd4.fnt"
394 #define PL_SFONT "plstnd4.fnt"
436 #define PLPLOT_BIN_ENV "PLPLOT_BIN"
437 #define PLPLOT_LIB_ENV "PLPLOT_LIB"
438 #define PLPLOT_TCL_ENV "PLPLOT_TCL"
439 #define PLPLOT_HOME_ENV "PLPLOT_HOME"
442 #define PLPLOT_MAX_PATH 1024
523 PLFLT *affine_vectorA,
554 void ( *draw )(
short *,
short *,
PLINT ) );
561 void ( *draw )(
short *,
short *,
PLINT ) );
770 #define LINE_ITEMS 20
1257 plio_fread(
void *,
size_t,
size_t, FILE * );
1274 #ifdef ENABLE_DYNDRIVERS
1276 plGetDrvDir(
void );
1279 #ifdef PL_HAVE_FREETYPE
1287 plD_FreeType_Destroy(
PLStream * );
1290 pl_set_extended_cmap0(
PLStream *,
int,
int );
1310 #endif // __PLPLOTP_H__
PLDLLIMPEXP void plP_esc(PLINT op, void *ptr)
PLDLLIMPEXP_DATA(PLStream *) plsc
PLINT plP_checkdriverinit(char *names)
PLDLLIMPEXP void difilt_clip(PLINT *, PLINT *)
PLDLLIMPEXP PLINT plP_strpos(PLCHAR_VECTOR str, int chr)
void NoBufferNoPixmap(void)
void plP_hex2fci(unsigned char hexdigit, unsigned char hexpower, PLUNICODE *pfci)
PLDLLIMPEXP void plwarn(PLCHAR_VECTOR errormsg)
PLFLT plf2eval(PLINT ix, PLINT iy, PLPointer plf2eval_data)
PLDLLIMPEXP void plcmap1_calc(void)
PLDLLIMPEXP void plP_affine_rotate(PLFLT *affine_vector, PLFLT angle)
void plio_fwrite(void *, size_t, size_t, FILE *)
const PLFLT *const * PLFLT_MATRIX
void plP_drawor_poly(PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT n)
PLDLLIMPEXP void difilt(PLINT *, PLINT *, PLINT, PLINT *, PLINT *, PLINT *, PLINT *)
PLDLLIMPEXP void plP_setsub(void)
PLDLLIMPEXP void pllib_devinit(void)
int plsnscanf(PLCHAR_VECTOR buffer, int n, PLCHAR_VECTOR format,...)
const char * PLCHAR_VECTOR
void plP_movphy(PLINT x, PLINT y)
PLFLT plP_w3wcy(PLFLT x, PLFLT y, PLFLT z)
void plP_line(short *x, short *y)
void plwxtik(PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert)
void plio_fgets(char *, int, FILE *)
void pldtfac(PLFLT vmin, PLFLT vmax, PLFLT *factor, PLFLT *tstart)
void plP_polyline(short *x, short *y, PLINT npts)
PLFLT plstrl(PLCHAR_VECTOR string)
void RestoreWrite2BufferPixmap(void)
const char plP_greek_mnemonic[]
PLDLLIMPEXP void plP_affine_xskew(PLFLT *affine_vector, PLFLT angle)
const char * plP_gtimefmt(void)
PLDLLIMPEXP void plP_affine_multiply(PLFLT *affine_vectorA, PLFLT_VECTOR affine_vectorB, PLFLT_VECTOR affine_vectorC)
PLDLLIMPEXP void plexit(PLCHAR_VECTOR errormsg)
PLFLT plP_w3wcz(PLFLT x, PLFLT y, PLFLT z)
PLDLLIMPEXP const char * plP_FCI2FontName(PLUNICODE fci, const FCI_to_FontName_Table lookup[], const int nlookup)
PLDLLIMPEXP void plreadmetafile(char *infile)
PLDLLIMPEXP void plrestore_locale(char *save_lc_numeric_locale)
PLDLLIMPEXP void plfill_soft(short *x, short *y, PLINT npts)
int plP_clipline(PLINT *p_x1, PLINT *p_y1, PLINT *p_x2, PLINT *p_y2, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
PLBOOL plP_stsearch(PLCHAR_VECTOR str, int chr)
const unsigned char * pfont
void plwytik(PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert)
PLDLLIMPEXP void plP_eop(void)
PLDLLIMPEXP void plP_setpxl(PLFLT xpmm0, PLFLT ypmm0)
PLDLLIMPEXP void plP_gpixmm(PLFLT *p_x, PLFLT *p_y)
void cont_store(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data, CONT_LEVEL **contour)
void PLDLLIMPEXP plP_getinitdriverlist(char *names)
PLDLLIMPEXP void pl_cpcolor(PLColor *to, PLColor *from)
PLDLLIMPEXP void plP_wait(void)
void grimage(short *x, short *y, unsigned short *z, PLINT nx, PLINT ny)
PLDLLIMPEXP void plP_affine_identity(PLFLT *affine_vector)
void plP_gradient(short *x, short *y, PLINT npts)
void cont_clean_store(CONT_LEVEL *ct)
void plHelpDrvOpts(DrvOpt *)
void plP_gzback(PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLFLT **zbw)
void xform(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void plP_plfclp(PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
Hershey_to_Unicode_table hershey_to_unicode_lookup_table[]
PLDLLIMPEXP void plP_affine_scale(PLFLT *affine_vector, PLFLT xscale, PLFLT yscale)
void pldtik(PLFLT vmin, PLFLT vmax, PLFLT *tick, PLINT *nsubt, PLBOOL ld)
PLDLLIMPEXP FILE * pl_create_tempfile(char **fname)
PLDLLIMPEXP void plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
int plsnprintf(char *buffer, int n, PLCHAR_VECTOR format,...)
struct cont_level CONT_LEVEL
PLDLLIMPEXP void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
void plP_FreeDrvOpts(void)
void plhrsh(PLINT ch, PLINT x, PLINT y)
int plP_clip_poly(int Ni, PLFLT *Vi[3], int axis, PLFLT dir, PLFLT offset)
PLDLLIMPEXP void plRotationShear(PLFLT *xFormMatrix, PLFLT *rotation, PLFLT *shear, PLFLT *stride)
void plstik(PLFLT mx, PLFLT my, PLFLT dx, PLFLT dy)
void plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)
void plP_drawor(PLFLT x, PLFLT y)
void plP_text(PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
PLDLLIMPEXP int plParseDrvOpts(DrvOpt *)
struct cont_line CONT_LINE
PLDLLIMPEXP void plP_affine_translate(PLFLT *affine_vector, PLFLT xtranslate, PLFLT ytranslate)
unsigned short unicode_array_len
void plytik(PLINT x, PLINT y, PLINT left, PLINT right)
FILE * plLibOpen(PLCHAR_VECTOR fn)
void plio_fread(void *, size_t, size_t, FILE *)
void plP_gw3wc(PLFLT *p_dxx, PLFLT *p_dxy, PLFLT *p_dyx, PLFLT *p_dyy, PLFLT *p_dyz)
PLDLLIMPEXP char * pl_create_tempfifo(const char **p_fifoname, const char **p_dirname)
void plP_draphy(PLINT x, PLINT y)
PLDLLIMPEXP void plabort(PLCHAR_VECTOR errormsg)
void plP_movwor(PLFLT x, PLFLT y)
PLDLLIMPEXP void plfvect(PLFLT(*plf2eval)(PLINT, PLINT, PLPointer), PLPointer f2evalv_data, PLPointer f2evalc_data, PLINT nx, PLINT ny, PLFLT scale, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
PLDLLIMPEXP void plP_ssub(PLINT nx, PLINT ny, PLINT cs)
void plP_image(PLFLT *z, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plP_gclp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
void plxtik(PLINT x, PLINT y, PLINT below, PLINT above)
void plP_gdom(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
void plP_gprec(PLINT *p_setp, PLINT *p_prec)
void plP_grange(PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax)
PLDLLIMPEXP void plP_fill(short *x, short *y, PLINT npts)
PLDLLIMPEXP void plP_bop(void)
PLFLT plP_w3wcx(PLFLT x, PLFLT y, PLFLT z)
void plimageslow(PLFLT *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
int plhershey2unicode(int in)
void pldprec(PLFLT vmin, PLFLT vmax, PLFLT tick, PLINT lf, PLINT *mode, PLINT *prec, PLINT digmax, PLINT *scale)
PLDLLIMPEXP int ucs4_to_utf8(PLUNICODE unichar, char *ptr)
PLDLLIMPEXP void plP_gphy(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
PLINT plP_stindex(PLCHAR_VECTOR str1, PLCHAR_VECTOR str2)
PLDLLIMPEXP void pllib_init(void)
PLDLLIMPEXP char * plsave_set_locale(void)
void plP_xgvpw(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
void label_box_custom(PLCHAR_VECTOR xopt, PLINT n_xticks, PLFLT_VECTOR xticks, PLCHAR_VECTOR yopt, PLINT n_yticks, PLFLT_VECTOR yticks)
void plP_draphy_poly(PLINT *x, PLINT *y, PLINT n)
int number_of_entries_in_hershey_to_unicode_table
int plP_pointinpolygon(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT xp, PLFLT yp)
const PLFLT * PLFLT_VECTOR
PLDLLIMPEXP void plP_script_scale(PLBOOL ifupper, PLINT *level, PLFLT *old_scale, PLFLT *scale, PLFLT *old_offset, PLFLT *offset)
PLDLLIMPEXP void plP_gsub(PLINT *p_nx, PLINT *p_ny, PLINT *p_cs)
PLDLLIMPEXP void plP_state(PLINT op)
void plP_swin(PLWindow *plwin)
PLUNICODE * unicode_array
PLDLLIMPEXP char * plstrdup(PLCHAR_VECTOR src)
void plstr(PLINT base, PLFLT *xform, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
PLDLLIMPEXP int plInBuildTree(void)
void plP_pllclp(PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
PLDLLIMPEXP void plP_affine_yskew(PLFLT *affine_vector, PLFLT angle)