version 1.29, 2008/12/04 19:31:57 |
version 1.35, 2008/12/09 17:09:12 |
|
|
#ifndef PRIVATE_H |
#ifndef PRIVATE_H |
#define PRIVATE_H |
#define PRIVATE_H |
|
|
|
#include <stdio.h> |
#include <time.h> |
#include <time.h> |
|
|
|
#include "libmdocml.h" |
|
|
struct md_rbuf { |
struct md_rbuf { |
int fd; /* Open descriptor. */ |
int fd; /* Open descriptor. */ |
char *name; /* Name of file. */ |
char *name; /* Name of file. */ |
char *buf; /* Buffer. */ |
char *buf; /* Buffer. */ |
size_t bufsz; /* Size of buffer. */ |
size_t bufsz; /* Size of buffer. */ |
size_t line; /* Current line number. */ |
size_t line; /* Current line number. */ |
|
#define MD_LINE (BUFSIZ) |
|
char linebuf[MD_LINE]; |
}; |
}; |
|
|
struct md_mbuf { |
struct md_mbuf { |
Line 244 struct md_mbuf { |
|
Line 249 struct md_mbuf { |
|
extern const char *const *toknames; |
extern const char *const *toknames; |
extern const char *const *tokargnames; |
extern const char *const *tokargnames; |
|
|
enum roffmsg { ROFF_WARN, ROFF_ERROR }; |
enum roffmsg { |
|
ROFF_WARN, |
|
ROFF_ERROR |
|
}; |
|
|
|
enum roffmsec { |
|
ROFF_MSEC_1, |
|
ROFF_MSEC_2, |
|
ROFF_MSEC_3, |
|
ROFF_MSEC_3p, |
|
ROFF_MSEC_4, |
|
ROFF_MSEC_5, |
|
ROFF_MSEC_6, |
|
ROFF_MSEC_7, |
|
ROFF_MSEC_8, |
|
ROFF_MSEC_9, |
|
ROFF_MSEC_UNASS, |
|
ROFF_MSEC_DRAFT, |
|
ROFF_MSEC_PAPER, |
|
ROFF_MSEC_MAX |
|
}; |
|
|
|
enum roffatt { |
|
ROFF_ATT_V1, |
|
ROFF_ATT_V2, |
|
ROFF_ATT_V3, |
|
ROFF_ATT_V6, |
|
ROFF_ATT_V7, |
|
ROFF_ATT_32V, |
|
ROFF_ATT_V_1, |
|
ROFF_ATT_V_4, |
|
ROFF_ATT_MAX |
|
}; |
|
|
|
#define ROFFSec_NMASK (0x07) |
|
|
|
#define ROFFSec_NAME (1 << 0) |
|
#define ROFFSec_SYNOP (1 << 1) |
|
#define ROFFSec_DESC (1 << 2) |
|
#define ROFFSec_RETVAL (1 << 3) |
|
#define ROFFSec_ENV (1 << 4) |
|
#define ROFFSec_FILES (1 << 5) |
|
#define ROFFSec_EX (1 << 6) |
|
#define ROFFSec_DIAG (1 << 7) |
|
#define ROFFSec_ERRS (1 << 8) |
|
#define ROFFSec_SEEALSO (1 << 9) |
|
#define ROFFSec_STAND (1 << 10) |
|
#define ROFFSec_HIST (1 << 11) |
|
#define ROFFSec_AUTH (1 << 12) |
|
#define ROFFSec_CAVEATS (1 << 13) |
|
#define ROFFSec_BUGS (1 << 14) |
|
#define ROFFSec_OTHER (1 << 15) |
|
|
struct roffcb { |
struct roffcb { |
void (*roffmsg)(void *, enum roffmsg, |
int (*roffmsg)(void *, enum roffmsg, |
const char *, const char *, char *); |
|
int (*roffhead)(void *, const struct tm *, const char *, |
|
const char *, const char *, const char *); |
const char *, const char *, const char *); |
|
int (*roffhead)(void *, const struct tm *, const char *, |
|
const char *, enum roffmsec, const char *); |
int (*rofftail)(void *); |
int (*rofftail)(void *); |
int (*roffdata)(void *, int, const char *, char *); |
int (*roffdata)(void *, int, const char *, const char *); |
int (*roffin)(void *, int, int *, char **); |
int (*roffin)(void *, int, int *, const char **); |
int (*roffout)(void *, int); |
int (*roffout)(void *, int); |
int (*roffblkin)(void *, int, int *, char **); |
int (*roffblkin)(void *, int, int *, const char **); |
int (*roffblkout)(void *, int); |
int (*roffblkout)(void *, int); |
int (*roffblkheadin)(void *, int, int *, char **); |
int (*roffblkheadin)(void *, int, int *, const char **); |
int (*roffblkheadout)(void *, int); |
int (*roffblkheadout)(void *, int); |
int (*roffblkbodyin)(void *, int, int *, char **); |
int (*roffblkbodyin)(void *, int, int *, const char **); |
int (*roffblkbodyout)(void *, int); |
int (*roffblkbodyout)(void *, int); |
int (*roffspecial)(void *, int, int *, char **, char **); |
int (*roffspecial)(void *, int, const char *, |
|
const int *, const char **, const char **); |
}; |
}; |
|
|
struct rofftree; |
struct rofftree; |
Line 292 int roff_engine(struct rofftree *, char *); |
|
Line 349 int roff_engine(struct rofftree *, char *); |
|
int roff_free(struct rofftree *, int); |
int roff_free(struct rofftree *, int); |
|
|
int rofftok_scan(const char *, int *); |
int rofftok_scan(const char *, int *); |
|
|
|
char *roff_literal(int, const int *, |
|
const char **, const char **); |
|
char *roff_fmtstring(int); |
|
char *roff_msecname(enum roffmsec); |
|
enum roffmsec roff_msec(const char *); |
|
int roff_sec(const char **); |
|
enum roffatt roff_att(const char *); |
|
|
__END_DECLS |
__END_DECLS |
|
|