home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d2xx
/
d222
/
plplot.lha
/
Plplot
/
src
/
source.zoo
/
plcvec.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-05-15
|
785b
|
39 lines
/* Gets the character digitisation of Hershey table entry "char" */
/* Returns 1 if there is a valid entry */
extern short int *buffer[];
extern int *findex[];
#include "plplot.h"
int plcvec(ch,xygrid)
int ch;
short int xygrid[];
{
int nc1, nc2, k, ib, ix, iy;
nc1=1;
nc2=3000;
if (ch < nc1 || ch > nc2) return(0);
ib = *(findex[(ch-nc1)/100] + (ch-nc1)%100);
if (ib == 0) return(0);
k=1;
xygrid[k-1]= *(buffer[(ib-1)/100] + (ib-1)%100);
k=k+1;
do {
ib=ib+1;
ix= *(buffer[(ib-1)/100]+(ib-1)%100)/128 - 64;
xygrid[k-1]=ix;
k=k+1;
iy = *(buffer[(ib-1)/100]+(ib-1)%100)%128 - 64;
xygrid[k-1]=iy;
k=k+1;
} while (ix != -64 || iy != -64);
return(1);
}