src/stored/parse_bsr.c
static BSR *store_volblock(LEX *lc, BSR *bsr)
{
   int token;
   BSR_VOLBLOCK *volblock;

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