101 for ( i = 0; i < n; i++ )
103 c_plptex( x[i], y[i], 1., 0., 0.5,
string );
123 if ( plsc->level < 3 )
125 plabort(
"plsym: Please set up window first" );
130 plabort(
"plsym: Invalid code" );
134 for ( i = 0; i < n; i++ )
164 PLINT i, sym, ifont = plsc->cfont;
167 if ( plsc->level < 3 )
169 plabort(
"plpoin: Please set up window first" );
172 if ( code < -1 || code > 127 )
174 plabort(
"plpoin: Invalid code" );
180 for ( i = 0; i < n; i++ )
194 for ( i = 0; i < n; i++ )
227 PLINT i, sym, ifont = plsc->cfont;
229 PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;
231 if ( plsc->level < 3 )
233 plabort(
"plpoin3: Please set up window first" );
236 if ( code < -1 || code > 127 )
238 plabort(
"plpoin3: Invalid code" );
242 plP_gdom( &xmin, &xmax, &ymin, &ymax );
247 for ( i = 0; i < n; i++ )
249 if ( x[i] >= xmin && x[i] <= xmax &&
250 y[i] >= ymin && y[i] <= ymax &&
251 z[i] >= zmin && z[i] <= zmax )
266 for ( i = 0; i < n; i++ )
268 if ( x[i] >= xmin && x[i] <= xmax &&
269 y[i] >= ymin && y[i] <= ymax &&
270 z[i] >= zmin && z[i] <= zmax )
305 PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;
307 if ( plsc->level < 3 )
309 plabort(
"plstring3: Please set up window first" );
313 plP_gdom( &xmin, &xmax, &ymin, &ymax );
316 for ( i = 0; i < n; i++ )
318 if ( x[i] >= xmin && x[i] <= xmax &&
319 y[i] >= ymin && y[i] <= ymax &&
320 z[i] >= zmin && z[i] <= zmax )
324 c_plptex( u, v, 1., 0., 0.5,
string );
358 if ( ( plsc->dev_text ) && ( plsc->dev_unicode ) && ( !plsc->dev_hrshsym ) )
371 if ( ( unicode_char == 0 ) || ( idx == -1 ) )
373 #ifndef PL_TEST_FOR_MISSING_GLYPHS
404 plhrsh_unicode_buffer[0] = unicode_char;
410 plhrsh_unicode_buffer[1] = unicode_char;
418 plsc->original_chrht = plsc->chrht;
419 plsc->original_chrdef = plsc->chrdef;
420 plsc->chrht = plsc->symht;
421 plsc->chrdef = plsc->symdef;
423 if ( plsc->alt_unicode )
428 args.
n_char = unicode_char;
440 plsc->chrht = plsc->original_chrht;
441 plsc->chrdef = plsc->original_chrdef;
459 PLINT cx, cy, k, penup, style;
460 signed char *vxygrid = 0;
461 PLFLT scale, xscale, yscale;
465 scale = 0.05 * plsc->symht;
467 if ( !
plcvec( ch, &vxygrid ) )
480 xscale = scale * plsc->xpmm;
481 yscale = scale * plsc->ypmm;
488 if ( cx == 64 && cy == 64 )
499 else if ( cx == 64 && cy == 0 )
510 llx[l] =
ROUND( x + xscale * cx );
511 lly[l++] =
ROUND( y + yscale * cy );
517 llx[l] =
ROUND( x + xscale * cx );
518 lly[l++] =
ROUND( y + yscale * cy );
533 if ( plsc->level < 2 )
535 plabort(
"pllab: Please set up viewport first" );
579 PLINT clpxmi, clpxma, clpymi, clpyma;
580 PLINT vert, refx, refy, x, y;
581 PLFLT xdv, ydv, xmm, ymm, refxmm, refymm, shift,
xform[4];
585 if ( plsc->level < 2 )
587 plabort(
"plmtex: Please set up viewport first" );
593 plP_gclp( &clpxmi, &clpxma, &clpymi, &clpyma );
594 plP_sclp( plsc->sppxmi, plsc->sppxma, plsc->sppymi, plsc->sppyma );
599 xdv = plsc->vpdxmi + ( plsc->vpdxma - plsc->vpdxmi ) * pos;
607 xdv = plsc->vpdxmi + ( plsc->vpdxma - plsc->vpdxmi ) * pos;
615 xdv = plsc->vpdxmi + ( plsc->vpdxma - plsc->vpdxmi ) * pos;
623 xdv = plsc->vpdxmi + ( plsc->vpdxma - plsc->vpdxmi ) * pos;
632 ydv = plsc->vpdymi + ( plsc->vpdyma - plsc->vpdymi ) * pos;
640 ydv = plsc->vpdymi + ( plsc->vpdyma - plsc->vpdymi ) * pos;
648 ydv = plsc->vpdymi + ( plsc->vpdyma - plsc->vpdymi ) * pos;
656 ydv = plsc->vpdymi + ( plsc->vpdyma - plsc->vpdymi ) * pos;
662 plP_sclp( clpxmi, clpxma, clpymi, clpyma );
685 plgchr( &chrdef, &chrht );
686 shift = ( just == 0.0 ) ? 0.0 :
plstrl( text ) * just;
690 refxmm = xmm - shift * xform[0];
691 refymm = ymm - shift * xform[2];
700 plP_text( 0, just, xform, x, y, refx, refy, text );
701 plP_sclp( clpxmi, clpxma, clpymi, clpyma );
718 PLINT x, y, refx, refy;
719 PLFLT xdv, ydv, xmm, ymm, refxmm, refymm, shift, cc, ss;
723 PLFLT wxt, wyt, dxt, dyt;
725 if ( plsc->level < 3 )
727 plabort(
"plptex: Please set up window first" );
733 TRANSFORM( wx + dx, wy + dy, &dxt, &dyt );
736 if ( dxt == 0.0 && dyt == 0.0 )
742 cc = plsc->wmxscl * dxt;
743 ss = plsc->wmyscl * dyt;
744 diag = sqrt( cc * cc + ss * ss );
761 plgchr( &chrdef, &chrht );
762 shift = ( just == 0.0 ) ? 0.0 :
plstrl( text ) * just;
766 refxmm = xmm - shift * xform[0];
767 refymm = ymm - shift * xform[2];
774 plP_text( 0, just, xform, x, y, refx, refy, text );
795 signed char *vxygrid = 0;
797 PLINT ch, i, length, level = 0, style, oline = 0, uline = 0;
798 PLFLT width = 0., xorg = 0., yorg = 0., def, ht, dscale, scale;
799 PLFLT old_sscale, sscale, old_soffset, soffset;
810 pldeco( &symbol, &length,
string );
812 for ( i = 0; i < length; i++ )
818 &old_sscale, &sscale, &old_soffset, &soffset );
819 yorg = 16.0 * dscale * soffset;
820 scale = dscale * sscale;
825 &old_sscale, &sscale, &old_soffset, &soffset );
826 yorg = -16.0 * dscale * soffset;
827 scale = dscale * sscale;
830 xorg -= width * scale;
837 if (
plcvec( ch, &vxygrid ) )
838 plchar( vxygrid, xform, base, oline, uline, refx, refy, scale,
839 plsc->xpmm, plsc->ypmm, &xorg, &yorg, &width );
856 PLINT xbase, ybase, ydisp, lx, ly, cx, cy;
862 *p_width = vxygrid[3] - xbase;
880 if ( cx == 64 && cy == 64 )
889 if ( cx == 64 && cy == 0 )
900 x = *p_xorg + ( cx - xbase ) * scale;
901 y = *p_yorg + ( cy - ybase ) * scale;
902 lx = refx +
ROUND( xpmm * ( xform[0] * x + xform[1] * y ) );
903 ly = refy +
ROUND( ypmm * ( xform[2] * x + xform[3] * y ) );
927 y = *p_yorg + ( 30 + ydisp ) * scale;
928 lx = refx +
ROUND( xpmm * ( xform[0] * x + xform[1] * y ) );
929 ly = refy +
ROUND( ypmm * ( xform[2] * x + xform[3] * y ) );
931 x = *p_xorg + *p_width * scale;
932 lx = refx +
ROUND( xpmm * ( xform[0] * x + xform[1] * y ) );
933 ly = refy +
ROUND( ypmm * ( xform[2] * x + xform[3] * y ) );
939 y = *p_yorg + ( -5 + ydisp ) * scale;
940 lx = refx +
ROUND( xpmm * ( xform[0] * x + xform[1] * y ) );
941 ly = refy +
ROUND( ypmm * ( xform[2] * x + xform[3] * y ) );
943 x = *p_xorg + *p_width * scale;
944 lx = refx +
ROUND( xpmm * ( xform[0] * x + xform[1] * y ) );
945 ly = refy +
ROUND( ypmm * ( xform[2] * x + xform[3] * y ) );
948 *p_xorg = *p_xorg + *p_width * scale;
961 signed char *vxygrid = 0;
962 PLINT ch, i, length, level = 0;
963 PLFLT width = 0., xorg = 0., dscale, scale, def, ht;
976 if ( plsc->has_string_length )
979 plsc->plbuf_write =
FALSE;
980 plsc->get_string_length = 1;
981 c_plmtex(
"t", 0.0, 0.0, 0.0,
string );
982 plsc->get_string_length = 0;
984 return (
PLFLT) plsc->string_length;
991 pldeco( &symbol, &length,
string );
993 for ( i = 0; i < length; i++ )
999 scale = dscale * pow( 0.75, (
double)
ABS( level ) );
1001 else if ( ch == -2 )
1004 scale = dscale * pow( 0.75, (
double)
ABS( level ) );
1006 else if ( ch == -3 )
1007 xorg -= width * scale;
1008 else if ( ch == -4 || ch == -5 )
1012 if (
plcvec( ch, &vxygrid ) )
1014 width = vxygrid[3] - vxygrid[2];
1015 xorg += width * scale;
1019 return (
PLFLT) xorg;
1049 }
while ( ( x != 64 || y != 64 ) && k <= (
STLEN - 2 ) );
1051 if ( k == (
STLEN - 1 ) )
1090 PLINT ch, ifont = plsc->cfont, ig, j = 0, lentxt = (
PLINT) strlen( text );
1104 while ( j < lentxt )
1110 if ( ch < 0 || ch > 175 )
1115 if ( ch == esc && ( lentxt - j ) >= 1 )
1121 else if ( test ==
'u' || test ==
'U' )
1122 sym[( *length )++] = -1;
1124 else if ( test ==
'd' || test ==
'D' )
1125 sym[( *length )++] = -2;
1127 else if ( test ==
'b' || test ==
'B' )
1128 sym[( *length )++] = -3;
1130 else if ( test ==
'+' )
1131 sym[( *length )++] = -4;
1133 else if ( test ==
'-' )
1134 sym[( *length )++] = -5;
1136 else if ( test ==
'(' )
1139 while (
'0' <= text[j] && text[j] <=
'9' )
1141 sym[*length] = (short) ( (
int) sym[*length] * 10 + text[j] -
'0' );
1145 if ( text[j] ==
')' )
1148 else if ( test ==
'f' || test ==
'F' )
1152 isupper( test ) ? tolower( test ) : test );
1156 else if ( test ==
'g' || test ==
'G' )
1168 sym[( *length )++] =
1202 if ( ( temp = strchr( str, chr ) ) )
1203 return (
PLINT) ( temp - str );
1217 PLINT base, str1ind, str2ind;
1219 for ( base = 0; *( str1 + base ) !=
'\0'; base++ )
1221 for ( str1ind = base, str2ind = 0; *( str2 + str2ind ) !=
'\0' &&
1222 *( str2 + str2ind ) == *( str1 + str1ind ); str1ind++, str2ind++ )
1225 if ( *( str2 + str2ind ) ==
'\0' )
1226 return (
PLINT) base;
1240 if ( strchr( str, chr ) )
1242 else if ( strchr( str, toupper( chr ) ) )
1295 *old_scale = *scale;
1296 *old_offset = *offset;
1298 if ( ( *level >= 0 && ifupper ) || ( *level <= 0 && !ifupper ) )
1301 *scale = 0.75 * *old_scale;
1302 *offset = *old_offset + *old_scale;
1307 *scale = *old_scale / 0.75;
1308 *offset = *old_offset - *scale;
1326 if ( plsc->level < 1 )
1328 plabort(
"plfont: Please call plinit first" );
1331 if ( ifont < 1 || ifont > 4 )
1333 plabort(
"plfont: Invalid font" );
1337 plsc->cfont = ifont;
1378 static PLINT charset;
1395 plexit(
"Unable to either (1) open/find or (2) allocate memory for the font file" );
1403 fntlkup = (
short int *) malloc( (
size_t) bffrleng *
sizeof (
short int ) );
1405 plexit(
"plfntld: Out of memory while allocating font buffer." );
1412 fntindx = (
short int *) malloc( (
size_t)
indxleng *
sizeof (
short int ) );
1414 plexit(
"plfntld: Out of memory while allocating font buffer." );
1422 fntbffr = (
signed char *) malloc( 2 * (
size_t) bffrleng *
sizeof (
signed char ) );
1424 plexit(
"plfntld: Out of memory while allocating font buffer." );
1426 #if PLPLOT_USE_TCL_CHANNELS
1427 pdf_rdx(
fntbffr,
sizeof (
signed char ) * (
size_t) ( 2 * bffrleng ), pdfs );
1430 (
size_t) ( 2 * bffrleng ), pdfs->
file );
1474 #ifdef SIMPLE_BUT_SAFE_HERSHEY_LOOKUP
1489 while ( jhi - jlo > 1 )
1495 jmid = ( jlo + jhi ) / 2;
1533 int jlo = -1, jmid, jhi = nlookup;
1534 while ( jhi - jlo > 1 )
1540 jmid = ( jlo + jhi ) / 2;
1541 if ( fci > lookup[jmid].fci )
1543 else if ( fci < lookup[jmid].fci )
1595 PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale;
1596 PLFLT chrdef, chrht;
1599 PLFLT xpc, ypc, xrefpc, yrefpc;
1600 PLFLT epx1 = 0.0, epy1 = 0.0, epx2 = 0.0, epy2 = 0.0, epx3 = 0.0, epy3 = 0.0;
1602 PLFLT shift, theta, temp;
1605 if ( plsc->level < 3 )
1607 plabort(
"plmtex3: Please set up window first" );
1612 plP_gdom( &xmin, &xmax, &ymin, &ymax );
1614 plgchr( &chrdef, &chrht );
1677 if ( ( epx2 - epx1 ) != 0.0 )
1679 theta = atan( ( epy2 - epy1 ) / ( epx2 - epx1 ) );
1695 dispy = disp * chrht;
1699 xpc = pos * ( epx2 - epx1 ) + epx1;
1700 ypc = pos * ( epy2 - epy1 ) + epy1;
1713 shift =
plstrl( text ) * just;
1718 yrefpc = ypc - shift;
1722 xrefpc = xpc - cos( theta ) * shift;
1723 yrefpc = ypc - sin( theta ) * shift;
1738 xform[1] = -cos( theta );
1740 xform[3] = -sin( theta );
1747 xform[0] = cos( theta );
1749 xform[2] = sin( theta );
1847 if ( ( epx3 - epx1 ) != 0.0 )
1849 theta = atan( ( epy3 - epy1 ) / ( epx3 - epx1 ) );
1865 dispx = -cos( theta ) * disp * chrht;
1866 dispy = -sin( theta ) * disp * chrht;
1870 if ( ( epx1 - epx3 ) != 0.0 )
1872 theta = -atan( ( epy3 - epy1 ) / ( epx1 - epx3 ) );
1886 dispx = cos( theta ) * disp * chrht;
1887 dispy = sin( theta ) * disp * chrht;
1893 ypc = pos * ( epy2 - epy1 ) + epy1;
1900 shift =
plstrl( text ) * just;
1904 xrefpc = xpc - cos( theta ) * shift;
1905 yrefpc = ypc - sin( theta ) * shift;
1910 yrefpc = ypc - shift;
1922 xform[0] = cos( theta );
1924 xform[2] = sin( theta );
1933 xform[1] = -cos( theta );
1935 xform[3] = -sin( theta );
1967 PLFLT xpc, ypc, xrefpc, yrefpc, xdpc, ydpc, xspc, yspc, ld, ls, cp, shift;
1968 PLFLT x_o, y_o, z_o, x_dx, y_dy, z_dz;
1969 PLFLT theta, phi, stride,
xform[6], affineL[6], cosphi;
1972 if ( plsc->level < 3 )
1974 plabort(
"plptex3: Please set up window first" );
1985 theta = atan2( ydpc - ypc, xdpc - xpc );
1997 if ( ( sx == 0.0 ) && ( sy == 0.0 ) && ( sz == 0.0 ) )
2005 ld = sqrt( ( xpc - xdpc ) * ( xpc - xdpc ) + ( ypc - ydpc ) * ( ypc - ydpc ) );
2006 ls = sqrt( ( xpc - xspc ) * ( xpc - xspc ) + ( ypc - yspc ) * ( ypc - yspc ) );
2007 phi = acos( ( ( xdpc - xpc ) * ( xspc - xpc ) + ( ydpc - ypc ) * ( yspc - ypc ) ) / ( ld * ls ) );
2008 cp = ( xdpc - xpc ) * ( yspc - ypc ) - ( ydpc - ypc ) * ( xspc - xpc );
2013 phi = 0.5 *
PI - phi;
2023 x_dx = x_o -
plP_w3wcx( wx + dx, wy + dy, wz + dz );
2024 y_dy = y_o -
plP_w3wcy( wx + dx, wy + dy, wz + dz );
2025 z_dz = z_o -
plP_w3wcz( wx + dx, wy + dy, wz + dz );
2027 stride = sqrt( x_dx * x_dx + y_dy * y_dy );
2028 stride = stride / sqrt( x_dx * x_dx + y_dy * y_dy + z_dz * z_dz );
2034 shift =
plstrl( text ) * just;
2035 xrefpc = xpc - cos( theta ) * shift * stride;
2036 yrefpc = ypc - sin( theta ) * shift * stride;
2058 cosphi = cos( phi );
2059 if ( fabs( cosphi ) > 1.e-300 )
2086 plwarn(
"plsfont: Value for family is out of range" );
2095 plwarn(
"plsfont: Value for style is out of range" );
2104 plwarn(
"plsfont: Value for weight is out of range" );
2130 *p_family = (
PLINT) val;
2136 *p_style = (
PLINT) val;
2142 *p_weight = (
PLINT) val;
void plP_script_scale(PLBOOL ifupper, PLINT *level, PLFLT *old_scale, PLFLT *scale, PLFLT *old_offset, PLFLT *offset)
int pdf_rdx(U_CHAR *x, long nitems, PDFstrm *pdfs)
void plexit(PLCHAR_VECTOR errormsg)
void c_plstring3(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLCHAR_VECTOR string)
void plP_esc(PLINT op, void *ptr)
void c_plmtex(PLCHAR_VECTOR side, PLFLT disp, PLFLT pos, PLFLT just, PLCHAR_VECTOR text)
void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
PLFLT plP_w3wcz(PLFLT x, PLFLT y, PLFLT z)
static void plhrsh2(PLINT ch, PLINT x, PLINT y)
static void pldeco(short int **sym, PLINT *length, PLCHAR_VECTOR text)
PLINT plP_stindex(PLCHAR_VECTOR str1, PLCHAR_VECTOR str2)
const char plP_greek_mnemonic[]
static short int * fntindx
void plP_grange(PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax)
const char * PLCHAR_VECTOR
void plP_text(PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
static void plchar(signed char *xygrid, PLFLT *xform, PLINT base, PLINT oline, PLINT uline, PLINT refx, PLINT refy, PLFLT scale, PLFLT xpmm, PLFLT ypmm, PLFLT *p_xorg, PLFLT *p_yorg, PLFLT *p_width)
PLBOOL plP_stsearch(PLCHAR_VECTOR str, int chr)
void c_plpoin3(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLINT code)
int pdf_rd_2bytes(PDFstrm *pdfs, U_SHORT *ps)
static short int numberfonts
void plabort(PLCHAR_VECTOR errormsg)
int hershey2unicode(int in)
static short symbol_buffer[PLMAXSTR]
void c_plstring(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLCHAR_VECTOR string)
void c_plpoin(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT code)
PLFLT plstrl(PLCHAR_VECTOR string)
void plP_affine_yskew(PLFLT *affine_vector, PLFLT angle)
void c_plmtex3(PLCHAR_VECTOR side, PLFLT disp, PLFLT pos, PLFLT just, PLCHAR_VECTOR text)
void plstr(PLINT base, PLFLT *xform, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
static PLINT plcvec(PLINT ch, signed char **xygr)
static const char font_types[]
void plP_gclp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
const unsigned char * pfont
void c_plsfont(PLINT family, PLINT style, PLINT weight)
static signed char * fntbffr
void c_plgfont(PLINT *p_family, PLINT *p_style, PLINT *p_weight)
void plio_fread(void *buf, size_t size, size_t nmemb, FILE *stream)
enum EscText::@5 text_type
static short int numberchars
void c_plsym(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT code)
void c_pllab(PLCHAR_VECTOR xlabel, PLCHAR_VECTOR ylabel, PLCHAR_VECTOR tlabel)
#define TRANSFORM(x, y, xnew, ynew)
void xform(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Hershey_to_Unicode_table hershey_to_unicode_lookup_table[]
void plP_affine_multiply(PLFLT *affine_vectorA, PLFLT_VECTOR affine_vectorB, PLFLT_VECTOR affine_vectorC)
void plP_affine_rotate(PLFLT *affine_vector, PLFLT angle)
PLFLT plP_w3wcy(PLFLT x, PLFLT y, PLFLT z)
void plhrsh(PLINT ch, PLINT x, PLINT y)
unsigned short unicode_array_len
int plhershey2unicode(int in)
void plP_draphy(PLINT x, PLINT y)
void c_plfont(PLINT ifont)
static short int * fntlkup
PLFLT plP_w3wcx(PLFLT x, PLFLT y, PLFLT PL_UNUSED(z))
int pdf_close(PDFstrm *pdfs)
void plP_draphy_poly(PLINT *x, PLINT *y, PLINT n)
void plP_hex2fci(unsigned char hexdigit, unsigned char hexpower, PLUNICODE *pfci)
void plP_movphy(PLINT x, PLINT y)
PLCHAR_VECTOR plP_FCI2FontName(PLUNICODE fci, const FCI_to_FontName_Table lookup[], const int nlookup)
void c_plptex(PLFLT wx, PLFLT wy, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text)
void plwarn(PLCHAR_VECTOR errormsg)
void c_plptex3(PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz, PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, PLCHAR_VECTOR text)
int pdf_rd_2nbytes(PDFstrm *pdfs, U_SHORT *s, PLINT n)
void plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)
static short int indxleng
void plbuf_write(PLStream *pls, void *data, size_t bytes)
int number_of_entries_in_hershey_to_unicode_table
static signed char xygrid[STLEN]
const PLFLT * PLFLT_VECTOR
PDFstrm * plLibOpenPdfstrm(PLCHAR_VECTOR fn)
PLUNICODE * unicode_array
void plP_affine_scale(PLFLT *affine_vector, PLFLT xscale, PLFLT yscale)
void plP_gdom(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
PLINT plP_strpos(PLCHAR_VECTOR str, int chr)