version 1.162, 2011/05/17 14:38:34 |
version 1.163, 2011/05/20 15:51:18 |
Line 44 typedef void (*out_free)(void *); |
|
Line 44 typedef void (*out_free)(void *); |
|
enum outt { |
enum outt { |
OUTT_ASCII = 0, /* -Tascii */ |
OUTT_ASCII = 0, /* -Tascii */ |
OUTT_LOCALE, /* -Tlocale */ |
OUTT_LOCALE, /* -Tlocale */ |
|
OUTT_UTF8, /* -Tutf8 */ |
OUTT_TREE, /* -Ttree */ |
OUTT_TREE, /* -Ttree */ |
OUTT_HTML, /* -Thtml */ |
OUTT_HTML, /* -Thtml */ |
OUTT_XHTML, /* -Txhtml */ |
OUTT_XHTML, /* -Txhtml */ |
Line 213 parse(struct curparse *curp, int fd, |
|
Line 214 parse(struct curparse *curp, int fd, |
|
curp->outdata = html_alloc(curp->outopts); |
curp->outdata = html_alloc(curp->outopts); |
curp->outfree = html_free; |
curp->outfree = html_free; |
break; |
break; |
|
case (OUTT_UTF8): |
|
curp->outdata = utf8_alloc(curp->outopts); |
|
curp->outfree = ascii_free; |
|
break; |
case (OUTT_LOCALE): |
case (OUTT_LOCALE): |
curp->outdata = locale_alloc(curp->outopts); |
curp->outdata = locale_alloc(curp->outopts); |
curp->outfree = ascii_free; |
curp->outfree = ascii_free; |
Line 248 parse(struct curparse *curp, int fd, |
|
Line 253 parse(struct curparse *curp, int fd, |
|
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (OUTT_ASCII): |
case (OUTT_ASCII): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
|
case (OUTT_UTF8): |
|
/* FALLTHROUGH */ |
case (OUTT_LOCALE): |
case (OUTT_LOCALE): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (OUTT_PS): |
case (OUTT_PS): |
Line 307 toptions(struct curparse *curp, char *arg) |
|
Line 314 toptions(struct curparse *curp, char *arg) |
|
curp->outtype = OUTT_TREE; |
curp->outtype = OUTT_TREE; |
else if (0 == strcmp(arg, "html")) |
else if (0 == strcmp(arg, "html")) |
curp->outtype = OUTT_HTML; |
curp->outtype = OUTT_HTML; |
|
else if (0 == strcmp(arg, "utf8")) |
|
curp->outtype = OUTT_UTF8; |
else if (0 == strcmp(arg, "locale")) |
else if (0 == strcmp(arg, "locale")) |
curp->outtype = OUTT_LOCALE; |
curp->outtype = OUTT_LOCALE; |
else if (0 == strcmp(arg, "xhtml")) |
else if (0 == strcmp(arg, "xhtml")) |