version 1.47, 2011/03/07 01:58:24 |
version 1.49, 2011/05/14 17:54:42 |
Line 366 ps_growbuf(struct termp *p, size_t sz) |
|
Line 366 ps_growbuf(struct termp *p, size_t sz) |
|
|
|
p->engine.ps.psmargsz += sz; |
p->engine.ps.psmargsz += sz; |
|
|
p->engine.ps.psmarg = realloc |
p->engine.ps.psmarg = mandoc_realloc |
(p->engine.ps.psmarg, |
(p->engine.ps.psmarg, |
p->engine.ps.psmargsz); |
p->engine.ps.psmargsz); |
|
|
if (NULL == p->engine.ps.psmarg) { |
|
perror(NULL); |
|
exit((int)MANDOCLEVEL_SYSERR); |
|
} |
|
} |
} |
|
|
static double ps_hspan(const struct termp *, |
static double ps_hspan(const struct termp *, |
const struct roffsu *); |
const struct roffsu *); |
static size_t ps_width(const struct termp *, char); |
static size_t ps_width(const struct termp *, int); |
static void ps_advance(struct termp *, size_t); |
static void ps_advance(struct termp *, size_t); |
static void ps_begin(struct termp *); |
static void ps_begin(struct termp *); |
static void ps_closepage(struct termp *); |
static void ps_closepage(struct termp *); |
static void ps_end(struct termp *); |
static void ps_end(struct termp *); |
static void ps_endline(struct termp *); |
static void ps_endline(struct termp *); |
static void ps_fclose(struct termp *); |
static void ps_fclose(struct termp *); |
static void ps_letter(struct termp *, char); |
static void ps_letter(struct termp *, int); |
static void ps_pclose(struct termp *); |
static void ps_pclose(struct termp *); |
static void ps_pletter(struct termp *, int); |
static void ps_pletter(struct termp *, int); |
static void ps_printf(struct termp *, const char *, ...); |
static void ps_printf(struct termp *, const char *, ...); |
Line 968 ps_fclose(struct termp *p) |
|
Line 963 ps_fclose(struct termp *p) |
|
|
|
|
|
static void |
static void |
ps_letter(struct termp *p, char c) |
ps_letter(struct termp *p, int arg) |
{ |
{ |
char cc; |
char cc, c; |
|
|
|
/* LINTED */ |
|
c = arg >= 128 || arg <= 0 ? '?' : arg; |
|
|
/* |
/* |
* State machine dictates whether to buffer the last character |
* State machine dictates whether to buffer the last character |
* or not. Basically, encoded words are detected by checking if |
* or not. Basically, encoded words are detected by checking if |
Line 1100 ps_setfont(struct termp *p, enum termfont f) |
|
Line 1098 ps_setfont(struct termp *p, enum termfont f) |
|
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
static size_t |
static size_t |
ps_width(const struct termp *p, char c) |
ps_width(const struct termp *p, int c) |
{ |
{ |
|
|
if (c <= 32 || c - 32 >= MAXCHAR) |
if (c <= 32 || c - 32 >= MAXCHAR) |
return((size_t)fonts[(int)TERMFONT_NONE].gly[0].wx); |
return((size_t)fonts[(int)TERMFONT_NONE].gly[0].wx); |
|
|
c -= 32; |
c -= 32; |
return((size_t)fonts[(int)TERMFONT_NONE].gly[(int)c].wx); |
return((size_t)fonts[(int)TERMFONT_NONE].gly[c].wx); |
} |
} |
|
|
|
|