104 typedef char * caddr_t;
115 #ifdef PL_HAVE_UNISTD_H
123 #if !defined ( M_PI )
124 #define M_PI 3.14159265358979323846
141 #define FPOS_T fpos_t
142 #define pl_fsetpos( a, b ) fsetpos( a, b )
143 #define pl_fgetpos( a, b ) fgetpos( a, b )
147 #define pl_fsetpos( a, b ) fseek( a, *b, 0 )
148 #define pl_fgetpos( a, b ) ( -1L == ( *b = ftell( a ) ) )
187 #define free_mem( a ) \
188 if ( a != NULL ) { free( (void *) a ); a = NULL; }
192 #define plsetvar( a, b ) \
193 if ( b != PL_NOTSET ) a = b;
198 #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
201 #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
204 #define ABS( a ) ( ( a ) < 0 ? -( a ) : ( a ) )
207 #define ROUND( a ) (PLINT) ( ( a ) < 0. ? ( ( a ) - .5 ) : ( ( a ) + .5 ) )
210 #define BETW( ix, ia, ib ) ( ( ( ix ) <= ( ia ) && ( ix ) >= ( ib ) ) || ( ( ix ) >= ( ia ) && ( ix ) <= ( ib ) ) )
213 #define SSQR( a, b ) sqrt( ( a ) * ( a ) + ( b ) * ( b ) )
216 #define SIGN( a ) ( ( a ) < 0 ? -1 : 1 )
219 #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; }
224 #define PL_UNDEFINED -9999999
228 #ifdef PL_HAVE_SNPRINTF
231 #ifdef _PL_HAVE_SNPRINTF
232 #define snprintf _snprintf
233 #define snscanf _snscanf
234 #endif // _PL_HAVE_SNPRINTF
235 #else // !PL_HAVE_SNPRINTF
240 #define snprintf plsnprintf
241 #define snscanf plsnscanf
242 #endif // PL_HAVE_SNPRINTF
248 #if defined ( PL__HAVE_ISNAN )
249 # define isnan _isnan
250 # if defined ( _MSC_VER )
254 #if defined ( PL__HAVE_ISINF )
255 # define isinf _isinf
257 #if defined ( PL_HAVE_FINITE )
258 # define isfinite finite
260 #if defined ( PL__HAVE_FINITE )
261 # define isfinite _finite
266 #if !defined ( PL_HAVE_ISNAN )
267 # define isnan( x ) ( ( x ) != ( x ) )
269 #if !defined ( PL_HAVE_ISINF )
270 # define isinf( x ) ( !isnan( x ) && isnan( x - x ) )
272 #if !defined ( PL_HAVE_ISFINITE )
273 # define isfinite( x ) ( !isnan( x - x ) )
279 #define HUGE_VAL ( 1.0 / 0.0 )
288 #define PL_MAXPOLY 256 // Max segments in polyline or polygon
289 #define PL_NSTREAMS 100 // Max number of concurrent streams.
290 #define PL_RGB_COLOR -1 // A hack
293 #define GRAPHICS_MODE 1
295 #define PI 3.1415926535897932384
309 #define PIXELS_X 32768 // Number of virtual pixels in x
310 #define PIXELS_Y 24576 // Number of virtual pixels in x
311 #define DPMM 4. // dots per mm
312 #define VDPMM ( DPMM * 32 ) // virtual dots per mm
313 #define LPAGE_X ( PIXELS_X / VDPMM ) // virtual page length in x in mm (256)
314 #define LPAGE_Y ( PIXELS_Y / VDPMM ) // virtual page length in y in mm (192)
325 #define ORIENTATION 3
329 #define PLSTATE_WIDTH 1 // pen width
330 #define PLSTATE_COLOR0 2 // change to color in cmap 0
331 #define PLSTATE_COLOR1 3 // change to color in cmap 1
332 #define PLSTATE_FILL 4 // set area fill attribute
333 #define PLSTATE_CMAP0 5 // change to cmap 0
334 #define PLSTATE_CMAP1 6 // change to cmap 1
338 #define PLDI_MAP 0x01
339 #define PLDI_ORI 0x02
340 #define PLDI_PLT 0x04
341 #define PLDI_DEV 0x08
345 #ifndef PL_FILESIZE_KB
346 #define PL_FILESIZE_KB 1000
351 #define PLPLOT5_FONTS
354 #define PL_XFONT "plxtnd5.fnt"
355 #define PL_SFONT "plstnd5.fnt"
357 #define PL_XFONT "plxtnd4.fnt"
358 #define PL_SFONT "plstnd4.fnt"
400 #define PLPLOT_BIN_ENV "PLPLOT_BIN"
401 #define PLPLOT_LIB_ENV "PLPLOT_LIB"
402 #define PLPLOT_TCL_ENV "PLPLOT_TCL"
403 #define PLPLOT_HOME_ENV "PLPLOT_HOME"
406 #define PLPLOT_MAX_PATH 1024
487 PLFLT *affine_vectorA,
488 const PLFLT *affine_vectorB,
489 const PLFLT *affine_vectorC );
518 void ( *draw )(
short *,
short *,
PLINT ) );
525 void ( *draw )(
short *,
short *,
PLINT ) );
554 plexit(
const char *errormsg );
564 plwarn(
const char *errormsg );
569 plabort(
const char *errormsg );
707 #define LINE_ITEMS 20
856 plstrl(
const char *
string );
1189 plio_fread(
void *,
size_t,
size_t, FILE * );
1206 #ifdef ENABLE_DYNDRIVERS
1208 plGetDrvDir(
void );
1211 #ifdef PL_HAVE_FREETYPE
1219 plD_FreeType_Destroy(
PLStream * );
1222 pl_set_extended_cmap0(
PLStream *,
int,
int );
1234 #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 *)
void NoBufferNoPixmap(void)
void plP_fill(short *x, short *y, PLINT npts)
void plP_hex2fci(unsigned char hexdigit, unsigned char hexpower, PLUNICODE *pfci)
void PLFLT PLINT PLINT PLFLT PLFLT PLFLT PLFLT PLINT PLINT PLINT PLFLT PLFLT PLINT PLFLT PLINT const PLINT const char *const PLINT nx
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 *)
PLDLLIMPEXP void difilt(PLINT *, PLINT *, PLINT, PLINT *, PLINT *, PLINT *, PLINT *)
void plP_text(PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y, PLINT refx, PLINT refy, const char *string)
PLDLLIMPEXP void plP_setsub(void)
PLDLLIMPEXP void pllib_devinit(void)
int plP_pointinpolygon(PLINT n, const PLFLT *x, const PLFLT *y, PLFLT xp, PLFLT yp)
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)
PLDLLIMPEXP void plP_affine_multiply(PLFLT *affine_vectorA, const PLFLT *affine_vectorB, const PLFLT *affine_vectorC)
void label_box_custom(const char *xopt, PLINT n_xticks, const PLFLT *xticks, const char *yopt, PLINT n_yticks, const PLFLT *yticks)
void PLFLT PLINT PLINT PLFLT x
void plstr(PLINT base, PLFLT *xform, PLINT refx, PLINT refy, const char *string)
void plio_fgets(char *, int, FILE *)
void xform(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void pldtfac(PLFLT vmin, PLFLT vmax, PLFLT *factor, PLFLT *tstart)
void plP_polyline(short *x, short *y, PLINT npts)
void RestoreWrite2BufferPixmap(void)
const char plP_greek_mnemonic[]
PLDLLIMPEXP void plP_affine_xskew(PLFLT *affine_vector, PLFLT angle)
const char * plP_gtimefmt(void)
PLFLT plP_w3wcz(PLFLT x, PLFLT y, PLFLT z)
int plsnprintf(char *buffer, int n, const char *format,...)
PLDLLIMPEXP const char * plP_FCI2FontName(PLUNICODE fci, const FCI_to_FontName_Table lookup[], const int nlookup)
PLDLLIMPEXP void plexit(const char *errormsg)
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)
const unsigned char * pfont
void plwytik(PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert)
PLDLLIMPEXP void plP_eop(void)
static void pltr(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
PLDLLIMPEXP void plP_setpxl(PLFLT xpmm0, PLFLT ypmm0)
PLDLLIMPEXP void plP_gpixmm(PLFLT *p_x, PLFLT *p_y)
PLFLT plstrl(const char *string)
void PLDLLIMPEXP plP_getinitdriverlist(char *names)
PLDLLIMPEXP void pl_cpcolor(PLColor *to, PLColor *from)
void PLFLT PLINT PLINT PLFLT PLFLT y
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)
PLINT plP_stindex(const char *str1, const char *str2)
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)
struct cont_level CONT_LEVEL
PLDLLIMPEXP void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
void plP_drawor_poly(const PLFLT *x, const PLFLT *y, PLINT n)
void plP_FreeDrvOpts(void)
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)
FILE * plLibOpen(const char *fn)
void plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)
void plP_drawor(PLFLT x, PLFLT y)
void cont_store(const PLFLT *const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data, CONT_LEVEL **contour)
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)
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)
void plP_draphy(PLINT x, PLINT y)
void plP_movwor(PLFLT x, PLFLT y)
int plsnscanf(const char *buffer, int n, const char *format,...)
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 char * plstrdup(const char *src)
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)
PLDLLIMPEXP void pllib_init(void)
PLDLLIMPEXP PLINT plP_strpos(const char *str, int chr)
PLDLLIMPEXP char * plsave_set_locale(void)
PLDLLIMPEXP void plabort(const char *errormsg)
void plP_xgvpw(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
PLBOOL plP_stsearch(const char *str, int chr)
void plP_draphy_poly(PLINT *x, PLINT *y, PLINT n)
int number_of_entries_in_hershey_to_unicode_table
dx
if { $zoomopts($this,1) == 0 } then {
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 plwarn(const char *errormsg)
PLDLLIMPEXP void plP_state(PLINT op)
void plP_swin(PLWindow *plwin)
PLUNICODE * unicode_array
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)