src/stored/parse_bsr.c
static BSR *store_volfile(LEX *lc, BSR *bsr)
{
   int token;
   BSR_VOLFILE *volfile;

   for (;;) {
      token = lex_get_token(lc, T_PINT32_RANGE);
      if (token == T_ERROR) {
         return NULL;
      }
      volfile = (BSR_VOLFILE *)malloc(sizeof(BSR_VOLFILE));
      memset(volfile, 0, sizeof(BSR_VOLFILE));
      volfile->sfile = lc->pint32_val;
      volfile->efile = lc->pint32_val2;
      /* Add it to the end of the chain */
      if (!bsr->volfile) {
         bsr->volfile = volfile;
      } else {
         /* Add to end of chain */
         BSR_VOLFILE *bs = bsr->volfile;
         for ( ;bs->next; bs=bs->next)
            {  }
         bs->next = volfile;
      }
      token = lex_get_token(lc, T_ALL);
      if (token != T_COMMA) {
         break;
      }
   }
   return bsr;
}
/*
 * Routine to handle Volume start/end file
 */
Routine to handle Volume start/end file
Routine to handle Volume start / end file
static BSR *store_volfile(LEX *lc, BSR *bsr)
{
   int token;
   BSR_VOLFILE *volfile;
   for (;;) {
      token = lex_get_token(lc, T_PINT32_RANGE);
      if (token == T_ERROR) {
         return NULL;
      }
      volfile = (BSR_VOLFILE *)malloc(sizeof(BSR_VOLFILE));
      memset(volfile, 0, sizeof(BSR_VOLFILE));
      volfile->sfile = lc->pint32_val;
      volfile->efile = lc->pint32_val2;
      if (!bsr->volfile) {
         bsr->volfile = volfile;
      } else {
         BSR_VOLFILE *bs = bsr->volfile;
         for ( ;bs->next; bs=bs->next)
            {  }
         bs->next = volfile;
      }
      token = lex_get_token(lc, T_ALL);
      if (token != T_COMMA) {
         break;
      }
   }
   return bsr;
}
static BSR * store_volfile ( LEX * lc , BSR * bsr ) { int token ; BSR_VOLFILE * volfile ; for ( ; ; ) { token = lex_get_token ( lc , T_PINT32_RANGE ) ; if ( token == T_ERROR ) { return NULL ; } volfile = ( BSR_VOLFILE * ) malloc ( sizeof ( BSR_VOLFILE ) ) ; memset ( volfile , 0 , sizeof ( BSR_VOLFILE ) ) ; volfile -> sfile = lc -> pint32_val ; volfile -> efile = lc -> pint32_val2 ; if ( ! bsr -> volfile ) { bsr -> volfile = volfile ; } else { BSR_VOLFILE * bs = bsr -> volfile ; for ( ; bs -> next ; bs = bs -> next ) { } bs -> next = volfile ; } token = lex_get_token ( lc , T_ALL ) ; if ( token != T_COMMA ) { break ; } } return bsr ; }
Routine to handle Volume start/end file
Routine to handle Volume start / end file
/* Add it to the end of the chain */ /* Add to end of chain */