version 1.167, 2014/04/20 19:39:35 |
version 1.168, 2014/04/20 20:17:36 |
|
|
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "mandoc_aux.h" |
#include "out.h" |
#include "out.h" |
#include "term.h" |
#include "term.h" |
#include "mdoc.h" |
#include "mdoc.h" |
|
|
static void |
static void |
print_mdoc_head(struct termp *p, const void *arg) |
print_mdoc_head(struct termp *p, const void *arg) |
{ |
{ |
char buf[BUFSIZ], title[BUFSIZ]; |
char buf[BUFSIZ]; |
size_t buflen, titlen; |
const struct mdoc_meta *meta; |
const struct mdoc_meta *meta; |
char *title; |
|
size_t buflen, titlen; |
|
|
meta = (const struct mdoc_meta *)arg; |
meta = (const struct mdoc_meta *)arg; |
|
|
|
|
strlcat(buf, ")", BUFSIZ); |
strlcat(buf, ")", BUFSIZ); |
} |
} |
|
|
snprintf(title, BUFSIZ, "%s(%s)", meta->title, meta->msec); |
mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); |
titlen = term_strlen(p, title); |
titlen = term_strlen(p, title); |
|
|
p->flags |= TERMP_NOBREAK | TERMP_NOSPACE; |
p->flags |= TERMP_NOBREAK | TERMP_NOSPACE; |
|
|
p->flags &= ~TERMP_NOSPACE; |
p->flags &= ~TERMP_NOSPACE; |
p->offset = 0; |
p->offset = 0; |
p->rmargin = p->maxrmargin; |
p->rmargin = p->maxrmargin; |
|
free(title); |
} |
} |
|
|
static size_t |
static size_t |