Print this page
5051 import mdocml-1.12.3
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: TBD
*** 1,6 ****
! /* $Id: chars.c,v 1.52 2011/11/08 00:15:23 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
--- 1,6 ----
! /* $Id: chars.c,v 1.54 2013/06/20 22:39:30 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
*** 35,45 ****
const char *code;
const char *ascii;
int unicode;
};
! #define LINES_MAX 328
#define CHAR(in, ch, code) \
{ NULL, (in), (ch), (code) },
#define CHAR_TBL_START static struct ln lines[LINES_MAX] = {
--- 35,45 ----
const char *code;
const char *ascii;
int unicode;
};
! #define LINES_MAX 329
#define CHAR(in, ch, code) \
{ NULL, (in), (ch), (code) },
#define CHAR_TBL_START static struct ln lines[LINES_MAX] = {
*** 75,85 ****
* is simply the integral value of the first character.
* Subsequent entries are chained in the order they're processed.
*/
tab = mandoc_malloc(sizeof(struct mchars));
! htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
for (i = 0; i < LINES_MAX; i++) {
hash = (int)lines[i].code[0] - PRINT_LO;
if (NULL == (pp = htab[hash])) {
--- 75,85 ----
* is simply the integral value of the first character.
* Subsequent entries are chained in the order they're processed.
*/
tab = mandoc_malloc(sizeof(struct mchars));
! htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln *));
for (i = 0; i < LINES_MAX; i++) {
hash = (int)lines[i].code[0] - PRINT_LO;
if (NULL == (pp = htab[hash])) {