version 1.100, 2009/09/16 15:08:31 |
version 1.101, 2009/09/17 07:41:28 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
#include "chars.h" |
#include "term.h" |
#include "term.h" |
#include "man.h" |
#include "man.h" |
#include "mdoc.h" |
#include "mdoc.h" |
Line 56 terminal_man(void *arg, const struct man *man) |
|
Line 57 terminal_man(void *arg, const struct man *man) |
|
|
|
p = (struct termp *)arg; |
p = (struct termp *)arg; |
if (NULL == p->symtab) |
if (NULL == p->symtab) |
p->symtab = term_ascii2htab(); |
p->symtab = chars_init(CHARS_ASCII); |
|
|
man_run(p, man); |
man_run(p, man); |
} |
} |
Line 69 terminal_mdoc(void *arg, const struct mdoc *mdoc) |
|
Line 70 terminal_mdoc(void *arg, const struct mdoc *mdoc) |
|
|
|
p = (struct termp *)arg; |
p = (struct termp *)arg; |
if (NULL == p->symtab) |
if (NULL == p->symtab) |
p->symtab = term_ascii2htab(); |
p->symtab = chars_init(CHARS_ASCII); |
|
|
mdoc_run(p, mdoc); |
mdoc_run(p, mdoc); |
} |
} |
Line 90 term_free(struct termp *p) |
|
Line 91 term_free(struct termp *p) |
|
if (p->buf) |
if (p->buf) |
free(p->buf); |
free(p->buf); |
if (TERMENC_ASCII == p->enc && p->symtab) |
if (TERMENC_ASCII == p->enc && p->symtab) |
term_asciifree(p->symtab); |
chars_free(p->symtab); |
|
|
free(p); |
free(p); |
} |
} |
Line 331 do_special(struct termp *p, const char *word, size_t l |
|
Line 332 do_special(struct termp *p, const char *word, size_t l |
|
size_t sz; |
size_t sz; |
int i; |
int i; |
|
|
rhs = term_a2ascii(p->symtab, word, len, &sz); |
rhs = chars_a2ascii(p->symtab, word, len, &sz); |
|
|
if (NULL == rhs) { |
if (NULL == rhs) { |
#if 0 |
#if 0 |
Line 354 do_reserved(struct termp *p, const char *word, size_t |
|
Line 355 do_reserved(struct termp *p, const char *word, size_t |
|
size_t sz; |
size_t sz; |
int i; |
int i; |
|
|
rhs = term_a2res(p->symtab, word, len, &sz); |
rhs = chars_a2res(p->symtab, word, len, &sz); |
|
|
if (NULL == rhs) { |
if (NULL == rhs) { |
#if 0 |
#if 0 |