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

Diff for /src/usr.bin/m4/eval.c between version 1.66 and 1.67

version 1.66, 2008/08/21 21:01:47 version 1.67, 2010/03/25 18:52:29
Line 907 
Line 907 
         unsigned char sch, dch;          unsigned char sch, dch;
         static char frombis[257];          static char frombis[257];
         static char tobis[257];          static char tobis[257];
           int i;
           char seen[256];
         static unsigned char mapvec[256] = {          static unsigned char mapvec[256] = {
             0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,              0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
             19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,              19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
Line 941 
Line 943 
          * create a mapping between "from" and           * create a mapping between "from" and
          * "to"           * "to"
          */           */
                 while (*from)                  for (i = 0; i < 256; i++)
                         mapvec[(unsigned char)(*from++)] = (*to) ?                          seen[i] = 0;
                                 (unsigned char)(*to++) : 0;                  while (*from) {
                           if (!seen[(unsigned char)(*from)]) {
                                   mapvec[(unsigned char)(*from)] = (unsigned char)(*to);
                                   seen[(unsigned char)(*from)] = 1;
                           }
                           from++;
                           if (*to)
                                   to++;
                   }
   
                 while (*src) {                  while (*src) {
                         sch = (unsigned char)(*src++);                          sch = (unsigned char)(*src++);

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67