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

Diff for /src/usr.bin/mandoc/mandocdb.c between version 1.70 and 1.71

version 1.70, 2014/01/19 22:48:00 version 1.71, 2014/01/22 20:58:35
Line 1656 
Line 1656 
 render_key(struct mchars *mc, struct str *key)  render_key(struct mchars *mc, struct str *key)
 {  {
         size_t           sz, bsz, pos;          size_t           sz, bsz, pos;
         char             utfbuf[7], res[5];          char             utfbuf[7], res[6];
         char            *buf;          char            *buf;
         const char      *seq, *cpp, *val;          const char      *seq, *cpp, *val;
         int              len, u;          int              len, u;
Line 1668 
Line 1668 
         res[1] = '\t';          res[1] = '\t';
         res[2] = ASCII_NBRSP;          res[2] = ASCII_NBRSP;
         res[3] = ASCII_HYPH;          res[3] = ASCII_HYPH;
         res[4] = '\0';          res[4] = ASCII_BREAK;
           res[5] = '\0';
   
         val = key->key;          val = key->key;
         bsz = strlen(val);          bsz = strlen(val);
Line 1699 
Line 1700 
                         val += sz;                          val += sz;
                 }                  }
   
                 if (ASCII_HYPH == *val) {                  switch (*val) {
                   case (ASCII_HYPH):
                         buf[pos++] = '-';                          buf[pos++] = '-';
                         val++;                          val++;
                         continue;                          continue;
                 } else if ('\t' == *val || ASCII_NBRSP == *val) {                  case ('\t'):
                           /* FALLTHROUGH */
                   case (ASCII_NBRSP):
                         buf[pos++] = ' ';                          buf[pos++] = ' ';
                         val++;                          val++;
                           /* FALLTHROUGH */
                   case (ASCII_BREAK):
                         continue;                          continue;
                 } else if ('\\' != *val)                  default:
                           break;
                   }
                   if ('\\' != *val)
                         break;                          break;
   
                 /* Read past the slash. */                  /* Read past the slash. */

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71