Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions | Variables
plplotP.h File Reference
#include "plConfig.h"
#include <ctype.h>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include "plplot.h"
#include "plstrm.h"
#include "pldebug.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EscText
struct  DrvOpt
struct  cont_line
struct  cont_level
struct  IMG_DT

Defines

#define dirent   direct
#define NAMLEN(dirent)   (dirent)->d_namlen
#define FPOS_T   long
#define pl_fsetpos(a, b)   fseek(a, *b, 0)
#define pl_fgetpos(a, b)   (-1L == (*b = ftell(a)))
#define TRUE   1
#define FALSE   0
#define free_mem(a)   if (a != NULL) { free((void *) a); a = NULL; }
#define plsetvar(a, b)   if (b != PL_NOTSET) a = b;
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
#define ABS(a)   ((a)<0 ? -(a) : (a))
#define ROUND(a)   (PLINT)((a)<0. ? ((a)-.5) : ((a)+.5))
#define BETW(ix, ia, ib)   (((ix)<=(ia)&&(ix)>=(ib)) || ((ix)>=(ia)&&(ix)<=(ib)))
#define SSQR(a, b)   sqrt((a)*(a)+(b)*(b))
#define SIGN(a)   ((a)<0 ? -1 : 1)
#define PL_UNDEFINED   -9999999
#define PL_MAXPOLY   256 /* Max segments in polyline or polygon */
#define PL_NSTREAMS   100 /* Max number of concurrent streams. */
#define PL_RGB_COLOR   1<<7 /* A hack */
#define TEXT_MODE   0
#define GRAPHICS_MODE   1
#define PI   3.1415926535897932384
#define PIXELS_X   32768 /* Number of virtual pixels in x */
#define PIXELS_Y   24576 /* Number of virtual pixels in x */
#define DPMM   4. /* dots per mm */
#define VDPMM   (DPMM*32) /* virtual dots per mm */
#define LPAGE_X   (PIXELS_X/VDPMM) /* virtual page length in x in mm (256) */
#define LPAGE_Y   (PIXELS_Y/VDPMM) /* virtual page length in y in mm (192) */
#define ORIENTATION   3
#define PLSTATE_WIDTH   1 /* pen width */
#define PLSTATE_COLOR0   2 /* change to color in cmap 0 */
#define PLSTATE_COLOR1   3 /* change to color in cmap 1 */
#define PLSTATE_FILL   4 /* set area fill attribute */
#define PLSTATE_CMAP0   5 /* change to cmap 0 */
#define PLSTATE_CMAP1   6 /* change to cmap 1 */
#define PLDI_MAP   0x01
#define PLDI_ORI   0x02
#define PLDI_PLT   0x04
#define PLDI_DEV   0x08
#define PL_FILESIZE_KB   1000
#define PLPLOT5_FONTS
#define PL_XFONT   "plxtnd5.fnt"
#define PL_SFONT   "plstnd5.fnt"
#define PLPLOT_BIN_ENV   "PLPLOT_BIN"
#define PLPLOT_LIB_ENV   "PLPLOT_LIB"
#define PLPLOT_TCL_ENV   "PLPLOT_TCL"
#define PLPLOT_HOME_ENV   "PLPLOT_HOME"
#define LINE_ITEMS   20

Typedefs

typedef struct cont_line CONT_LINE
typedef struct cont_level CONT_LEVEL

Enumerations

enum  { DRV_INT, DRV_FLT, DRV_STR }

Functions

void pldtik (PLFLT vmin, PLFLT vmax, PLFLT *tick, PLINT *nsubt)
void pldprec (PLFLT vmin, PLFLT vmax, PLFLT tick, PLINT lf, PLINT *mode, PLINT *prec, PLINT digmax, PLINT *scale)
void plP_pllclp (PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
void plP_plfclp (PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
int plP_clip_poly (int Ni, PLFLT *Vi[3], int axis, PLFLT dir, PLFLT offset)
void plfill_soft (short *x, short *y, PLINT npts)
void plexit (char *errormsg)
void pl_exit (void)
void plwarn (char *errormsg)
void plabort (char *errormsg)
void plfntld (PLINT fnt)
void plfontrel (void)
char * plstrdup (const char *src)
void plcmap1_calc (void)
void plstik (PLFLT mx, PLFLT my, PLFLT dx, PLFLT dy)
void plstr (PLINT base, PLFLT *xform, PLINT refx, PLINT refy, const char *string)
void plxtik (PLINT x, PLINT y, PLINT below, PLINT above)
void plytik (PLINT x, PLINT y, PLINT left, PLINT right)
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)
int plParseDrvOpts (DrvOpt *)
void plHelpDrvOpts (DrvOpt *)
void cont_store (PLFLT *x, PLFLT *y, PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, CONT_LEVEL **contour)
void cont_clean_store (CONT_LEVEL *ct)
void plP_gdom (PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
void plP_grange (PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax)
void plP_gw3wc (PLFLT *p_dxx, PLFLT *p_dxy, PLFLT *p_dyx, PLFLT *p_dyy, PLFLT *p_dyz)
void plP_gclp (PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
void plP_sclp (PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)
void plP_gphy (PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
void plP_gsub (PLINT *p_nx, PLINT *p_ny, PLINT *p_cs)
void plP_ssub (PLINT nx, PLINT ny, PLINT cs)
void plP_subpInit (void)
void plP_gpixmm (PLFLT *p_x, PLFLT *p_y)
void plP_setpxl (PLFLT xpmm0, PLFLT ypmm0)
void plP_gzback (PLINT **zbf, PLINT **zbc, PLFLT **zbt)
void plP_movphy (PLINT x, PLINT y)
void plP_draphy (PLINT x, PLINT y)
void plP_movwor (PLFLT x, PLFLT y)
void plP_drawor (PLFLT x, PLFLT y)
void plP_draphy_poly (PLINT *x, PLINT *y, PLINT n)
void plP_drawor_poly (PLFLT *x, PLFLT *y, PLINT n)
void plP_setphy (PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
void plP_setsub (void)
void plP_gprec (PLINT *p_setp, PLINT *p_prec)
PLFLT plstrl (const char *string)
PLINT plP_stindex (const char *str1, const char *str2)
PLINT plP_strpos (char *str, int chr)
PLINT plP_stsearch (const char *str, int chr)
PLINT plP_dcpcx (PLFLT x)
PLINT plP_dcpcy (PLFLT y)
PLINT plP_mmpcx (PLFLT x)
PLINT plP_mmpcy (PLFLT y)
PLINT plP_wcpcx (PLFLT x)
PLINT plP_wcpcy (PLFLT y)
PLFLT plP_pcdcx (PLINT x)
PLFLT plP_pcdcy (PLINT y)
PLFLT plP_mmdcx (PLFLT x)
PLFLT plP_mmdcy (PLFLT y)
PLFLT plP_wcdcx (PLFLT x)
PLFLT plP_wcdcy (PLFLT y)
PLFLT plP_scdcx (PLFLT x)
PLFLT plP_scdcy (PLFLT y)
PLFLT plP_dcmmx (PLFLT x)
PLFLT plP_dcmmy (PLFLT y)
PLFLT plP_wcmmx (PLFLT x)
PLFLT plP_wcmmy (PLFLT y)
PLFLT plP_dcscx (PLFLT x)
PLFLT plP_dcscy (PLFLT y)
PLFLT plP_w3wcx (PLFLT x, PLFLT y, PLFLT z)
PLFLT plP_w3wcy (PLFLT x, PLFLT y, PLFLT z)
void plP_init (void)
void plP_line (short *x, short *y)
void plP_polyline (short *x, short *y, PLINT npts)
void plP_fill (short *x, short *y, PLINT npts)
void plP_image (short *x, short *y, unsigned short *z, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, unsigned short zmin, unsigned short zmax)
void plP_eop (void)
void plP_bop (void)
void plP_tidy (void)
void plP_state (PLINT op)
void plP_esc (PLINT op, void *ptr)
void plP_swin (PLWindow *plwin)
FILE * plLibOpen (char *fn)
void pllib_init (void)
void pllib_devinit (void)
void pl_cpcolor (PLColor *to, PLColor *from)
void plstrm_init (void)
void plP_getinitdriverlist (char *names)
PLINT plP_checkdriverinit (char *names)
void NoBufferNoPixmap (void)
void RestoreWrite2BufferPixmap (void)
void grimage (short *x, short *y, unsigned short *z, PLINT nx, PLINT ny)
void plimageslow (short *x, short *y, unsigned short *data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, unsigned short zmin, unsigned short zmax)

Variables

PLStreamplsc

Class Documentation

struct EscText

Definition at line 457 of file plplotP.h.

Class Members
PLINT base
PLFLT just
PLINT refx
PLINT refy
const char * string
PLINT x
PLFLT * xform
PLINT y
struct DrvOpt

Definition at line 473 of file plplotP.h.

Class Members
char * hlp_msg
char * opt
PLINT type
void * var_ptr
struct cont_line

Definition at line 500 of file plplotP.h.

Collaboration diagram for cont_line:
Class Members
struct cont_line * next
PLINT npts
PLFLT * x
PLFLT * y
struct cont_level

Definition at line 507 of file plplotP.h.

Collaboration diagram for cont_level:
Class Members
PLFLT level
struct cont_line * line
struct cont_level * next
struct IMG_DT

Definition at line 865 of file plplotP.h.

Class Members
PLFLT dx
PLFLT dy
PLFLT xmin
PLFLT ymin

Define Documentation

#define ABS (   a)    ((a)<0 ? -(a) : (a))

Definition at line 191 of file plplotP.h.

#define BETW (   ix,
  ia,
  ib 
)    (((ix)<=(ia)&&(ix)>=(ib)) || ((ix)>=(ia)&&(ix)<=(ib)))

Definition at line 197 of file plplotP.h.

#define dirent   direct

Definition at line 104 of file plplotP.h.

#define DPMM   4. /* dots per mm */

Definition at line 239 of file plplotP.h.

#define FALSE   0

Definition at line 169 of file plplotP.h.

#define FPOS_T   long

Definition at line 136 of file plplotP.h.

#define free_mem (   a)    if (a != NULL) { free((void *) a); a = NULL; }

Definition at line 174 of file plplotP.h.

#define GRAPHICS_MODE   1

Definition at line 221 of file plplotP.h.

#define LINE_ITEMS   20

Definition at line 498 of file plplotP.h.

#define LPAGE_X   (PIXELS_X/VDPMM) /* virtual page length in x in mm (256) */

Definition at line 241 of file plplotP.h.

#define LPAGE_Y   (PIXELS_Y/VDPMM) /* virtual page length in y in mm (192) */

Definition at line 242 of file plplotP.h.

#define MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 185 of file plplotP.h.

#define MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 188 of file plplotP.h.

#define NAMLEN (   dirent)    (dirent)->d_namlen

Definition at line 105 of file plplotP.h.

#define ORIENTATION   3

Definition at line 253 of file plplotP.h.

#define PI   3.1415926535897932384

Definition at line 223 of file plplotP.h.

#define PIXELS_X   32768 /* Number of virtual pixels in x */

Definition at line 237 of file plplotP.h.

#define PIXELS_Y   24576 /* Number of virtual pixels in x */

Definition at line 238 of file plplotP.h.

#define pl_fgetpos (   a,
  b 
)    (-1L == (*b = ftell(a)))

Definition at line 138 of file plplotP.h.

#define PL_FILESIZE_KB   1000

Definition at line 274 of file plplotP.h.

#define pl_fsetpos (   a,
  b 
)    fseek(a, *b, 0)

Definition at line 137 of file plplotP.h.

#define PL_MAXPOLY   256 /* Max segments in polyline or polygon */

Definition at line 216 of file plplotP.h.

#define PL_NSTREAMS   100 /* Max number of concurrent streams. */

Definition at line 217 of file plplotP.h.

#define PL_RGB_COLOR   1<<7 /* A hack */

Definition at line 218 of file plplotP.h.

#define PL_SFONT   "plstnd5.fnt"

Definition at line 283 of file plplotP.h.

#define PL_UNDEFINED   -9999999

Definition at line 208 of file plplotP.h.

#define PL_XFONT   "plxtnd5.fnt"

Definition at line 282 of file plplotP.h.

#define PLDI_DEV   0x08

Definition at line 269 of file plplotP.h.

#define PLDI_MAP   0x01

Definition at line 266 of file plplotP.h.

#define PLDI_ORI   0x02

Definition at line 267 of file plplotP.h.

#define PLDI_PLT   0x04

Definition at line 268 of file plplotP.h.

#define PLPLOT5_FONTS

Definition at line 279 of file plplotP.h.

#define PLPLOT_BIN_ENV   "PLPLOT_BIN"

Definition at line 328 of file plplotP.h.

#define PLPLOT_HOME_ENV   "PLPLOT_HOME"

Definition at line 331 of file plplotP.h.

#define PLPLOT_LIB_ENV   "PLPLOT_LIB"

Definition at line 329 of file plplotP.h.

#define PLPLOT_TCL_ENV   "PLPLOT_TCL"

Definition at line 330 of file plplotP.h.

#define plsetvar (   a,
  b 
)    if (b != PL_NOTSET) a = b;

Definition at line 179 of file plplotP.h.

#define PLSTATE_CMAP0   5 /* change to cmap 0 */

Definition at line 261 of file plplotP.h.

#define PLSTATE_CMAP1   6 /* change to cmap 1 */

Definition at line 262 of file plplotP.h.

#define PLSTATE_COLOR0   2 /* change to color in cmap 0 */

Definition at line 258 of file plplotP.h.

#define PLSTATE_COLOR1   3 /* change to color in cmap 1 */

Definition at line 259 of file plplotP.h.

#define PLSTATE_FILL   4 /* set area fill attribute */

Definition at line 260 of file plplotP.h.

#define PLSTATE_WIDTH   1 /* pen width */

Definition at line 257 of file plplotP.h.

#define ROUND (   a)    (PLINT)((a)<0. ? ((a)-.5) : ((a)+.5))

Definition at line 194 of file plplotP.h.

#define SIGN (   a)    ((a)<0 ? -1 : 1)

Definition at line 203 of file plplotP.h.

#define SSQR (   a,
  b 
)    sqrt((a)*(a)+(b)*(b))

Definition at line 200 of file plplotP.h.

#define TEXT_MODE   0

Definition at line 220 of file plplotP.h.

#define TRUE   1

Definition at line 168 of file plplotP.h.

#define VDPMM   (DPMM*32) /* virtual dots per mm */

Definition at line 240 of file plplotP.h.


Typedef Documentation


Enumeration Type Documentation

anonymous enum
Enumerator:
DRV_INT 
DRV_FLT 
DRV_STR 

Definition at line 482 of file plplotP.h.


Function Documentation

Definition at line 155 of file plcont.c.

{
  CONT_LINE *tline, *cline;
  CONT_LEVEL *tlev, *clevel;

  if (ct != NULL) {
    clevel = ct;

    do {
      cline = clevel->line;
      do {
#ifdef CONT_PLOT_DEBUG /* for 2D plots. For 3D plots look at plot3.c:plotsh3di() */
       plP_movwor(cline->x[0],cline->y[0]); 
       for (j=1; j<cline->npts; j++)
         plP_drawor(cline->x[j], cline->y[j]); 
#endif
       tline = cline->next;
       free(cline->x);
       free(cline->y);
       free(cline);
       cline = tline;
      }
      while(cline != NULL);
      tlev = clevel->next;
      free(clevel);
      clevel = tlev;
    }
    while(clevel != NULL);
    startlev = NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cont_store ( PLFLT x,
PLFLT y,
PLFLT **  f,
PLINT  nx,
PLINT  ny,
PLINT  kx,
PLINT  lx,
PLINT  ky,
PLINT  ly,
PLFLT clevel,
PLINT  nlevel,
CONT_LEVEL **  contour 
)

Definition at line 425 of file plcont.c.

{
  PLcGrid grid1;

  cont3d = 1;

  grid1.nx = nx; grid1.ny = ny; grid1.xg = x; grid1.yg = y;
  plcont(z, nx, ny, 1, nx, 1, ny, clevel, nlevel,
        pltr1,  (void *) & grid1 );

  *contour = startlev;
  cont3d = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void difilt ( PLINT ,
PLINT ,
PLINT  ,
PLINT ,
PLINT ,
PLINT ,
PLINT  
)

Definition at line 405 of file plcore.c.

{
    PLINT i, x, y;

/* Map meta coordinates to physical coordinates */

    if (plsc->difilt & PLDI_MAP) {
       for (i = 0; i < npts; i++) {
           xscl[i] = plsc->dimxax * xscl[i] + plsc->dimxb;
           yscl[i] = plsc->dimyay * yscl[i] + plsc->dimyb;
       }
    }

/* Change orientation */

    if (plsc->difilt & PLDI_ORI) {
       for (i = 0; i < npts; i++) {
           x = plsc->dioxax * xscl[i] + plsc->dioxay * yscl[i] + plsc->dioxb;
           y = plsc->dioyax * xscl[i] + plsc->dioyay * yscl[i] + plsc->dioyb;
           xscl[i] = x;
           yscl[i] = y;
       }
    }

/* Change window into plot space */

    if (plsc->difilt & PLDI_PLT) {
       for (i = 0; i < npts; i++) {
           xscl[i] = plsc->dipxax * xscl[i] + plsc->dipxb;
           yscl[i] = plsc->dipyay * yscl[i] + plsc->dipyb;
       }
    }

/* Change window into device space and set clip limits */
/* (this is the only filter that modifies them) */

    if (plsc->difilt & PLDI_DEV) {
       for (i = 0; i < npts; i++) {
           xscl[i] = plsc->didxax * xscl[i] + plsc->didxb;
           yscl[i] = plsc->didyay * yscl[i] + plsc->didyb;
       }
       *clpxmi = plsc->diclpxmi;
       *clpxma = plsc->diclpxma;
       *clpymi = plsc->diclpymi;
       *clpyma = plsc->diclpyma;
    }
    else {
      *clpxmi = plsc->phyxmi;
      *clpxma = plsc->phyxma;
      *clpymi = plsc->phyymi;
      *clpyma = plsc->phyyma;
    }
}

Here is the caller graph for this function:

void grimage ( short *  x,
short *  y,
unsigned short *  z,
PLINT  nx,
PLINT  ny 
)

Definition at line 109 of file plimage.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 18 of file plimage.c.

{
  PLINT op = ZEROW2B; 

  plsc->plbuf_write = 0; /* TODO: store previous state */
  plP_esc(PLESC_EXPOSE, NULL);
  plP_esc(PLESC_IMAGEOPS, &op);
}

Here is the call graph for this function:

void pl_cpcolor ( PLColor to,
PLColor from 
)

Definition at line 1446 of file plcore.c.

{
    to->r = from->r;
    to->g = from->g;
    to->b = from->b;
}

Here is the caller graph for this function:

void pl_exit ( void  )
void plabort ( char *  errormsg)

Definition at line 950 of file plctrl.c.

{
    if (plsc->errcode != NULL)
       *(plsc->errcode) = 1;

    if (plsc->errmsg != NULL) {
       sprintf(plsc->errmsg, "\n*** PLPLOT ERROR ***\n");
       if (*errormsg != '\0')
           sprintf(plsc->errmsg, "%s, aborting operation\n", errormsg);

    } else {
       int was_gfx = 0;

       if (plsc->graphx == 1) {
           was_gfx = 1;
           pltext();
       }

       fprintf(stderr, "\n*** PLPLOT ERROR ***\n");
       if (*errormsg != '\0')
           fprintf(stderr, "%s, aborting operation\n", errormsg);

       if (was_gfx == 1)
           plgra();
    }
}

Definition at line 429 of file plctrl.c.

{
    int i, n;
    PLFLT delta, dp, dh, dl, ds;
    PLFLT h, l, s, p, r, g, b;

/* Loop over all control point pairs */

    for (n = 0; n < plsc->ncp1-1; n++) {

       if ( plsc->cmap1cp[n].p == plsc->cmap1cp[n+1].p )
           continue;

    /* Differences in p, h, l, s between ctrl pts */

       dp = plsc->cmap1cp[n+1].p - plsc->cmap1cp[n].p;
       dh = plsc->cmap1cp[n+1].h - plsc->cmap1cp[n].h;
       dl = plsc->cmap1cp[n+1].l - plsc->cmap1cp[n].l;
       ds = plsc->cmap1cp[n+1].s - plsc->cmap1cp[n].s;

    /* Adjust dh if we are to go around "the back side" */

       if (plsc->cmap1cp[n].rev)
           dh = (dh > 0) ? dh-360 : dh+360;

    /* Loop over all color cells.  Only interested in cells located (in */
    /* cmap1 space)  between n_th and n+1_th control points */

       for (i = 0; i < plsc->ncol1; i++) {
           p = (double) i / (plsc->ncol1 - 1.0);
           if ( (p < plsc->cmap1cp[n].p) ||
               (p > plsc->cmap1cp[n+1].p) )
              continue;

       /* Interpolate based on position of color cell in cmap1 space */

           delta = (p - plsc->cmap1cp[n].p) / dp;

       /* Linearly interpolate to get color cell h, l, s values */

           h = plsc->cmap1cp[n].h + dh * delta;
           l = plsc->cmap1cp[n].l + dl * delta;
           s = plsc->cmap1cp[n].s + ds * delta;

           while (h >= 360.)
              h -= 360.;

           while (h < 0.)
              h += 360.;

           plHLS_RGB(h, l, s, &r, &g, &b);

           plsc->cmap1[i].r = MAX(0, MIN(255, (int) (256. * r)));
           plsc->cmap1[i].g = MAX(0, MIN(255, (int) (256. * g)));
           plsc->cmap1[i].b = MAX(0, MIN(255, (int) (256. * b)));
       }
    }

    if (plsc->level > 0)
       plP_state(PLSTATE_CMAP1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pldprec ( PLFLT  vmin,
PLFLT  vmax,
PLFLT  tick,
PLINT  lf,
PLINT mode,
PLINT prec,
PLINT  digmax,
PLINT scale 
)

Definition at line 116 of file pldtik.c.

{
    PLFLT chosen, notchosen, vmod, t0;
    PLINT msd, notmsd, np, digmin, digfix;

    *mode = 0;
    *scale = 0;

    if (digmax == 0)
       digmax = DIGMAX_DEF;

/* Choose vmin or vmax depending on magnitudes of vmin and vmax. */
    chosen = (ABS(vmax) >= ABS(vmin))? vmax: vmin;
    notchosen = (ABS(vmax) >= ABS(vmin))? vmin: vmax;
/* Magnitute of chosen to get number of significant digits */

    if(ABS(chosen) > 0.) {
        vmod = ABS(chosen);
        t0 = (PLFLT) log10(vmod);
        msd = (PLINT) floor(t0);
    }
    else {
/* this branch occurs only when 0. --- 0. range put in */
        vmod = 1.;
        t0 = (PLFLT) log10(vmod);
        msd = (PLINT) floor(t0);
    }
        
    if(ABS(notchosen) > 0.)
       notmsd = (PLINT) floor( (PLFLT) log10(ABS(notchosen)));
    else
       notmsd = msd;
/* Autoselect the mode flag */
/* 'digmin' is the minimum number of places taken up by the label */

    if (msd >= 0) {
/* n.b. no decimal point in the minimal case  */
       digmin = msd + 1;
       digfix = MAX_FIXDIG_POS;
       if (digmax > 0)
           digfix = MIN(digmax, MAX_FIXDIG_POS);
    }
    else {
/* adjust digmin to account for leading 0 and decimal point */
       digmin = -msd + 2;
       digfix = MAX_FIXDIG_NEG;
       if (digmax > 0)
           digfix = MIN(digmax, MAX_FIXDIG_NEG);
    }
/* adjust digmin to account for sign on the chosen end of axis or sign on the 
 * nonchosen end of axis if notmsd = msd or (msd <= 0 and notmsd < 0)
 * For the latter case the notchosen label starts with "-0."
 * For checking for the latter case, the notmsd < 0 condition is redundant
 * since notmsd <= msd always and the equal part is selected by the first
 * condition.
 */
    if(chosen < 0.||(notchosen < 0. && (notmsd == msd || msd <= 0)))
        digmin = digmin + 1;

    if (digmin > digfix && !lf) {
       *mode = 1;
       *scale = msd;
    }

/* Establish precision.  */
/* It must be fine enough to resolve the tick spacing */

    np = (PLINT) floor(log10(ABS(tick)));

    if (*mode != 0)
       *prec = msd - np;
    else
       *prec = MAX(-np, 0);

/* One last hack required: if exponent < 0, i.e. number has leading '0.',
 * it's better to change to floating point form if the number of digits
 * is insufficient to represent the tick spacing.
*/
    if (*mode == 0 && digmax > 0 && !lf) {
       if (t0 < 0.0) {
           if (digmax - 2 - *prec < 0) {
              *mode = 1;
              *scale = msd;
           }
       }
       else
           *prec = MAX(MIN(*prec, digmax - msd - 1), 0);
    }
    if (*mode != 0) {
       *prec = msd - np;
       *prec = MAX(MIN(*prec, MAX(digmax-1, MIN_FLTDIG)), 0);
    }
}

Here is the caller graph for this function:

void pldtik ( PLFLT  vmin,
PLFLT  vmax,
PLFLT tick,
PLINT nsubt 
)

Definition at line 20 of file pldtik.c.

{
    PLFLT t1, t2, tick_reasonable;
    PLINT np, ns;

/* Magnitude of min/max difference to get tick spacing */

    t1 = (PLFLT) log10(ABS(vmax - vmin));
    np = (PLINT) floor(t1);
    t1 = t1 - np;

/* Get tick spacing. */

    if (t1 > 0.7781512503) {
       t2 = 2.0;
       ns = 4;
    }
    else if (t1 > 0.4771212549) {
       t2 = 1.0;
       ns = 5;
    }
    else if (t1 > 0.1760912591) {
       t2 = 5.0;
       ns = 5;
       np = np - 1;
    }
    else {
       t2 = 2.0;
       ns = 4;
       np = np - 1;
    }

/* Now compute reasonable tick spacing */

    tick_reasonable = t2 * pow(10.0, (double) np);
    if (*tick == 0) {
       *tick = t2 * pow(10.0, (double) np);
    }
    else {
        *tick = ABS(*tick);
        if(*tick < 1.e-4*tick_reasonable) {
          plexit("pldtik: magnitude of specified tick spacing is much too small");
          return;
       }
    }
    if (*nsubt == 0)
       *nsubt = ns;

    *nsubt = ABS(*nsubt);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plexit ( char *  errormsg)

Definition at line 990 of file plctrl.c.

{
    int status = 1;

    if (exit_handler != NULL)
       status = (*exit_handler)(errormsg);

    plsc->nopause = 1;
    if (*errormsg != '\0') {
       fprintf(stderr, "\n*** PLPLOT ERROR ***\n");
       fprintf(stderr, "%s\n", errormsg);
    }
    plend();

    fprintf(stderr, "Program aborted\n");
    exit(status);
}

Here is the caller graph for this function:

void plfill_soft ( short *  x,
short *  y,
PLINT  npts 
)

Definition at line 146 of file plfill.c.

{
    PLINT i, j;
    PLINT xp1, yp1, xp2, yp2, xp3, yp3;
    PLINT k, dinc;
    PLFLT ci, si;
    double temp;

    buffersize = 2 * BINC;
    buffer = (PLINT *) malloc((size_t) buffersize * sizeof(PLINT));
    if ( ! buffer) {
       plabort("plfill: Out of memory");
       return;
    }

/* Loop over sets of lines in pattern */

    for (k = 0; k < plsc->nps; k++) {
       bufferleng = 0;

        temp = DTOR * plsc->inclin[k] * 0.1;
        si = sin(temp) * plsc->ypmm;
        ci = cos(temp) * plsc->xpmm;

       /* normalize: 1 = si*si + ci*ci */

        temp = sqrt((double) (si*si + ci*ci));
       si /= temp;
       ci /= temp;

       dinc = plsc->delta[k] * SSQR(plsc->ypmm * ABS(ci),
                                 plsc->xpmm * ABS(si)) / 1000.;

       if (dinc < 0) dinc = -dinc;
       if (dinc == 0) dinc = 1;

       xp1 = x[n-2];
       yp1 = y[n-2];
       tran(&xp1, &yp1, (PLFLT) ci, (PLFLT) si);

       xp2 = x[n-1];
       yp2 = y[n-1];
       tran(&xp2, &yp2, (PLFLT) ci, (PLFLT) si);

/* Loop over points in polygon */

       for (i = 0; i < n; i++) {
           xp3 = x[i];
           yp3 = y[i];
           tran(&xp3, &yp3, (PLFLT) ci, (PLFLT) si);
           buildlist(xp1, yp1, xp2, yp2, xp3, yp3, dinc);
           xp1 = xp2;
           yp1 = yp2;
           xp2 = xp3;
           yp2 = yp3;
       }

/* Sort list by y then x */

       qsort((void *) buffer, (size_t) bufferleng / 2,
             (size_t) sizeof(struct point), compar);

/* OK, now do the hatching */

       i = 0;

       while (i < bufferleng) {
           xp1 = buffer[i];
           yp1 = buffer[i + 1];
           i += 2;
           xp2 = xp1;
           yp2 = yp1;
           tran(&xp1, &yp1, (PLFLT) ci, (PLFLT) (-si));
           plP_movphy(xp1, yp1);
           xp1 = buffer[i];
           yp1 = buffer[i + 1];
           i += 2;
           if (yp2 != yp1) {
              fprintf(stderr, "plfill: oh oh we are lost\n");
              for (j = 0; j < bufferleng; j+=2) {
                  fprintf(stderr, "plfill: %d %d\n",
                         (int) buffer[j], (int) buffer[j+1]);
              }
              continue;     /* Uh oh we're lost */
           }
           tran(&xp1, &yp1, (PLFLT) ci, (PLFLT) (-si));
           plP_draphy(xp1, yp1);
       }
    }
    free((void *) buffer);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plfntld ( PLINT  fnt)

Definition at line 1004 of file plsym.c.

{
    static PLINT charset;
    short bffrleng;
    PDFstrm *pdfs;

    if (fontloaded && (charset == fnt))
       return;

    plfontrel();
    fontloaded = 1;
    charset = fnt;

    if (fnt)
       pdfs = plLibOpenPdfstrm(PL_XFONT);
    else
       pdfs = plLibOpenPdfstrm(PL_SFONT);

    if (pdfs == NULL)
       plexit("Unable to open or allocate memory for font file");

/* Read fntlkup[] */

    pdf_rd_2bytes(pdfs, (U_SHORT *) &bffrleng);
    numberfonts = bffrleng / 256;
    numberchars = bffrleng & 0xff;
    bffrleng = numberfonts * numberchars;
    fntlkup = (short int *) malloc(bffrleng * sizeof(short int));
    if ( ! fntlkup)
       plexit("plfntld: Out of memory while allocating font buffer.");

    pdf_rd_2nbytes(pdfs, (U_SHORT *) fntlkup, bffrleng);

/* Read fntindx[] */

    pdf_rd_2bytes(pdfs, (U_SHORT *) &indxleng);
    fntindx = (short int *) malloc(indxleng * sizeof(short int));
    if ( ! fntindx)
       plexit("plfntld: Out of memory while allocating font buffer.");

    pdf_rd_2nbytes(pdfs, (U_SHORT *) fntindx, indxleng);

/* Read fntbffr[] */
/* Since this is an array of char, there are no endian problems */

    pdf_rd_2bytes(pdfs, (U_SHORT *) &bffrleng);
    fntbffr = (signed char *) malloc(2 * bffrleng * sizeof(signed char));
    if ( ! fntbffr)
       plexit("plfntld: Out of memory while allocating font buffer.");

#if PLPLOT_USE_TCL_CHANNELS
    pdf_rdx(fntbffr, sizeof(signed char)*(2 * bffrleng), pdfs);
#else
    fread((void *) fntbffr, (size_t) sizeof(signed char),
         (size_t) (2 * bffrleng), pdfs->file);
#endif

/* Done */

    pdf_close(pdfs);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1073 of file plsym.c.

Here is the caller graph for this function:

Definition at line 1315 of file plargs.c.

                               {
  DrvOpt *t;

  t = acc_opt;
  while(t->opt) {
    fprintf(stderr, "%s:\t%s\n", t->opt, t->hlp_msg);
    t++;
  }
}

Here is the caller graph for this function:

void plimageslow ( short *  x,
short *  y,
unsigned short *  data,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  ymin,
PLFLT  dx,
PLFLT  dy,
unsigned short  zmin,
unsigned short  zmax 
)

Definition at line 56 of file plimage.c.

{
  PLINT ix, iy, i;
  PLFLT xf[4], yf[4];
  short xs[5], ys[5];
  int corners[4];
  unsigned short col;

  for (ix = 0; ix < nx ; ix++) {
    for (iy = 0; iy < ny ; iy++) {

      col = data[ix*ny+iy];
      /* only plot points within zmin/zmax range */
      if (col < zmin || col > zmax)
       continue;

      plcol1(col/(float)USHRT_MAX);

      if (plsc->plbuf_read == 1) {
       /* buffer read, is a replot to a slow device. */

       corners[0] = ix*(ny+1)+iy;       /* [ix][iy] */
       corners[1] = (ix+1)*(ny+1)+iy;   /* [ix+1][iy] */
       corners[2] = (ix+1)*(ny+1)+iy+1; /* [ix+1][iy+1] */
       corners[3] = ix*(ny+1)+iy+1;     /* [ix][iy+1] */

       for (i = 0; i < 4; i++) {
         xs[i] = x[corners[i]];
         ys[i] = y[corners[i]];
       }
       xs[4] = xs[0]; ys[4] = ys[0];
       plP_fill(xs, ys, 5);

      } else {

       xf[0] = xf[1] = ix;
       xf[2] = xf[3] = ix+1;
       yf[0] = yf[3] = iy;
       yf[1] = yf[2] = iy+1;

       for (i = 0; i < 4; i++) {
         xf[i] = xmin + xf[i]*dx;
         yf[i] = ymin + yf[i]*dy;
       }
       plfill(4, xf, yf);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1564 of file plcore.c.

{
    if (plsc->dev_initialized) return;
    plsc->dev_initialized = 1;

    plSelectDev();

    plLoadDriver();

/* offset by one since table is zero-based, but input list is not */
    plsc->dispatch_table = dispatch_table[plsc->device - 1];
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1096 of file plcore.c.

{
    if (lib_initialized) return;
    lib_initialized = 1;

#ifdef ENABLE_DYNDRIVERS
/* Create libltdl resources */
        lt_dlinit();   
#endif

/* Initialize the dispatch table with the info from the static drivers table
   and the available dynamic drivers. */

    plInitDispatchTable();
}

Here is the call graph for this function:

Here is the caller graph for this function:

FILE* plLibOpen ( char *  fn)

Definition at line 1162 of file plctrl.c.

{
    FILE *ret = NULL;
    
    PDFstrm *pdfs = plLibOpenPdfstrm(fn);
    if (pdfs == NULL) {
        return NULL;
    }
    if (pdfs->file != NULL) {
        ret = pdfs->file;
       pdfs->file = NULL;
    }
    pdf_close(pdfs);
    return ret;
}

Here is the call graph for this function:

void plP_bop ( void  )

Definition at line 96 of file plcore.c.

{
    int skip_driver_bop = 0;

    plP_subpInit();
    if (plsc->page_status == AT_BOP)
       return;

    plsc->page_status = AT_BOP;
    plsc->nplwin = 0;

/* Call user bop handler if present. */

    if (plsc->bop_handler != NULL)
       (*plsc->bop_handler) (plsc->bop_data, &skip_driver_bop);

    if (!skip_driver_bop)
       (*plsc->dispatch_table->pl_bop) ((struct PLStream_struct *) plsc);

    if (plsc->plbuf_write)
       plbuf_bop(plsc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLINT plP_checkdriverinit ( char *  names)

Definition at line 2725 of file plcore.c.

{
char *buff;
char *tok=NULL;
PLINT ret=0;   /* set up return code to 0, the value if no devices match*/

buff=(char *)malloc((size_t) PL_NSTREAMS*8); /* Allocate enough memory for 8 
                                                characters for each possible stream */

if (buff!=NULL)
   {
    memset(buff,0,PL_NSTREAMS*8);    /* Make sure we clear it               */
    plP_getinitdriverlist(buff);     /* Get the list of initialised devices */

    for (tok = strtok(buff, " ,");   /* Check each device against the "name" */
         tok; tok=strtok(0, " ,"))   /* supplied to the subroutine   */
        {
        if (strstr(names,tok)!=NULL)  /* Check to see if the device has been initialised */
           {
            ret++;                   /* Bump the return code if it has      */
           }                    
        }
    free(buff);                      /* Clear up that memory we allocated   */
    }
else 
   ret=-1;                           /* Error flag */

return(ret);
}

Here is the call graph for this function:

int plP_clip_poly ( int  Ni,
PLFLT Vi[3],
int  axis,
PLFLT  dir,
PLFLT  offset 
)

Definition at line 126 of file plot3d.c.

{
  int anyout = 0;
  PLFLT in[PL_MAXPOLY], T[3][PL_MAXPOLY];
  int No = 0;
  int i, j, k;

  for(i=0; i<Ni; i++) {
    in[i] = Vi[axis][i] * dir + offset;
    anyout += in[i] < 0;
  }

  /* none out */
  if(anyout == 0)
    return Ni;

  /* all out */
  if(anyout == Ni) {
    return 0;
  }

  /* some out */
  /* copy over to a temp vector */
  for(i=0; i<3; i++) {
    for(j=0; j<Ni; j++) {
      T[i][j] = Vi[i][j];
    }
  }
  /* copy back selectively */
  for(i=0; i<Ni; i++) {
    j = (i+1) % Ni;

    if(in[i]>=0 && in[j]>=0) {
      for(k=0; k<3; k++)
       Vi[k][No] = T[k][j];
      No++;
    } else if(in[i]>=0 && in[j]<0) {
      PLFLT u = in[i] / (in[i] - in[j]);
      for(k = 0; k<3; k++)
       Vi[k][No] = T[k][i]*(1-u) + T[k][j]*u;
      No++;
    } else if(in[i]<0 && in[j]>=0) {
      PLFLT u = in[i] / (in[i] - in[j]);
      for(k = 0; k<3; k++)
       Vi[k][No] = T[k][i]*(1-u) + T[k][j]*u;
      No++;
      for(k=0; k<3; k++)
       Vi[k][No] = T[k][j];
      No++;
    }
  }
  return No;
}

Here is the caller graph for this function:

Definition at line 135 of file plcvt.c.

{
    return ((PLFLT) (x * ABS(plsc->phyxma - plsc->phyxmi) / plsc->xpmm));
}

Here is the caller graph for this function:

Definition at line 143 of file plcvt.c.

{
    return ((PLFLT) (y * ABS(plsc->phyyma - plsc->phyymi) / plsc->ypmm));
}

Here is the caller graph for this function:

Definition at line 15 of file plcvt.c.

{
    return (ROUND(plsc->phyxmi + plsc->phyxlen * x));
}

Here is the caller graph for this function:

Definition at line 23 of file plcvt.c.

{
    return (ROUND(plsc->phyymi + plsc->phyylen * y));
}

Here is the caller graph for this function:

Definition at line 171 of file plcvt.c.

{
    return ((PLFLT) ((x - plsc->spdxmi) / (plsc->spdxma - plsc->spdxmi)));
}

Here is the caller graph for this function:

Definition at line 179 of file plcvt.c.

{
    return ((PLFLT) ((y - plsc->spdymi) / (plsc->spdyma - plsc->spdymi)));
}

Here is the caller graph for this function:

void plP_draphy ( PLINT  x,
PLINT  y 
)

Definition at line 364 of file plline.c.

{
    xline[0] = plsc->currx;
    xline[1] = x;
    yline[0] = plsc->curry;
    yline[1] = y;

    pllclp(xline, yline, 2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_draphy_poly ( PLINT x,
PLINT y,
PLINT  n 
)

Definition at line 413 of file plline.c.

{
    PLINT i, j, ib, ilim;

    for (ib = 0; ib < n; ib += PL_MAXPOLY - 1) {
       ilim = MIN(PL_MAXPOLY, n - ib);

       for (i = 0; i < ilim; i++) {
           j = ib + i;
           xline[i] = x[j];
           yline[i] = y[j];
       }
       pllclp(xline, yline, ilim);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_drawor ( PLFLT  x,
PLFLT  y 
)

Definition at line 394 of file plline.c.

{
    xline[0] = plsc->currx;
    xline[1] = plP_wcpcx(x);
    yline[0] = plsc->curry;
    yline[1] = plP_wcpcy(y);

    pllclp(xline, yline, 2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_drawor_poly ( PLFLT x,
PLFLT y,
PLINT  n 
)

Definition at line 438 of file plline.c.

{
    PLINT i, j, ib, ilim;

    for (ib = 0; ib < n; ib += PL_MAXPOLY - 1) {
       ilim = MIN(PL_MAXPOLY, n - ib);

       for (i = 0; i < ilim; i++) {
           j = ib + i;
           xline[i] = plP_wcpcx(x[j]);
           yline[i] = plP_wcpcy(y[j]);
       }
       pllclp(xline, yline, ilim);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_eop ( void  )

Definition at line 69 of file plcore.c.

{
    int skip_driver_eop = 0;

    if (plsc->page_status != DRAWING)
       return;

    plsc->page_status = AT_EOP;

    if (plsc->plbuf_write)
       plbuf_eop(plsc);

/* Call user eop handler if present. */

    if (plsc->eop_handler != NULL)
       (*plsc->eop_handler) (plsc->eop_data, &skip_driver_eop);

    if (!skip_driver_eop)
       (*plsc->dispatch_table->pl_eop) ((struct PLStream_struct *) plsc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_esc ( PLINT  op,
void ptr 
)

Definition at line 153 of file plcore.c.

{
    (*plsc->dispatch_table->pl_esc) ((struct PLStream_struct *) plsc, op, ptr);

    if (plsc->plbuf_write)
       plbuf_esc(plsc, op, ptr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_fill ( short *  x,
short *  y,
PLINT  npts 
)

Definition at line 276 of file plcore.c.

{
    PLINT i, clpxmi, clpxma, clpymi, clpyma;

    plsc->page_status = DRAWING;

    if (plsc->plbuf_write) {
       plsc->dev_npts = npts;
       plsc->dev_x = x;
       plsc->dev_y = y;
       plbuf_esc(plsc, PLESC_FILL, NULL);
    }

/* Account for driver ability to do fills */

    if (plsc->patt == 0 && ! plsc->dev_fill0) {
       if ( ! foo) {
           plwarn("Driver does not support hardware solid fills, switching to software fill.\n");
           foo = 1;
       }
       plsc->patt = 8;
       plpsty(plsc->patt);
    }
    if (plsc->dev_fill1) {
       plsc->patt = -ABS(plsc->patt);
    }

/* Perform fill.  Here we MUST NOT allow the software fill to pass through the
   driver interface filtering twice, else we get the infamous 2*rotation for
   software fills on orientation swaps. 
*/

    if (plsc->patt > 0)
       plfill_soft(x, y, npts);

    else {
       if (plsc->difilt) {
           for (i = 0; i < npts; i++) {
              xscl[i] = x[i];
              yscl[i] = y[i];
           }
           difilt(xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma);
           plP_plfclp(xscl, yscl, npts, clpxmi, clpxma, clpymi, clpyma,
                     grfill);
       }
       else {
           grfill(x, y, npts);
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_gclp ( PLINT p_ixmin,
PLINT p_ixmax,
PLINT p_iymin,
PLINT p_iymax 
)

Definition at line 2569 of file plcore.c.

{
    *p_ixmin = plsc->clpxmi;
    *p_ixmax = plsc->clpxma;
    *p_iymin = plsc->clpymi;
    *p_iymax = plsc->clpyma;
}

Here is the caller graph for this function:

void plP_gdom ( PLFLT p_xmin,
PLFLT p_xmax,
PLFLT p_ymin,
PLFLT p_ymax 
)

Definition at line 2536 of file plcore.c.

{
    *p_xmin = plsc->domxmi;
    *p_xmax = plsc->domxma;
    *p_ymin = plsc->domymi;
    *p_ymax = plsc->domyma;
}

Here is the caller graph for this function:

void plP_getinitdriverlist ( char *  names)

Definition at line 2695 of file plcore.c.

{
int i;

for (i=0;i<PL_NSTREAMS;++i)
   {
    if (pls[i]!=NULL)
       {
       if (i==0)
          strcpy(names,pls[i]->DevName);
       else
          { 
          strcat(names," ");
          strcat(names,pls[i]->DevName);
          }
       }
    else 
       break;
   }
}

Here is the caller graph for this function:

void plP_gphy ( PLINT p_ixmin,
PLINT p_ixmax,
PLINT p_iymin,
PLINT p_iymax 
)

Definition at line 2591 of file plcore.c.

{
    *p_ixmin = plsc->phyxmi;
    *p_ixmax = plsc->phyxma;
    *p_iymin = plsc->phyymi;
    *p_iymax = plsc->phyyma;
}

Here is the caller graph for this function:

void plP_gpixmm ( PLFLT p_x,
PLFLT p_y 
)

Definition at line 2622 of file plcore.c.

{
    *p_x = plsc->xpmm;
    *p_y = plsc->ypmm;
}

Here is the caller graph for this function:

void plP_gprec ( PLINT p_setp,
PLINT p_prec 
)

Definition at line 2333 of file plcore.c.

{
    *p_setp = plsc->setpre;
    *p_prec = plsc->precis;
}

Here is the caller graph for this function:

void plP_grange ( PLFLT p_zscl,
PLFLT p_zmin,
PLFLT p_zmax 
)

Definition at line 2547 of file plcore.c.

{
    *p_zscl = plsc->zzscl;
    *p_zmin = plsc->ranmi;
    *p_zmax = plsc->ranma;
}

Here is the caller graph for this function:

void plP_gsub ( PLINT p_nx,
PLINT p_ny,
PLINT p_cs 
)

Definition at line 2602 of file plcore.c.

{
    *p_nx = plsc->nsubx;
    *p_ny = plsc->nsuby;
    *p_cs = plsc->cursub;
}
void plP_gw3wc ( PLFLT p_dxx,
PLFLT p_dxy,
PLFLT p_dyx,
PLFLT p_dyy,
PLFLT p_dyz 
)

Definition at line 2557 of file plcore.c.

{
    *p_dxx = plsc->cxx;
    *p_dxy = plsc->cxy;
    *p_dyx = plsc->cyx;
    *p_dyy = plsc->cyy;
    *p_dyz = plsc->cyz;
}

Here is the caller graph for this function:

void plP_gzback ( PLINT **  zbf,
PLINT **  zbc,
PLFLT **  zbt 
)

Definition at line 999 of file plot3d.c.

{
    *zbf = &zbflg;
    *zbc = &zbcol;
    *zbt = &zbtck;
}

Here is the caller graph for this function:

void plP_image ( short *  x,
short *  y,
unsigned short *  z,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  ymin,
PLFLT  dx,
PLFLT  dy,
unsigned short  zmin,
unsigned short  zmax 
)

Definition at line 2766 of file plcore.c.

{
  PLINT i, npts;
  short *xscl, *yscl;
  int   plbuf_write;

  plsc->page_status = DRAWING;

  if (plsc->dev_fastimg == 0) {
    plimageslow(x, y, z, nx-1, ny-1, 
         xmin, ymin, dx, dy, zmin, zmax);
    return ;
  }

  if (plsc->plbuf_write) {
    IMG_DT img_dt;

    img_dt.xmin=xmin;
    img_dt.ymin=ymin;
    img_dt.dx=dx;
    img_dt.dy=dy;

    plsc->dev_ix = x;
    plsc->dev_iy = y;
    plsc->dev_z = z;
    plsc->dev_nptsX = nx;
    plsc->dev_nptsY = ny;
    plsc->dev_zmin = zmin;
    plsc->dev_zmax = zmax;

    plbuf_esc(plsc, PLESC_IMAGE, &img_dt);
  }

  /* avoid re-saving plot buffer while in plP_esc() */
  plbuf_write = plsc->plbuf_write;
  plsc->plbuf_write = 0; 

  npts = nx*ny;
  if (plsc->difilt) { /* isn't this odd? when replaying the plot buffer, e.g., when resizing the window, difilt() is caled again! the plot buffer should already contain the transformed data--it would save a lot of time! (and allow for differently oriented plots when in multiplot mode) */
    PLINT clpxmi, clpxma, clpymi, clpyma;
    
    xscl = (short *) malloc(nx*ny*sizeof(short));
    yscl = (short *) malloc(nx*ny*sizeof(short));
    for (i = 0; i < npts; i++) {
      xscl[i] = x[i];
      yscl[i] = y[i];
    }
    sdifilt(xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma);
    plsc->imclxmin = clpxmi;
    plsc->imclymin = clpymi;
    plsc->imclxmax = clpxma;
    plsc->imclymax = clpyma;
    grimage(xscl, yscl, z, nx, ny);    
    free(xscl);
    free(yscl);
  } else { 
    plsc->imclxmin = plsc->phyxmi;
    plsc->imclymin = plsc->phyymi;
    plsc->imclxmax = plsc->phyxma;
    plsc->imclymax = plsc->phyyma;
    grimage(x, y, z, nx, ny );
  }
  plsc->plbuf_write = plbuf_write;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 54 of file plcore.c.

{
    plsc->page_status = AT_EOP;

    (*plsc->dispatch_table->pl_init) ((struct PLStream_struct *) plsc);

    if (plsc->plbuf_write)
       plbuf_init(plsc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_line ( short *  x,
short *  y 
)

Definition at line 219 of file plcore.c.

{
    PLINT i, npts = 2, clpxmi, clpxma, clpymi, clpyma;

    plsc->page_status = DRAWING;

    if (plsc->plbuf_write)
       plbuf_line(plsc, x[0], y[0], x[1], y[1]);

    if (plsc->difilt) {
       for (i = 0; i < npts; i++) {
           xscl[i] = x[i];
           yscl[i] = y[i];
       }
       difilt(xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma);
       plP_pllclp(xscl, yscl, npts, clpxmi, clpxma, clpymi, clpyma, grline);
    }
    else {
       grline(x, y, npts);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 83 of file plcvt.c.

{
    return ((PLFLT) (x * plsc->xpmm / ABS(plsc->phyxma - plsc->phyxmi)));
}

Here is the caller graph for this function:

Definition at line 91 of file plcvt.c.

{
    return ((PLFLT) (y * plsc->ypmm / ABS(plsc->phyyma - plsc->phyymi)));
}

Here is the caller graph for this function:

Definition at line 31 of file plcvt.c.

{
    return (ROUND(plsc->phyxmi + plsc->xpmm * x));
}

Here is the caller graph for this function:

Definition at line 39 of file plcvt.c.

{
    return (ROUND(plsc->phyymi + plsc->ypmm * y));
}

Here is the caller graph for this function:

void plP_movphy ( PLINT  x,
PLINT  y 
)

Definition at line 351 of file plline.c.

{
    plsc->currx = x;
    plsc->curry = y;
}

Here is the caller graph for this function:

void plP_movwor ( PLFLT  x,
PLFLT  y 
)

Definition at line 381 of file plline.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 67 of file plcvt.c.

{
    return (PLFLT) ((x - plsc->phyxmi) / (double) plsc->phyxlen);
}

Here is the caller graph for this function:

Definition at line 75 of file plcvt.c.

{
    return (PLFLT) ((y - plsc->phyymi) / (double) plsc->phyylen);
}

Here is the caller graph for this function:

void plP_plfclp ( PLINT x,
PLINT y,
PLINT  npts,
PLINT  xmin,
PLINT  xmax,
PLINT  ymin,
PLINT  ymax,
void(*)(short *, short *, PLINT draw 
)

Definition at line 546 of file plline.c.

{
    PLINT x1, x2, y1, y2;
    PLINT i, iclp = -1;
    short xclp[PL_MAXPOLY], yclp[PL_MAXPOLY];
    int drawable;

    for (i = 0; i < npts - 1; i++) {
       x1 = x[i];
       x2 = x[i + 1];
       y1 = y[i];
       y2 = y[i + 1];

       drawable = (INSIDE(x1, y1) && INSIDE(x2, y2));
       if ( ! drawable)
           drawable = ! clipline(&x1, &y1, &x2, &y2, xmin, xmax, ymin, ymax);

       if (drawable) {

/* Not first point.  If first point of this segment matches up to the
   previous point, just add it.  */

           if (iclp >= 0 && x1 == xclp[iclp] && y1 == yclp[iclp]) {
              iclp++;
              xclp[iclp] = x2;
              yclp[iclp] = y2;
           }

/* First point of polyline, OR . */

/* If not, we need to add both points, to connect the points in the
 * polygon along the clip boundary.  If any of the previous points were
 * outside one of the 4 corners, assume the corner was encircled and add
 * it first. 
 */
           else {
              iclp++;
              xclp[iclp] = x1;
              yclp[iclp] = y1;

              if ((x1 == xmin && y2 == ymin) ||
                  (x2 == xmin && y1 == ymin)) {
                  iclp++;
                  xclp[iclp] = xmin;
                  yclp[iclp] = ymin;
              }
              else if ((x1 == xmax && y2 == ymin) ||
                      (x2 == xmax && y1 == ymin)) {
                  iclp++;
                  xclp[iclp] = xmax;
                  yclp[iclp] = ymin;
              }
              else if ((x1 == xmax && y2 == ymax) ||
                      (x2 == xmax && y1 == ymax)) {
                  iclp++;
                  xclp[iclp] = xmax;
                  yclp[iclp] = ymax;
              }
              else if ((x1 == xmin && y2 == ymax) ||
                      (x2 == xmin && y1 == ymax)) {
                  iclp++;
                  xclp[iclp] = xmin;
                  yclp[iclp] = ymax;
              }
           /* Experimental code from way back.
              Polygon clipping is HARD.
              {
                  int j;
                  for (j = 0; j < i; j++) {
                     if (x[j] < xmin && y[j] < ymin) {
                         break;
                     }
                     else if (x[j] < xmin && y[j] > ymax) {
                         iclp++;
                         xclp[iclp] = xmin;
                         yclp[iclp] = ymax;
                         break;
                     }
                     else if (x[j] > xmax && y[j] < ymin) {
                         iclp++;
                         xclp[iclp] = xmax;
                         yclp[iclp] = ymin;
                         break;
                     }
                     else if (x[j] > xmax && y[j] > ymax) {
                         iclp++;
                         xclp[iclp] = xmax;
                         yclp[iclp] = ymax;
                         break;
                     }
                  }
              }
           */
              iclp++;
              xclp[iclp] = x2;
              yclp[iclp] = y2;
           }
       }
    }

/* Draw the sucker */

    if (iclp + 1 >= 2) {
       if ((xclp[0] == xmin && yclp[iclp] == ymin) ||
           (xclp[iclp] == xmin && yclp[0] == ymin)) {
           iclp++;
           xclp[iclp] = xmin;
           yclp[iclp] = ymin;
       }
       else if ((xclp[0] == xmax && yclp[iclp] == ymin) ||
               (xclp[iclp] == xmax && yclp[0] == ymin)) {
           iclp++;
           xclp[iclp] = xmax;
           yclp[iclp] = ymin;
       }
       else if ((xclp[0] == xmax && yclp[iclp] == ymax) ||
               (xclp[iclp] == xmax && yclp[0] == ymax)) {
           iclp++;
           xclp[iclp] = xmax;
           yclp[iclp] = ymax;
       }
       else if ((xclp[0] == xmin && yclp[iclp] == ymax) ||
               (xclp[iclp] == xmin && yclp[0] == ymax)) {
           iclp++;
           xclp[iclp] = xmin;
           yclp[iclp] = ymax;
       }
    }
    if (iclp + 1 >= 3) {
      if(draw)
       (*draw)(xclp, yclp, iclp + 1);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_pllclp ( PLINT x,
PLINT y,
PLINT  npts,
PLINT  xmin,
PLINT  xmax,
PLINT  ymin,
PLINT  ymax,
void(*)(short *, short *, PLINT draw 
)

Definition at line 475 of file plline.c.

{
    PLINT x1, x2, y1, y2;
    PLINT i, iclp = 0;
    short xclp[PL_MAXPOLY], yclp[PL_MAXPOLY];
    int drawable;

    for (i = 0; i < npts - 1; i++) {
       x1 = x[i];
       x2 = x[i + 1];
       y1 = y[i];
       y2 = y[i + 1];

       drawable = (INSIDE(x1, y1) && INSIDE(x2, y2));
       if ( ! drawable)
           drawable = ! clipline(&x1, &y1, &x2, &y2, xmin, xmax, ymin, ymax);

       if (drawable) {

/* First point of polyline. */

           if (iclp == 0) {
              xclp[iclp] = x1;
              yclp[iclp] = y1;
              iclp++;
              xclp[iclp] = x2;
              yclp[iclp] = y2;
           }

/* Not first point.  Check if first point of this segment matches up to 
   previous point, and if so, add it to the current polyline buffer. */

           else if (x1 == xclp[iclp] && y1 == yclp[iclp]) {
              iclp++;
              xclp[iclp] = x2;
              yclp[iclp] = y2;
           }

/* Otherwise it's time to start a new polyline */

           else {
              if (iclp + 1 >= 2)
                  (*draw)(xclp, yclp, iclp + 1);
              iclp = 0;
              xclp[iclp] = x1;
              yclp[iclp] = y1;
              iclp++;
              xclp[iclp] = x2;
              yclp[iclp] = y2;
           }
       }
    }

/* Handle remaining polyline */

    if (iclp + 1 >= 2)
       (*draw)(xclp, yclp, iclp + 1);

    plsc->currx = x[npts-1];
    plsc->curry = y[npts-1];
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_polyline ( short *  x,
short *  y,
PLINT  npts 
)

Definition at line 245 of file plcore.c.

{
    PLINT i, clpxmi, clpxma, clpymi, clpyma;

    plsc->page_status = DRAWING;

    if (plsc->plbuf_write)
       plbuf_polyline(plsc, x, y, npts);

    if (plsc->difilt) {
       for (i = 0; i < npts; i++) {
           xscl[i] = x[i];
           yscl[i] = y[i];
       }
       difilt(xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma);
       plP_pllclp(xscl, yscl, npts, clpxmi, clpxma, clpymi, clpyma,
                 grpolyline);
    }
    else {
       grpolyline(x, y, npts);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 115 of file plcvt.c.

{
    return ((PLFLT) (plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * x));
}

Definition at line 123 of file plcvt.c.

{
    return ((PLFLT) (plsc->spdymi + (plsc->spdyma - plsc->spdymi) * y));
}
void plP_sclp ( PLINT  ixmin,
PLINT  ixmax,
PLINT  iymin,
PLINT  iymax 
)

Definition at line 2580 of file plcore.c.

{
    plsc->clpxmi = ixmin;
    plsc->clpxma = ixmax;
    plsc->clpymi = iymin;
    plsc->clpyma = iymax;
}

Here is the caller graph for this function:

void plP_setphy ( PLINT  xmin,
PLINT  xmax,
PLINT  ymin,
PLINT  ymax 
)

Definition at line 2642 of file plcore.c.

{
    if (xmin > xmax || ymin > ymax)
       plexit("plP_setphy: device minima must not exceed maxima");

    plsc->phyxmi = xmin;
    plsc->phyxma = xmax;
    plsc->phyymi = ymin;
    plsc->phyyma = ymax;
    plsc->phyxlen = xmax - xmin;
    plsc->phyylen = ymax - ymin;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_setpxl ( PLFLT  xpmm0,
PLFLT  ypmm0 
)

Definition at line 2631 of file plcore.c.

{
    plsc->xpmm = xpmm;
    plsc->ypmm = ypmm;
    plsc->umx = 1000.0 / plsc->xpmm;
    plsc->umy = 1000.0 / plsc->ypmm;
}

Here is the caller graph for this function:

Definition at line 164 of file plpage.c.

{
    PLINT ix, iy;

    ix = (plsc->cursub - 1) % plsc->nsubx;
    iy = plsc->nsuby - (plsc->cursub - 1) / plsc->nsubx;

    plsc->spdxmi = (PLFLT) (ix)     / (PLFLT) (plsc->nsubx);
    plsc->spdxma = (PLFLT) (ix + 1) / (PLFLT) (plsc->nsubx);
    plsc->spdymi = (PLFLT) (iy - 1) / (PLFLT) (plsc->nsuby);
    plsc->spdyma = (PLFLT) (iy)     / (PLFLT) (plsc->nsuby);

    plsc->sppxmi = plP_dcpcx(plsc->spdxmi);
    plsc->sppxma = plP_dcpcx(plsc->spdxma);
    plsc->sppymi = plP_dcpcy(plsc->spdymi);
    plsc->sppyma = plP_dcpcy(plsc->spdyma);

    plP_sclp(plsc->sppxmi, plsc->sppxma, plsc->sppymi, plsc->sppyma);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_ssub ( PLINT  nx,
PLINT  ny,
PLINT  cs 
)

Definition at line 2612 of file plcore.c.

{
    plsc->nsubx = nx;
    plsc->nsuby = ny;
    plsc->cursub = cs;
}
void plP_state ( PLINT  op)

Definition at line 142 of file plcore.c.

{
    (*plsc->dispatch_table->pl_state) ((struct PLStream_struct *) plsc, op);

    if (plsc->plbuf_write)
       plbuf_state(plsc, op);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLINT plP_stindex ( const char *  str1,
const char *  str2 
)

Definition at line 944 of file plsym.c.

{
    PLINT base, str1ind, str2ind;

    for (base = 0; *(str1 + base) != '\0'; base++) {
       for (str1ind = base, str2ind = 0; *(str2 + str2ind) != '\0' &&
            *(str2 + str2ind) == *(str1 + str1ind); str1ind++, str2ind++)
           ;

       if (*(str2 + str2ind) == '\0')
           return (PLINT) base;
    }
    return (PLINT) -1;             /* search failed */
}

Here is the caller graph for this function:

PLINT plP_strpos ( char *  str,
int  chr 
)

Definition at line 927 of file plsym.c.

{
    char *temp;

    if ((temp = strchr(str, chr)))
       return (PLINT) (temp - str);
    else
       return (PLINT) -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLINT plP_stsearch ( const char *  str,
int  chr 
)

Definition at line 966 of file plsym.c.

{
    if (strchr(str, chr))
       return (PLINT) 1;
    else if (strchr(str, toupper(chr)))
       return (PLINT) 1;
    else
       return (PLINT) 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 117 of file plpage.c.

{
    PLFLT scale, size_chr, size_sym, size_maj, size_min;

/* Subpage checks */

    if (plsc->nsubx <= 0)
       plsc->nsubx = 1;
    if (plsc->nsuby <= 0)
       plsc->nsuby = 1;

    plsc->cursub = 0;

/*
 * Set default sizes
 * Global scaling:
 *     Normalize to the page length for more uniform results.
 *     A virtual page length of 200 mm is assumed.
 * Subpage scaling:
 *     Reduce sizes with plot area (non-proportional, so that character
 *     size doesn't get too small).
 */
    scale = 0.5 *
       ((plsc->phyxma - plsc->phyxmi) / plsc->xpmm +
        (plsc->phyyma - plsc->phyymi) / plsc->ypmm) / 200.0;

    if (plsc->nsuby > 1)
       scale /= sqrt((double) plsc->nsuby);

    size_chr = 4.0;
    size_sym = 4.0;         /* All these in virtual plot units */
    size_maj = 3.0;
    size_min = 1.5;

    plsc->chrdef = plsc->chrht = size_chr * scale;
    plsc->symdef = plsc->symht = size_sym * scale;
    plsc->majdef = plsc->majht = size_maj * scale;
    plsc->mindef = plsc->minht = size_min * scale;
}

Here is the caller graph for this function:

void plP_swin ( PLWindow plwin)

Definition at line 166 of file plcore.c.

{
    PLWindow *w;
    PLINT clpxmi, clpxma, clpymi, clpyma;

/* Provide plot buffer with unfiltered window data */

    if (plsc->plbuf_write)
       plbuf_esc(plsc, PLESC_SWIN, (void *) plwin);

    w = &plsc->plwin[plsc->nplwin++ % PL_MAXWINDOWS];

    w->dxmi = plwin->dxmi;
    w->dxma = plwin->dxma;
    w->dymi = plwin->dymi;
    w->dyma = plwin->dyma;

    if (plsc->difilt) {
       xscl[0] = plP_dcpcx(w->dxmi);
       xscl[1] = plP_dcpcx(w->dxma);
       yscl[0] = plP_dcpcy(w->dymi);
       yscl[1] = plP_dcpcy(w->dyma);

       difilt(xscl, yscl, 2, &clpxmi, &clpxma, &clpymi, &clpyma);

       w->dxmi = plP_pcdcx(xscl[0]);
       w->dxma = plP_pcdcx(xscl[1]);
       w->dymi = plP_pcdcy(yscl[0]);
       w->dyma = plP_pcdcy(yscl[1]);
    }

    w->wxmi = plwin->wxmi;
    w->wxma = plwin->wxma;
    w->wymi = plwin->wymi;
    w->wyma = plwin->wyma;

/* If the driver wants to process swin commands, call it now */
/* It must use the filtered data, which it can get from *plsc */

    if (plsc->dev_swin) {
       (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
                                          PLESC_SWIN, NULL );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plP_text ( PLINT  base,
PLFLT  just,
PLFLT xform,
PLINT  x,
PLINT  y,
PLINT  refx,
PLINT  refy,
const char *  string 
)

Definition at line 333 of file plcore.c.

{
    if (plsc->dev_text) {
       EscText args;

       args.base = base;
       args.just = just;
       args.xform = xform;
       args.x = x;
       args.y = y;
       args.refx = refx;
       args.refy = refy;
       args.string = string;

       if (plsc->plbuf_write)
           plbuf_esc(plsc, PLESC_HAS_TEXT, &args);

       plP_esc(PLESC_HAS_TEXT, &args);
#ifndef DEBUG_TEXT
    } else {
#endif
       plstr(base, xform, refx, refy, string);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 122 of file plcore.c.

{
    if (plsc->tidy) {
       (*plsc->tidy) (plsc->tidy_data);
       plsc->tidy = NULL;
       plsc->tidy_data = NULL;
    }

    (*plsc->dispatch_table->pl_tidy) ((struct PLStream_struct *) plsc);

    if (plsc->plbuf_write)
       plbuf_tidy(plsc);

    plsc->OutFile = NULL;
    free_mem(plsc->FileName);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLFLT plP_w3wcx ( PLFLT  x,
PLFLT  y,
PLFLT  z 
)

Definition at line 191 of file plcvt.c.

{
    return ((PLFLT) ((x - plsc->basecx) * plsc->cxx +
                   (y - plsc->basecy) * plsc->cxy));
}

Here is the caller graph for this function:

PLFLT plP_w3wcy ( PLFLT  x,
PLFLT  y,
PLFLT  z 
)

Definition at line 200 of file plcvt.c.

{
    return ((PLFLT) ((x - plsc->basecx) * plsc->cyx +
                   (y - plsc->basecy) * plsc->cyy +
                   (z - plsc->ranmi) * plsc->cyz));
}

Here is the caller graph for this function:

Definition at line 99 of file plcvt.c.

{
    return ((PLFLT) (plsc->wdxoff + plsc->wdxscl * x));
}

Here is the caller graph for this function:

Definition at line 107 of file plcvt.c.

{
    return ((PLFLT) (plsc->wdyoff + plsc->wdyscl * y));
}

Here is the caller graph for this function:

Definition at line 151 of file plcvt.c.

{
    return ((PLFLT) (plsc->wmxoff + plsc->wmxscl * x));
}

Here is the caller graph for this function:

Definition at line 159 of file plcvt.c.

{
    return ((PLFLT) (plsc->wmyoff + plsc->wmyscl * y));
}

Here is the caller graph for this function:

Definition at line 47 of file plcvt.c.

{
    return (ROUND(plsc->wpxoff + plsc->wpxscl * x));
}

Here is the caller graph for this function:

Definition at line 55 of file plcvt.c.

{
    return (ROUND(plsc->wpyoff + plsc->wpyscl * y));
}

Here is the caller graph for this function:

Definition at line 1247 of file plargs.c.

                                {
  DrvOptCmd *drvp;
  DrvOpt *t;
  int fl;
  char msg[80];

  if (!drv_opt.option)
    return 1;

  drvp = &drv_opt;
  do {
    t = acc_opt; fl = 0;
    while (t->opt) {
      if (strcmp(drvp->option, t->opt) == 0) {
       fl = 1;
       switch (t->type) {

       case DRV_STR:
         *(char **)(t->var_ptr) = (drvp->value);
#ifdef DEBUG
         fprintf(stderr,"plParseDrvOpts: %s %s\n", t->opt, *(char**)t->var_ptr);
#endif
         break;

       case DRV_INT:
         if (sscanf(drvp->value, "%d", (int *)t->var_ptr) != 1) {
           sprintf(msg,"Incorrect argument to '%s' option", drvp->option);
           plexit(msg);
         }
#ifdef DEBUG
         fprintf(stderr,"plParseDrvOpts: %s %d\n", t->opt, *(int *) t->var_ptr);
#endif  
         break;

       case DRV_FLT:
         if (sscanf(drvp->value, "%f", (float *)t->var_ptr) != 1) {
           sprintf(msg,"Incorrect argument to '%s' option", drvp->option);
           plexit(msg);
         }
#ifdef DEBUG
         fprintf(stderr,"plParseDrvOpts: %s %f\n", t->opt, *(float *) t->var_ptr);
#endif  
         break;
       }
      }
    t++;
    }

    if (!fl) {
      sprintf(msg, "Option '%s' not recognized.\n\nRecognized options for this driver are:\n", drvp->option);
      plwarn(msg);
      plHelpDrvOpts(acc_opt);      
      plexit(""); 
    }
  }
  while((drvp = drvp->next))
      ;

  return 0;
}

Here is the call graph for this function:

void plstik ( PLFLT  mx,
PLFLT  my,
PLFLT  dx,
PLFLT  dy 
)

Definition at line 56 of file pltick.c.

{
    plP_draphy(plP_mmpcx(mx), plP_mmpcy(my));
    plP_draphy(plP_mmpcx((PLFLT) (mx + dx)), plP_mmpcy((PLFLT) (my + dy)));
    plP_draphy(plP_mmpcx(mx), plP_mmpcy(my));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plstr ( PLINT  base,
PLFLT xform,
PLINT  refx,
PLINT  refy,
const char *  string 
)

Definition at line 587 of file plsym.c.

{
    short int *symbol;
    signed char *vxygrid = 0;
    
    PLINT ch, i, length, level = 0, style, oline = 0, uline = 0;
    PLFLT width = 0., xorg = 0., yorg = 0., def, ht, dscale, scale;

    plgchr(&def, &ht);
    dscale = 0.05 * ht;
    scale = dscale;

/* Line style must be continuous */

    style = plsc->nms;
    plsc->nms = 0;

    pldeco(&symbol, &length, string);

    for (i = 0; i < length; i++) {
       ch = symbol[i];
       if (ch == -1) { /* super-script */
           level++;
           yorg += 16.0 * scale;
           scale = dscale * pow(0.75, (double) ABS(level));
       }
       else if (ch == -2) { /* sub-script */
           level--; 
           scale = dscale * pow(0.75, (double) ABS(level));
           yorg -= 16.0 * scale;
       }
       else if (ch == -3) /* back-char */
           xorg -= width * scale;
       else if (ch == -4) /* toogle overline */
           oline = !oline; 
       else if (ch == -5)  /* toogle underline */
           uline = !uline;
       else {
           if (plcvec(ch, &vxygrid))
              plchar(vxygrid, xform, base, oline, uline, refx, refy, scale,
                     plsc->xpmm, plsc->ypmm, &xorg, &yorg, &width);
       }
    }
    plsc->nms = style;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* plstrdup ( const char *  src)

Definition at line 1729 of file plctrl.c.

{
    char *dest = (char *) malloc( (strlen(src) + 1) * sizeof(char) );
    if (dest != NULL)
       strcpy(dest, src);
    else
       plabort("Out of memory");

    return dest;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLFLT plstrl ( const char *  string)

Definition at line 733 of file plsym.c.

{
    short int *symbol;
    signed char *vxygrid = 0;
    PLINT ch, i, length, level = 0;
    PLFLT width = 0., xorg = 0., dscale, scale, def, ht;

    plgchr(&def, &ht);
    dscale = 0.05 * ht;
    scale = dscale;
    pldeco(&symbol, &length, string);

    for (i = 0; i < length; i++) {
       ch = symbol[i];
       if (ch == -1) {
           level++;
           scale = dscale * pow(0.75, (double) ABS(level));
       }
       else if (ch == -2) {
           level--;
           scale = dscale * pow(0.75, (double) ABS(level));
       }
       else if (ch == -3)
           xorg -= width * scale;
       else if (ch == -4 || ch == -5);
       else {
           if (plcvec(ch, &vxygrid)) {
              width = vxygrid[3] - vxygrid[2];
              xorg += width * scale;
           }
       }
    }
    return (PLFLT) xorg;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1426 of file plcore.c.

{
    if ( ! plsc->initialized) {
       plsc->initialized = 1;

       if (plsc->cmap0 == NULL)
           plscmap0n(0);

       if (plsc->cmap1 == NULL)
           plscmap1n(0);
    }
}

Here is the caller graph for this function:

void plwarn ( char *  errormsg)

Definition at line 924 of file plctrl.c.

{
    int was_gfx = 0;

    if (plsc->graphx == 1) {
       was_gfx = 1;
       pltext();
    }

    fprintf(stderr, "\n*** PLPLOT WARNING ***\n");
    if (*errormsg != '\0')
       fprintf(stderr, "%s\n", errormsg);

    if (was_gfx == 1)
       plgra();
}

Here is the caller graph for this function:

void plxtik ( PLINT  x,
PLINT  y,
PLINT  below,
PLINT  above 
)

Definition at line 15 of file pltick.c.

{
    plP_draphy(x, y);

    if (below != 0)
       plP_draphy(x, y - below);

    if (above != 0)
       plP_draphy(x, y + above);

    plP_draphy(x, y);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void plytik ( PLINT  x,
PLINT  y,
PLINT  left,
PLINT  right 
)

Definition at line 35 of file pltick.c.

{
    plP_draphy(x, y);

    if (left != 0)
       plP_draphy(x - left, y);

    if (right != 0)
       plP_draphy(x + right, y);

    plP_draphy(x, y);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 28 of file plimage.c.

{
  PLINT op = ONEW2B;

  plsc->plbuf_write = 1; /* TODO: revert from previous state */
  plP_esc(PLESC_IMAGEOPS, &op);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 65 of file plcore.h.