[BACK]Return to scanflags.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

Diff for /src/usr.bin/lex/scanflags.c between version 1.2 and 1.3

version 1.2, 2015/11/19 22:16:43 version 1.3, 2015/11/19 23:20:34
Line 42 
Line 42 
 sf_push (void)  sf_push (void)
 {  {
     if (_sf_top_ix + 1 >= _sf_max)      if (_sf_top_ix + 1 >= _sf_max)
         _sf_stk = (scanflags_t*) flex_realloc ( (void*) _sf_stk, sizeof(scanflags_t) * (_sf_max += 32));          _sf_stk = (scanflags_t*) realloc ( (void*) _sf_stk, sizeof(scanflags_t) * (_sf_max += 32));
   
     // copy the top element      // copy the top element
     _sf_stk[_sf_top_ix + 1] = _sf_stk[_sf_top_ix];      _sf_stk[_sf_top_ix + 1] = _sf_stk[_sf_top_ix];
Line 61 
Line 61 
 sf_init (void)  sf_init (void)
 {  {
     assert(_sf_stk == NULL);      assert(_sf_stk == NULL);
     _sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32));      _sf_stk = (scanflags_t*) malloc ( sizeof(scanflags_t) * (_sf_max = 32));
     if (!_sf_stk)      if (!_sf_stk)
         lerrsf_fatal(_("Unable to allocate %ld of stack"),          lerrsf_fatal(_("Unable to allocate %ld of stack"),
             (void *)sizeof(scanflags_t));              (void *)sizeof(scanflags_t));

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3