version 1.40, 2010/08/01 15:46:18 |
version 1.45, 2010/09/27 23:03:44 |
|
|
#include "config.h" |
#include "config.h" |
#endif |
#endif |
|
|
#include <sys/param.h> |
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <stdarg.h> |
#include <stdarg.h> |
|
|
#include <time.h> |
#include <time.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
#include "mandoc.h" |
#include "out.h" |
#include "out.h" |
#include "main.h" |
#include "main.h" |
#include "term.h" |
#include "term.h" |
Line 362 ps_growbuf(struct termp *p, size_t sz) |
|
Line 363 ps_growbuf(struct termp *p, size_t sz) |
|
|
|
if (sz < PS_BUFSLOP) |
if (sz < PS_BUFSLOP) |
sz = PS_BUFSLOP; |
sz = PS_BUFSLOP; |
|
|
p->engine.ps.psmargsz += sz; |
p->engine.ps.psmargsz += sz; |
|
|
p->engine.ps.psmarg = realloc(p->engine.ps.psmarg, |
p->engine.ps.psmarg = realloc |
p->engine.ps.psmargsz); |
(p->engine.ps.psmarg, |
if (NULL == p->engine.ps.psmarg) |
p->engine.ps.psmargsz); |
|
|
|
if (NULL == p->engine.ps.psmarg) { |
perror(NULL); |
perror(NULL); |
exit(EXIT_FAILURE); |
exit((int)MANDOCLEVEL_SYSERR); |
|
} |
} |
} |
|
|
static double ps_hspan(const struct termp *, |
static double ps_hspan(const struct termp *, |
Line 578 ps_putchar(struct termp *p, char c) |
|
Line 583 ps_putchar(struct termp *p, char c) |
|
/* See ps_printf(). */ |
/* See ps_printf(). */ |
|
|
if ( ! (PS_MARGINS & p->engine.ps.flags)) { |
if ( ! (PS_MARGINS & p->engine.ps.flags)) { |
|
/* LINTED */ |
putchar(c); |
putchar(c); |
p->engine.ps.pdfbytes++; |
p->engine.ps.pdfbytes++; |
return; |
return; |
Line 604 pdf_obj(struct termp *p, size_t obj) |
|
Line 610 pdf_obj(struct termp *p, size_t obj) |
|
p->engine.ps.pdfobjsz * sizeof(size_t)); |
p->engine.ps.pdfobjsz * sizeof(size_t)); |
if (NULL == p->engine.ps.pdfobjs) { |
if (NULL == p->engine.ps.pdfobjs) { |
perror(NULL); |
perror(NULL); |
exit(EXIT_FAILURE); |
exit((int)MANDOCLEVEL_SYSERR); |
} |
} |
} |
} |
|
|
Line 902 ps_pletter(struct termp *p, int c) |
|
Line 908 ps_pletter(struct termp *p, int c) |
|
|
|
f = (int)p->engine.ps.lastf; |
f = (int)p->engine.ps.lastf; |
|
|
if (c <= 32 || (c - 32 > MAXCHAR)) { |
if (c <= 32 || (c - 32 >= MAXCHAR)) { |
ps_putchar(p, ' '); |
ps_putchar(p, ' '); |
p->engine.ps.pscol += (size_t)fonts[f].gly[0].wx; |
p->engine.ps.pscol += (size_t)fonts[f].gly[0].wx; |
return; |
return; |