src/AddOns/Fits/cfitsio 99/eval_l.c
/* 
   expr_read is lifted from old ftools.skel. 
   Now we can use any version of flex with
   no .skel file necessary! MJT - 13 June 1996

   keep a memory of how many bytes have been
   read previously, so that an unlimited-sized
   buffer can be supported. PDW - 28 Feb 1998
*/
expr_read is lifted from old ftools.skel.
Now we can use any version of flex with
no .skel file necessary.

keep a memory of how many bytes have been
read previously, so that an unlimited-sized
buffer can be supported.
expr_read is lifted from old ftools . skel . Now we can use any version of flex with no . skel file necessary . keep a memory of how many bytes have been read previously so that an unlimited - sized buffer can be supported .
static int expr_read(char *buf, int nbytes)
{
 int n;
 n = 0;
 if( !gParse.is_eobuf ) {
     do {
        buf[n++] = gParse.expr[gParse.index++];
       } while ((n<nbytes)&&(gParse.expr[gParse.index] != '\0'));
     if( gParse.expr[gParse.index] == '\0' ) gParse.is_eobuf = 1;
 }
 buf[n] = '\0';
 return(n);
}
static int expr_read ( char * buf , int nbytes ) { int n ; n = 0 ; if ( ! gParse . is_eobuf ) { do { buf [ n ++ ] = gParse . expr [ gParse . index ++ ] ; } while ( ( n < nbytes ) && ( gParse . expr [ gParse . index ] != ' \0 ' ) ) ; if ( gParse . expr [ gParse . index ] == ' \0 ' ) gParse . is_eobuf = 1 ; } buf [ n ] = ' \0 ' ; return ( n ) ; }
expr_read is lifted from old ftools.skel.
expr_read is lifted from old ftools . skel .