libman.h revision 95c635efb7c3b86efc493e0447eaec7aecca3f0f
/* $Id: libman.h,v 1.55 2011/11/07 01:24:40 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef LIBMAN_H
#define LIBMAN_H
enum man_next {
MAN_NEXT_SIBLING = 0,
};
struct man {
int flags; /* parse flags */
};
#define MACRO_PROT_ARGS struct man *m, \
int line, \
int ppos, \
int *pos, \
char *buf
struct man_macro {
int (*fp)(MACRO_PROT_ARGS);
int flags;
#define MAN_SCOPED (1 << 0)
};
extern const struct man_macro *const man_macros;
#define man_pmsg(m, l, p, t) \
#define man_nmsg(m, n, t) \
int man_word_alloc(struct man *, int, int, const char *);
void man_hash_init(void);
enum mant man_hash_find(const char *);
int man_macroend(struct man *);
int man_valid_post(struct man *);
int man_unscope(struct man *,
#endif /*!LIBMAN_H*/