52 #define plr_rd( code ) \
53 if ( code ) { fprintf( stderr, \
54 "Unable to read from %s in %s at line %d, bytecount %lu\n", \
55 plr->iodev->typeName, __FILE__, __LINE__, (unsigned long) plr->pdfs->bp ); \
58 #define plr_cmd( code ) \
59 if ( ( code ) == -1 ) return -1;
64 { fprintf( stderr, "%s\nCommand code: %d, byte count: %lu\n", \
65 msg, csave, (unsigned long) plr->pdfs->bp ); return -1; }
174 fprintf( stderr,
"plr_process1: Unrecognized command code %d\n", c );
189 char tk_magic[80], tk_version[80], tag[80];
197 barf(
"plr_init: Invalid header" );
206 "Error: incapable of reading output of version %s.\n", tk_version );
207 barf(
"plr_init: Please obtain a newer copy of plserver." );
219 if ( !strcmp( tag,
"xmin" ) )
226 if ( !strcmp( tag,
"xmax" ) )
233 if ( !strcmp( tag,
"ymin" ) )
240 if ( !strcmp( tag,
"ymax" ) )
247 if ( !strcmp( tag,
"width" ) )
254 barf(
"plr_init: Unrecognized initialization tag." );
315 plr->
xold = x[npts - 1];
316 plr->
yold = y[npts - 1];
327 #define plr_rdn( code ) \
328 if ( code ) { fprintf( stderr, \
329 "Unable to read from %s in %s at line %d, bytecount %d\n\
330 Bytes requested: %d\n", plr->iodev->typeName, __FILE__, __LINE__, \
331 (int) plr->pdfs->bp, (int) 2 * n ); return -1; }
342 xs = (
short *) malloc(
sizeof (
short ) * (size_t) n );
343 ys = (
short *) malloc(
sizeof (
short ) * (size_t) n );
354 for ( i = 0; i < n; i++ )
455 col1 = (double) icol1 / (
double) plsc->ncol1;
473 for ( i = 0; i < plsc->ncol0; i++ )
490 for ( i = 0; i < plsc->ncol1; i++ )
499 for ( i = 0; i < plsc->ncp1; i++ )
506 plsc->cmap1cp[i].h = h;
507 plsc->cmap1cp[i].l = l;
508 plsc->cmap1cp[i].s = s;
509 plsc->cmap1cp[i].alt_hue_path = rev;
566 x = (
PLFLT *) malloc(
sizeof (
PLFLT ) * npts );
567 y = (
PLFLT *) malloc(
sizeof (
PLFLT ) * npts );
599 barf(
"plr_get: Unable to read character" );
616 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)
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)
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)