[BACK]Return to term.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term.c between version 1.161 and 1.162

version 1.161, 2010/07/16 22:33:30 version 1.162, 2010/07/17 12:01:43
Line 503  term_word(struct termp *p, const char *word)
Line 503  term_word(struct termp *p, const char *word)
   
         p->flags &= ~TERMP_SENTENCE;          p->flags &= ~TERMP_SENTENCE;
   
         /* FIXME: use strcspn. */  
   
         while (*word) {          while (*word) {
                 if ('\\' != *word) {                  if ((ssz = strcspn(word, "\\")) > 0)
                         encode(p, word, 1);                          encode(p, word, ssz);
                         word++;  
                   word += ssz;
                   if ('\\' != *word)
                         continue;                          continue;
                 }  
   
                 seq = ++word;                  seq = ++word;
                 sz = a2roffdeco(&deco, &seq, &ssz);                  sz = a2roffdeco(&deco, &seq, &ssz);
Line 547  term_word(struct termp *p, const char *word)
Line 546  term_word(struct termp *p, const char *word)
          * Note that we don't process the pipe: the parser sees it as           * Note that we don't process the pipe: the parser sees it as
          * punctuation, but we don't in terms of typography.           * punctuation, but we don't in terms of typography.
          */           */
         if (sv[0] && 0 == sv[1])          if (sv[0] && '\0' == sv[1])
                 switch (sv[0]) {                  switch (sv[0]) {
                 case('('):                  case('('):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */

Legend:
Removed from v.1.161  
changed lines
  Added in v.1.162

CVSweb