version 1.16, 2010/06/26 15:22:19 |
version 1.28, 2015/04/02 21:36:51 |
|
|
/* $Id$ */ |
/* $OpenBSD$ */ |
/* |
/* |
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
|
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
* copyright notice and this permission notice appear in all copies. |
* copyright notice and this permission notice appear in all copies. |
* |
* |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifndef ROFF_H |
|
#define ROFF_H |
|
|
|
enum rofferr { |
enum roff_type { |
ROFF_CONT, /* continue processing line */ |
ROFFT_ROOT, |
ROFF_RERUN, /* re-run roff interpreter with offset */ |
ROFFT_BLOCK, |
ROFF_IGN, /* ignore current line */ |
ROFFT_HEAD, |
ROFF_ERR /* badness: puke and stop */ |
ROFFT_BODY, |
|
ROFFT_TAIL, |
|
ROFFT_ELEM, |
|
ROFFT_TEXT, |
|
ROFFT_TBL, |
|
ROFFT_EQN |
}; |
}; |
|
|
__BEGIN_DECLS |
|
|
|
struct roff; |
|
|
|
void roff_free(struct roff *); |
|
struct roff *roff_alloc(mandocmsg, void *); |
|
void roff_reset(struct roff *); |
|
enum rofferr roff_parseln(struct roff *, struct regset *, |
|
int, char **, size_t *, int, int *); |
|
int roff_endparse(struct roff *); |
|
|
|
__END_DECLS |
|
|
|
#endif /*!ROFF_H*/ |
|