Changeset 9596


Ignore:
Timestamp:
2005-04-07T17:06:26+12:00 (19 years ago)
Author:
kjdon
Message:

added some x++ -> ++x changes submitted by Emanuel Dejanu

Location:
trunk/gsdl
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/mg/lib/bitio_m.h

    r439 r9596  
    5959  register int _B_x  = (x) - 1;                     \
    6060  (v) = 0;                              \
    61   for (; _B_x ; _B_x>>=1, (v)++);                   \
     61  for (; _B_x ; _B_x>>=1, ++(v));                   \
    6262} while(0)
    6363
     
    6767  register int _B_x  = (x);                     \
    6868  (v) = -1;                             \
    69   for (; _B_x ; _B_x>>=1, (v)++);                   \
     69  for (; _B_x ; _B_x>>=1, ++(v));                   \
    7070} while(0)
    7171
     
    100100  BIO_DECODE_PROLOGUE;                          \
    101101  (x) = 1;                              \
    102   while (!DECODE_BIT) (x)++;                        \
     102  while (!DECODE_BIT) ++(x);                        \
    103103  BIO_DECODE_EPILOGUE;                          \
    104104} while(0)
     
    108108  BIO_DECODE_PROLOGUE;                          \
    109109  (x) = 1;                              \
    110   while (!DECODE_BIT) (x)++;                        \
     110  while (!DECODE_BIT) ++(x);                        \
    111111  (count) += (x);                           \
    112112  BIO_DECODE_EPILOGUE;                          \
     
    178178      CEILLOG_2(_B_b, _B_logofb);                   \
    179179      _B_thresh = (1<<_B_logofb) - _B_b;                \
    180       _B_logofb--;                          \
    181       for (_B_i=0; _B_i < _B_logofb; _B_i++)                \
     180      --_B_logofb;                          \
     181      for (_B_i=0; _B_i < _B_logofb; ++_B_i)                \
    182182        DECODE_ADD(_B_x);                       \
    183183      if (_B_x >= _B_thresh)                        \
     
    203203      CEILLOG_2(_B_b, _B_logofb);                   \
    204204      _B_thresh = (1<<_B_logofb) - _B_b;                \
    205       _B_logofb--;                          \
     205      --_B_logofb;                          \
    206206      (count) += _B_logofb;                         \
    207       for (_B_i=0; _B_i < _B_logofb; _B_i++)                \
     207      for (_B_i=0; _B_i < _B_logofb; ++_B_i)                \
    208208        DECODE_ADD(_B_x);                       \
    209209      if (_B_x >= _B_thresh)                        \
     
    211211          DECODE_ADD(_B_x);                     \
    212212          _B_x -= _B_thresh;                        \
    213           (count)++;                            \
     213          ++(count);                            \
    214214    }                               \
    215215      (x) = _B_x+1;                         \
     
    276276  register int _B_nbits = 0;                        \
    277277  BIO_DECODE_PROLOGUE;                          \
    278   while(!DECODE_BIT) _B_nbits++;                    \
     278  while(!DECODE_BIT) ++_B_nbits;                    \
    279279  while (_B_nbits-- > 0)                        \
    280280    DECODE_ADD(_B_xx);                          \
     
    288288  register int _B_nbits = 0;                        \
    289289  BIO_DECODE_PROLOGUE;                          \
    290   while(!DECODE_BIT) _B_nbits++;                    \
     290  while(!DECODE_BIT) ++_B_nbits;                    \
    291291  (count) += _B_nbits*2+1;                      \
    292292  while (_B_nbits-- > 0)                        \
     
    333333  register unsigned long _B_xxx;                    \
    334334  register int _B_logx;                         \
    335   GAMMA_DECODE(_B_logx); _B_logx--;                 \
    336   BINARY_DECODE(_B_xxx, 1<<_B_logx); _B_xxx--;              \
     335  GAMMA_DECODE(_B_logx); --_B_logx;                 \
     336  BINARY_DECODE(_B_xxx, 1<<_B_logx); --_B_xxx;              \
    337337  (x) = _B_xxx + (1<<_B_logx);                      \
    338338} while (0)
     
    342342  register unsigned long _B_xxx;                    \
    343343  register int _B_logx;                         \
    344   GAMMA_DECODE_L(_B_logx, count); _B_logx--;                \
    345   BINARY_DECODE_L(_B_xxx, 1<<_B_logx, count); _B_xxx--;         \
     344  GAMMA_DECODE_L(_B_logx, count); --_B_logx;                \
     345  BINARY_DECODE_L(_B_xxx, 1<<_B_logx, count); --_B_xxx;         \
    346346  (x) = _B_xxx + (1<<_B_logx);                      \
    347347} while (0)
     
    374374  while (_B_xx>_B_upper)                        \
    375375    {                                   \
    376       _B_k++;                               \
     376      ++_B_k;                               \
    377377      _B_lower = _B_upper+1;                        \
    378378      _B_pow *= _B_s;                           \
     
    394394  while (_B_xx>_B_upper)                        \
    395395    {                                   \
    396       _B_k++;                               \
     396      ++_B_k;                               \
    397397      _B_lower = _B_upper+1;                        \
    398398      _B_pow *= _B_s;                           \
     
    411411  register int _B_k;                            \
    412412  register double _B_pow=1.0;                       \
    413   UNARY_DECODE(_B_k); _B_k--;                       \
     413  UNARY_DECODE(_B_k); --_B_k;                       \
    414414  while (_B_k--)                            \
    415415    {                                   \
     
    418418      _B_upper += _B_b*_B_pow;                      \
    419419    }                                   \
    420   BINARY_DECODE(_B_xx, _B_upper-_B_lower+1); _B_xx--;           \
     420  BINARY_DECODE(_B_xx, _B_upper-_B_lower+1); --_B_xx;           \
    421421  POSITIVE(gamma, _B_xx+_B_lower);                  \
    422422  (x) = _B_xx+_B_lower;                         \
     
    431431  register int _B_k;                            \
    432432  register double _B_pow=1.0;                       \
    433   UNARY_DECODE_L(_B_k, count); _B_k--;                  \
     433  UNARY_DECODE_L(_B_k, count); --_B_k;                  \
    434434  while (_B_k--)                            \
    435435    {                                   \
     
    438438      _B_upper += _B_b*_B_pow;                      \
    439439    }                                   \
    440   BINARY_DECODE_L(_B_xx, _B_upper-_B_lower+1, count); _B_xx--;      \
     440  BINARY_DECODE_L(_B_xx, _B_upper-_B_lower+1, count); --_B_xx;      \
    441441  POSITIVE(gamma, _B_xx+_B_lower);                  \
    442442  (x) = _B_xx+_B_lower;                         \
     
    454454  while (_B_xx>_B_upper)                        \
    455455    {                                   \
    456       _B_k++;                               \
     456      ++_B_k;                               \
    457457      _B_lower = _B_upper+1;                        \
    458458      _B_pow *= _B_s;                           \
     
    474474  register int _B_xdivb = 0;                        \
    475475  POSITIVE(bblock, _B_xx);                      \
    476   _B_xx--;                              \
     476  --_B_xx;                              \
    477477  while (_B_xx >= _B_bb)                        \
    478478    {                                   \
    479       _B_xdivb++;                           \
     479      ++_B_xdivb;                           \
    480480      _B_xx -= _B_bb;                           \
    481481    }                                   \
     
    490490  register int _B_xdivb = 0;                        \
    491491  POSITIVE(bblock, _B_xx);                      \
    492   _B_xx--;                              \
     492  --_B_xx;                              \
    493493  while (_B_xx >= _B_bb)                        \
    494494    {                                   \
    495       _B_xdivb++;                           \
     495      ++_B_xdivb;                           \
    496496      _B_xx -= _B_bb;                           \
    497497    }                                   \
     
    505505  register unsigned long _B_bb = (b);                   \
    506506  register int _B_xdivb;                        \
    507   UNARY_DECODE(_B_xdivb); _B_xdivb--;                   \
     507  UNARY_DECODE(_B_xdivb); --_B_xdivb;                   \
    508508  while (_B_xdivb--)                            \
    509509    _B_xx += _B_bb;                         \
     
    517517  register unsigned long _B_bb = (b);                   \
    518518  register int _B_xdivb;                        \
    519   UNARY_DECODE_L(_B_xdivb, count); _B_xdivb--;              \
     519  UNARY_DECODE_L(_B_xdivb, count); --_B_xdivb;              \
    520520  while (_B_xdivb--)                            \
    521521    _B_xx += _B_bb;                         \
     
    530530  register int _B_xdivb = 0;                        \
    531531  POSITIVE(bblock, _B_xx);                      \
    532   _B_xx--;                              \
     532  --_B_xx;                              \
    533533  while (_B_xx >= _B_bb)                        \
    534534    {                                   \
    535       _B_xdivb++;                           \
     535      ++_B_xdivb;                           \
    536536      _B_xx -= _B_bb;                           \
    537537    }                                   \
  • trunk/gsdl/packages/mg/lib/bitio_m_mem.h

    r439 r9596  
    7474#define ENCODE_BIT(b)                           \
    7575  do {                                  \
    76     __btg--;                                \
     76    --__btg;                                \
    7777    if (b) __buff |= (1 << __btg);                  \
    7878    if (!__btg)                             \
     
    8181      {                             \
    8282        *__pos++ = __buff;                      \
    83         __remaining--;                      \
     83        --__remaining;                      \
    8484      }                                 \
    8585    __buff = 0;                         \
     
    102102    {                               \
    103103          *__pos++ = __buff;                        \
    104           __remaining--;                        \
     104          --__remaining;                        \
    105105    }                               \
    106106    __btg = sizeof(__buff)*8;                       \
     
    135135      {                             \
    136136        __buff = *__pos++;                      \
    137         __remaining--;                      \
     137        --__remaining;                      \
    138138      }                             \
    139139        else                                \
     
    151151      {                             \
    152152        __buff = *__pos++;                      \
    153         __remaining--;                      \
     153        --__remaining;                      \
    154154      }                             \
    155155        else                                \
  • trunk/gsdl/packages/mg/lib/bitio_m_mems.h

    r439 r9596  
    5959    else                                \
    6060      __base[__pos>>3] &= 0xff7f >> (__pos&7);              \
    61     __pos++;                                \
     61    ++__pos;                                \
    6262  } while(0)
    6363
     
    8888  do {                                  \
    8989    (b) += (b) + (__base[__pos>>3] & (0x80 >> (__pos&7)) != 0);     \
    90     __pos++;                                \
     90    ++__pos;                                \
    9191  } while(0)
    9292
  • trunk/gsdl/packages/mg/lib/bitio_m_random.h

    r439 r9596  
    5858    register unsigned long __len = (l)-1;               \
    5959    register unsigned long __sft = 0;                   \
    60     while (__len) { __sft++; __len >>=1; }              \
     60    while (__len) { ++__sft; __len >>=1; }              \
    6161    __len = 1<<__sft;                           \
    6262    __buf = Xmalloc(__len);                     \
     
    9393      __buf[__pos>>3] &= 0xff7f >> (__pos&7);               \
    9494    __used = 1;                             \
    95     __pos++;                                \
     95    ++__pos;                                \
    9696    if ((__pos>>3) >= __len)                        \
    9797      (void)WRITE_READ;                         \
  • trunk/gsdl/packages/mg/lib/bitio_m_stdio.h

    r439 r9596  
    6565#define ENCODE_BIT(b)                           \
    6666  do {                                  \
    67     __btg--;                                \
     67    --__btg;                                \
    6868    if (b) __buff |= (1 << __btg);                  \
    6969    if (!__btg)                             \
  • trunk/gsdl/packages/mg/lib/huffman.h

    r439 r9596  
    6969    register int __clen = (lens)[x];                    \
    7070    register unsigned long __code = (codes)[x];             \
    71     for (__i=__clen-1; __i>=0; __i--)                   \
     71    for (__i=__clen-1; __i>=0; --__i)                   \
    7272      ENCODE_BIT((__code >> __i) & 1);                  \
    7373  } while(0)
  • trunk/gsdl/packages/mg/src/text/hash.h

    r439 r9596  
    3434        register unsigned long hval;        \
    3535        if (len>25) len = 25;           \
    36         for (hval=0; len; len--)        \
     36        for (hval=0; len; --len)        \
    3737          hval = (hval << 5) - hval + *p++; \
    3838        step = hval % (tablesize - 2) + 1;  \
  • trunk/gsdl/packages/mg/src/text/words.h

    r8693 r9596  
    116116                     ++numeric <= maxnumeric))) {  \
    117117      while (charlength-- > 0) {                                   \
    118         *wptr++ = *(s_in)++; length++;                             \
     118        *wptr++ = *(s_in)++; ++length;                             \
    119119      }                                                            \
    120120      charlength = parse_utf8_char((s_in),(end),&c);               \
     
    136136        break;                                               \
    137137          *wptr++ = c;                                           \
    138           length++;                                              \
     138          ++length;                                              \
    139139          c = *++(s_in);                                         \
    140140        }                                                        \
     
    163163       !is_unicode_letdig(c)) {                                \
    164164      while (charlength-- > 0) {                                   \
    165         *wptr++ = *(s_in)++; length++;                             \
     165        *wptr++ = *(s_in)++; ++length;                             \
    166166      }                                                            \
    167167      charlength = parse_utf8_char((s_in),(end),&c);               \
     
    180180        {                                                      \
    181181          *wptr++ = c;                                         \
    182           length++;                                            \
     182          ++length;                                            \
    183183          c = *++(s_in);                                       \
    184184        }                                                      \
     
    214214                     ++numeric <= maxnumeric))) {  \
    215215      while (charlength-- > 0) {                                   \
    216         *wptr++ = *(s_in)++; length++;                             \
     216        *wptr++ = *(s_in)++; ++length;                             \
    217217      }                                                            \
    218218      charlength = parse_utf8_char((s_in),(end),&c);               \
     
    234234        break;                                            \
    235235      *wptr++ = c;                                        \
    236       length++;                                           \
     236      ++length;                                           \
    237237      c = *++(s_in);                                      \
    238238    }                                                     \
     
    347347        {                                                          \
    348348               *wptr++ = c;                                            \
    349                length++;                                               \
     349               ++length;                                               \
    350350               c = *++(s_in);                                          \
    351351            }                                                          \
  • trunk/gsdl/src/checkis/checkis.cpp

    r1632 r9596  
    3535         
    3636        // prepare for next iteration
    37         dwIndex++;
     37        ++dwIndex;
    3838        keysize = 256;
    3939        comsize = 2048;
  • trunk/gsdl/src/db2txt/db2txt.cpp

    r2499 r9596  
    8484  while (key.dptr != NULL) {
    8585    cout << "[";
    86     for (i = 0; i < key.dsize; i++)
     86    for (i = 0; i < key.dsize; ++i)
    8787      cout << key.dptr[i];
    8888    cout << "]\n";
    8989    value = gdbm_fetch (dbf, key);
    90     for (i = 0; i < value.dsize; i++)
     90    for (i = 0; i < value.dsize; ++i)
    9191      cout << value.dptr[i];
    9292    cout << "\n----------------------------------------------------------------------\n";
  • trunk/gsdl/src/hashfile/hashfile.cpp

    r1238 r9596  
    6363    a.num[i] = (unsigned char)num;
    6464
    65     i++;
     65    ++i;
    6666  }
    6767
     
    8585      if (a.num[i] > b.num[i]) break;
    8686      if (a.num[i] < b.num[i]) return 0;
    87       i--;
     87      --i;
    8888    }
    8989  }
     
    105105    a.num[j] = (unsigned char) num;
    106106   
    107     j++;
     107    ++j;
    108108    if (num != 0) len = j;
    109109  }
     
    133133  }
    134134
    135   for (i=a.len-1, len=0; i >= 0; i--) {
     135  for (i=a.len-1, len=0; i >= 0; --i) {
    136136    result[len++] = convert[a.num[i]/16];
    137137    result[len++] = convert[a.num[i]%16];
     
    201201  // calculate 8 multiples of the prime number.
    202202  // These are used to find the remainder using only subtraction operations
    203   for (i=0; i<8; i++) {
     203  for (i=0; i<8; ++i) {
    204204    primepow[i] = pow;
    205205    my_inc (pow, pow);
     
    225225
    226226    // remainder = remainder * 256 + c
    227     for (i=remainder.len; i>0; i--) {
     227    for (i=remainder.len; i>0; --i) {
    228228      remainder.num[i] = remainder.num[i-1];
    229229    }
     
    232232   
    233233    // remainder = (remainder % large-prime-number)
    234     for (i=7; i>=0; i--) {
     234    for (i=7; i>=0; --i) {
    235235      my_ifpos_dec (remainder, primepow[i]);
    236236    }
     
    250250  char *result;
    251251
    252   for (i = 1; i < argc; i++) {
     252  for (i = 1; i < argc; ++i) {
    253253    result = hashfile (argv[i]);
    254254    if (result == NULL) {
  • trunk/gsdl/src/setpasswd/setpasswd.cpp

    r2438 r9596  
    7474      arg.push_back (*c);
    7575    }
    76     c ++;
     76    ++c;
    7777  }
    7878  if (!arg.empty()) args.push_back (arg);
     
    8484    else if (*here == "-p" && (++here != end)) password = *here;
    8585    else if (*here == "-o" && (++here != end)) output_gdbm_file = *here;
    86     if (here != end) here ++;
     86    if (here != end) ++here;
    8787  }
    8888  if (username.empty() || password.empty() || output_gdbm_file.empty()) {
  • trunk/gsdl/src/txt2db/txt2db.cpp

    r982 r9596  
    124124      } else if (c == '-') {
    125125    tmp.push_back ((unsigned char)c);
    126     num_dashes++;
     126    ++num_dashes;
    127127   
    128128      } else {
Note: See TracChangeset for help on using the changeset viewer.