home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / gle / gle / begin.c < prev    next >
C/C++ Source or Header  |  1992-11-29  |  745b  |  53 lines

  1. #include "all.h"
  2. #define BEGINDEF
  3. #include "begin.h"
  4. #define true (!false)
  5. #define false 0
  6.  
  7. begin_token(long **pcode,int *cp,int *pln,char *srclin,char *tk,int *ntk,char *outbuff)
  8. {
  9.     if (*((*pcode)+*cp-1)==0) { /* back step a line */
  10.         (*pln)--;
  11.         return false;
  12.     }
  13.     strcpy(srclin,(char *) ((*pcode)+*cp));
  14.     (*pcode) = (*gpcode)[(*pln)++]; *cp = 0;
  15.     token(srclin,(TOKENS) tk,ntk,outbuff);
  16.     return true;
  17. }
  18. begin_init()
  19. {
  20.     int i;
  21.     strcpy(space_str," ");
  22.     if (tk[499]==NULL) for (i=0;i<500;i++) tk[i] = space_str;
  23. }
  24. begin_next_line(long *pcode, int *cp)
  25. {
  26.     if (*(pcode+*cp)!=5) { /* END XXX */
  27.         gprint("Expecting another text in pcode (5) , got %ld \n"
  28.             ,*(pcode+*cp));
  29.         return false;
  30.     }
  31.     (*cp) += 2;
  32.     return true;
  33. }
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.