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

Diff for /mandoc/mandocdb.c between version 1.272 and 1.273

version 1.272, 2023/04/28 19:11:03 version 1.273, 2024/05/14 18:52:31
Line 353  mandocdb(int argc, char *argv[])
Line 353  mandocdb(int argc, char *argv[])
                 goto usage; \                  goto usage; \
         } while (/*CONSTCOND*/0)          } while (/*CONSTCOND*/0)
   
         mparse_options = MPARSE_VALIDATE;          mparse_options = MPARSE_UTF8 | MPARSE_LATIN1 | MPARSE_VALIDATE;
         path_arg = NULL;          path_arg = NULL;
         op = OP_DEFAULT;          op = OP_DEFAULT;
   
Line 2031  render_string(char **public, size_t *psz)
Line 2031  render_string(char **public, size_t *psz)
                  */                   */
   
                 scp++;                  scp++;
                 if (mandoc_escape(&scp, &seq, &seqlen) != ESCAPE_SPECIAL)                  switch (mandoc_escape(&scp, &seq, &seqlen)) {
                   case ESCAPE_UNICODE:
                           unicode = mchars_num2uc(seq + 1, seqlen - 1);
                           break;
                   case ESCAPE_NUMBERED:
                           unicode = mchars_num2char(seq, seqlen);
                           break;
                   case ESCAPE_SPECIAL:
                           unicode = mchars_spec2cp(seq, seqlen);
                           break;
                   default:
                           unicode = -1;
                           break;
                   }
                   if (unicode <= 0)
                         continue;                          continue;
   
                 /*                  /*
Line 2040  render_string(char **public, size_t *psz)
Line 2054  render_string(char **public, size_t *psz)
                  */                   */
   
                 if (write_utf8) {                  if (write_utf8) {
                         unicode = mchars_spec2cp(seq, seqlen);  
                         if (unicode <= 0)  
                                 continue;  
                         addsz = utf8(unicode, utfbuf);                          addsz = utf8(unicode, utfbuf);
                         if (addsz == 0)                          if (addsz == 0)
                                 continue;                                  continue;
                         addcp = utfbuf;                          addcp = utfbuf;
                 } else {                  } else {
                         addcp = mchars_spec2str(seq, seqlen, &addsz);                          addcp = mchars_uc2str(unicode);
                         if (addcp == NULL)                          if (addcp == NULL)
                                 continue;                                  continue;
                         if (*addcp == ASCII_NBRSP) {                          if (*addcp == ASCII_NBRSP)
                                 addcp = " ";                                  addcp = " ";
                                 addsz = 1;                          addsz = strlen(addcp);
                         }  
                 }                  }
   
                 /* Copy the rendered glyph into the stream. */                  /* Copy the rendered glyph into the stream. */

Legend:
Removed from v.1.272  
changed lines
  Added in v.1.273

CVSweb