=================================================================== RCS file: /cvs/mandoc/man.h,v retrieving revision 1.17 retrieving revision 1.25 diff -u -p -r1.17 -r1.25 --- mandoc/man.h 2009/08/13 11:45:29 1.17 +++ mandoc/man.h 2010/03/23 21:50:43 1.25 @@ -1,4 +1,4 @@ -/* $Id: man.h,v 1.17 2009/08/13 11:45:29 kristaps Exp $ */ +/* $Id: man.h,v 1.25 2010/03/23 21:50:43 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -19,34 +19,44 @@ #include -#define MAN_br 0 -#define MAN_TH 1 -#define MAN_SH 2 -#define MAN_SS 3 -#define MAN_TP 4 -#define MAN_LP 5 -#define MAN_PP 6 -#define MAN_P 7 -#define MAN_IP 8 -#define MAN_HP 9 -#define MAN_SM 10 -#define MAN_SB 11 -#define MAN_BI 12 -#define MAN_IB 13 -#define MAN_BR 14 -#define MAN_RB 15 -#define MAN_R 16 -#define MAN_B 17 -#define MAN_I 18 -#define MAN_IR 19 -#define MAN_RI 20 -#define MAN_na 21 -#define MAN_i 22 -#define MAN_sp 23 -#define MAN_nf 24 -#define MAN_fi 25 -#define MAN_r 26 -#define MAN_MAX 27 +enum mant { + MAN_br = 0, + MAN_TH, + MAN_SH, + MAN_SS, + MAN_TP, + MAN_LP, + MAN_PP, + MAN_P, + MAN_IP, + MAN_HP, + MAN_SM, + MAN_SB, + MAN_BI, + MAN_IB, + MAN_BR, + MAN_RB, + MAN_R, + MAN_B, + MAN_I, + MAN_IR, + MAN_RI, + MAN_na, + MAN_i, + MAN_sp, + MAN_nf, + MAN_fi, + MAN_r, + MAN_RE, + MAN_RS, + MAN_DT, + MAN_UC, + MAN_PD, + MAN_Sp, + MAN_Vb, + MAN_Ve, + MAN_MAX, +}; enum man_type { MAN_TEXT, @@ -73,7 +83,7 @@ struct man_node { int nchild; int line; int pos; - int tok; + enum mant tok; int flags; #define MAN_VALID (1 << 0) #define MAN_ACTED (1 << 1) @@ -100,10 +110,9 @@ struct man; void man_free(struct man *); struct man *man_alloc(void *, int, const struct man_cb *); -int man_reset(struct man *); +void man_reset(struct man *); int man_parseln(struct man *, int, char *buf); int man_endparse(struct man *); -int man_valid_post(struct man *); const struct man_node *man_node(const struct man *); const struct man_meta *man_meta(const struct man *);