54 #define plr_rd( code ) \
55 if ( code ) { fprintf( stderr, \
56 "Unable to read from %s in %s at line %d, bytecount %lu\n", \
57 plr->iodev->typeName, __FILE__, __LINE__, (unsigned long) plr->pdfs->bp ); \
60 #define plr_cmd( code ) \
61 if ( ( code ) == -1 ) return -1;
66 { fprintf( stderr, "%s\nCommand code: %d, byte count: %lu\n", \
67 msg, csave, (unsigned long) plr->pdfs->bp ); return -1; }
176 fprintf( stderr,
"plr_process1: Unrecognized command code %d\n", c );
191 char tk_magic[80], tk_version[80], tag[80];
199 barf(
"plr_init: Invalid header" );
208 "Error: incapable of reading output of version %s.\n", tk_version );
209 barf(
"plr_init: Please obtain a newer copy of plserver." );
221 if ( !strcmp( tag,
"xmin" ) )
228 if ( !strcmp( tag,
"xmax" ) )
235 if ( !strcmp( tag,
"ymin" ) )
242 if ( !strcmp( tag,
"ymax" ) )
249 if ( !strcmp( tag,
"width" ) )
256 barf(
"plr_init: Unrecognized initialization tag." );
317 plr->
xold = x[npts - 1];
318 plr->
yold = y[npts - 1];
329 #define plr_rdn( code ) \
330 if ( code ) { fprintf( stderr, \
331 "Unable to read from %s in %s at line %d, bytecount %d\n\
332 Bytes requested: %d\n", plr->iodev->typeName, __FILE__, __LINE__, \
333 (int) plr->pdfs->bp, (int) 2 * n ); return -1; }
344 xs = (
short *) malloc(
sizeof (
short ) * (size_t) n );
345 ys = (
short *) malloc(
sizeof (
short ) * (size_t) n );
356 for ( i = 0; i < n; i++ )
457 col1 = (double) icol1 / (
double) plsc->ncol1;
475 for ( i = 0; i < plsc->ncol0; i++ )
492 for ( i = 0; i < plsc->ncol1; i++ )
501 for ( i = 0; i < plsc->ncp1; i++ )
508 plsc->cmap1cp[i].h = h;
509 plsc->cmap1cp[i].l = l;
510 plsc->cmap1cp[i].s = s;
511 plsc->cmap1cp[i].alt_hue_path = rev;
568 x = (
PLFLT *) malloc(
sizeof (
PLFLT ) * npts );
569 y = (
PLFLT *) malloc(
sizeof (
PLFLT ) * npts );
601 barf(
"plr_get: Unable to read character" );
618 barf(
"plr_unget: Unable to push back character" );
int plr_process(PLRDev *plr)
static int plr_line(PLRDev *plr, int c)
static U_SHORT dum_ushort
static int plr_get(PLRDev *plr)
static int plr_bop(PLRDev *plr)
void plr_start(PLRDev *plr)
static PLFLT ystatic[PL_MAXPOLY]
int pdf_rd_2bytes(PDFstrm *pdfs, U_SHORT *ps)
void PLFLT PLINT PLINT PLFLT x
static int plr_state(PLRDev *plr)
static int get_ncoords(PLRDev *plr, PLFLT *x, PLFLT *y, PLINT n)
static int plr_process1(PLRDev *plr, int c)
void PLFLT PLINT PLINT PLFLT PLFLT y
static int plr_eop(PLRDev *plr)
static int plr_esc(PLRDev *plr)
int pdf_getc(PDFstrm *pdfs)
int pdf_rd_ieeef(PDFstrm *pdfs, float *pf)
static int plresc_fill(PLRDev *plr)
void pl_cmd(PLINT op, void *ptr)
int pdf_ungetc(int c, PDFstrm *pdfs)
int pdf_rd_1byte(PDFstrm *pdfs, U_CHAR *ps)
static int plr_init(PLRDev *plr)
static PLFLT xstatic[PL_MAXPOLY]
int pdf_rd_header(PDFstrm *pdfs, char *header)
static int plr_unget(PLRDev *plr, U_CHAR c)
int pdf_rd_2nbytes(PDFstrm *pdfs, U_SHORT *s, PLINT n)