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