version 1.13, 2009/11/05 07:21:01 |
version 1.20, 2010/06/19 20:46:27 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se> |
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
* 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 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#include <assert.h> |
#include <assert.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
#include "mandoc.h" |
#include "chars.h" |
#include "chars.h" |
|
|
#define PRINT_HI 126 |
#define PRINT_HI 126 |
|
|
#define CHARS_BOTH (CHARS_CHAR | CHARS_STRING) |
#define CHARS_BOTH (CHARS_CHAR | CHARS_STRING) |
}; |
}; |
|
|
#define LINES_MAX 351 |
#define LINES_MAX 370 |
|
|
#define CHAR(w, x, y, z, a, b) \ |
#define CHAR(w, x, y, z, a, b) \ |
{ NULL, (w), (y), (a), (x), (z), (b), CHARS_CHAR }, |
{ NULL, (w), (y), (a), (x), (z), (b), CHARS_CHAR }, |
Line 161 find(struct tbl *tab, const char *p, size_t sz, size_t |
|
Line 166 find(struct tbl *tab, const char *p, size_t sz, size_t |
|
|
|
if (NULL == (pp = htab[hash])) |
if (NULL == (pp = htab[hash])) |
return(NULL); |
return(NULL); |
|
|
if (NULL == pp->next) { |
|
if ( ! match(pp, p, sz, type)) |
|
return(NULL); |
|
|
|
if (CHARS_HTML == tab->type) { |
|
*rsz = pp->htmlsz; |
|
return(pp->html); |
|
} |
|
*rsz = pp->asciisz; |
|
return(pp->ascii); |
|
} |
|
|
|
for (prev = NULL; pp; pp = pp->next) { |
for (prev = NULL; pp; pp = pp->next) { |
if ( ! match(pp, p, sz, type)) { |
if ( ! match(pp, p, sz, type)) { |