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" );