version 1.80, 2010/05/17 23:57:06 |
version 1.82, 2010/05/25 12:44:53 |
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <limits.h> |
#include <limits.h> |
|
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
Line 462 check_text(struct mdoc *mdoc, int line, int pos, const |
|
Line 463 check_text(struct mdoc *mdoc, int line, int pos, const |
|
if ( ! (MDOC_LITERAL & mdoc->flags)) |
if ( ! (MDOC_LITERAL & mdoc->flags)) |
if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) |
if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) |
return(0); |
return(0); |
} else if ( ! isprint((u_char)*p)) |
} else if ( ! isprint((u_char)*p) && ASCII_HYPH != *p) |
if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) |
if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) |
return(0); |
return(0); |
|
|
Line 1224 post_sh_body(POST_ARGS) |
|
Line 1225 post_sh_body(POST_ARGS) |
|
static int |
static int |
post_sh_head(POST_ARGS) |
post_sh_head(POST_ARGS) |
{ |
{ |
char buf[64]; |
char buf[BUFSIZ]; |
enum mdoc_sec sec; |
enum mdoc_sec sec; |
const struct mdoc_node *n; |
const struct mdoc_node *n; |
|
|
Line 1246 post_sh_head(POST_ARGS) |
|
Line 1247 post_sh_head(POST_ARGS) |
|
/* XXX - copied from compact(). */ |
/* XXX - copied from compact(). */ |
assert(MDOC_TEXT == n->type); |
assert(MDOC_TEXT == n->type); |
|
|
if (strlcat(buf, n->string, 64) >= 64) { |
if (strlcat(buf, n->string, BUFSIZ) >= BUFSIZ) { |
mdoc_nmsg(mdoc, n, MANDOCERR_MEM); |
mdoc_nmsg(mdoc, n, MANDOCERR_MEM); |
return(0); |
return(0); |
} |
} |
if (NULL == n->next) |
if (NULL == n->next) |
continue; |
continue; |
if (strlcat(buf, " ", 64) >= 64) { |
if (strlcat(buf, " ", BUFSIZ) >= BUFSIZ) { |
mdoc_nmsg(mdoc, n, MANDOCERR_MEM); |
mdoc_nmsg(mdoc, n, MANDOCERR_MEM); |
return(0); |
return(0); |
} |
} |