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

Diff for /mandoc/term.c between version 1.274 and 1.275

version 1.274, 2017/07/28 14:25:48 version 1.275, 2018/08/16 13:54:06
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 525  term_word(struct termp *p, const char *word)
Line 525  term_word(struct termp *p, const char *word)
                         else if (*word == '\0')                          else if (*word == '\0')
                                 p->flags |= (TERMP_NOSPACE | TERMP_NONEWLINE);                                  p->flags |= (TERMP_NOSPACE | TERMP_NONEWLINE);
                         continue;                          continue;
                   case ESCAPE_DEVICE:
                           if (p->type == TERMTYPE_PDF)
                                   encode(p, "pdf", 3);
                           else if (p->type == TERMTYPE_PS)
                                   encode(p, "ps", 2);
                           else if (p->enc == TERMENC_ASCII)
                                   encode(p, "ascii", 5);
                           else
                                   encode(p, "utf8", 4);
                           continue;
                 case ESCAPE_HORIZ:                  case ESCAPE_HORIZ:
                         if (*seq == '|') {                          if (*seq == '|') {
                                 seq++;                                  seq++;
Line 860  term_strlen(const struct termp *p, const char *cp)
Line 870  term_strlen(const struct termp *p, const char *cp)
                                                 sz += cond_width(p, uc, &skip);                                                  sz += cond_width(p, uc, &skip);
                                 }                                  }
                                 continue;                                  continue;
                           case ESCAPE_DEVICE:
                                   if (p->type == TERMTYPE_PDF) {
                                           rhs = "pdf";
                                           rsz = 3;
                                   } else if (p->type == TERMTYPE_PS) {
                                           rhs = "ps";
                                           rsz = 2;
                                   } else if (p->enc == TERMENC_ASCII) {
                                           rhs = "ascii";
                                           rsz = 5;
                                   } else {
                                           rhs = "utf8";
                                           rsz = 4;
                                   }
                                   break;
                         case ESCAPE_SKIPCHAR:                          case ESCAPE_SKIPCHAR:
                                 skip = 1;                                  skip = 1;
                                 continue;                                  continue;

Legend:
Removed from v.1.274  
changed lines
  Added in v.1.275

CVSweb