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

Diff for /mandoc/mandoc.c between version 1.66 and 1.67

version 1.66, 2012/06/12 20:21:04 version 1.67, 2013/06/20 22:39:30
Line 432  mandoc_getarg(struct mparse *parse, char **cpp, int ln
Line 432  mandoc_getarg(struct mparse *parse, char **cpp, int ln
         pairs = 0;          pairs = 0;
         white = 0;          white = 0;
         for (cp = start; '\0' != *cp; cp++) {          for (cp = start; '\0' != *cp; cp++) {
                 /* Move left after quoted quotes and escaped backslashes. */  
                   /*
                    * Move the following text left
                    * after quoted quotes and after "\\" and "\t".
                    */
                 if (pairs)                  if (pairs)
                         cp[-pairs] = cp[0];                          cp[-pairs] = cp[0];
   
                 if ('\\' == cp[0]) {                  if ('\\' == cp[0]) {
                         if ('\\' == cp[1]) {                          /*
                                 /* Poor man's copy mode. */                           * In copy mode, translate double to single
                            * backslashes and backslash-t to literal tabs.
                            */
                           switch (cp[1]) {
                           case ('t'):
                                   cp[0] = '\t';
                                   /* FALLTHROUGH */
                           case ('\\'):
                                 pairs++;                                  pairs++;
                                 cp++;                                  cp++;
                         } else if (0 == quoted && ' ' == cp[1])                                  break;
                           case (' '):
                                 /* Skip escaped blanks. */                                  /* Skip escaped blanks. */
                                 cp++;                                  if (0 == quoted)
                                           cp++;
                                   break;
                           default:
                                   break;
                           }
                 } else if (0 == quoted) {                  } else if (0 == quoted) {
                         if (' ' == cp[0]) {                          if (' ' == cp[0]) {
                                 /* Unescaped blanks end unquoted args. */                                  /* Unescaped blanks end unquoted args. */

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

CVSweb