[BACK]Return to extern.h CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / docbook2mdoc

File: [cvsweb.bsd.lv] / docbook2mdoc / Attic / extern.h (download)

Revision 1.17, Wed Apr 2 12:12:41 2014 UTC (8 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_7
Changes since 1.16: +3 -0 lines

Add <sgmltag> and (ignore) <anchor>.
Also give more error-reporting for internal XML errors.

#ifndef EXTERN_H
#define EXTERN_H

/*
 * All recognised node types.
 */
enum	nodeid {
	NODE_ROOT = 0, /* Must comes first. */
	/* Alpha-ordered hereafter. */
	NODE_ACRONYM,
	NODE_ANCHOR,
	NODE_APPLICATION,
	NODE_ARG,
	NODE_CAUTION,
	NODE_CITEREFENTRY,
	NODE_CMDSYNOPSIS,
	NODE_CODE,
	NODE_COMMAND,
	NODE_DATE,
	NODE_EMPHASIS,
	NODE_ENTRY,
	NODE_ENVAR,
	NODE_FILENAME,
	NODE_FUNCDEF,
	NODE_FUNCPROTOTYPE,
	NODE_FUNCSYNOPSIS,
	NODE_FUNCSYNOPSISINFO,
	NODE_FUNCTION,
	NODE_ITEMIZEDLIST,
	NODE_GROUP,
	NODE_LINK,
	NODE_LISTITEM,
	NODE_LITERAL,
	NODE_MANVOLNUM, 
	NODE_NOTE, 
	NODE_OPTION,
	NODE_ORDEREDLIST,
	NODE_PARA,
	NODE_PARAMDEF,
	NODE_PARAMETER,
	NODE_PROGRAMLISTING,
	NODE_PROMPT,
	NODE_QUOTE,
	NODE_REFCLASS,
	NODE_REFDESCRIPTOR,
	NODE_REFENTRY,
	NODE_REFENTRYINFO,
	NODE_REFENTRYTITLE,
	NODE_REFMETA,
	NODE_REFMISCINFO,
	NODE_REFNAME,
	NODE_REFNAMEDIV,
	NODE_REFPURPOSE,
	NODE_REFSECT1,
	NODE_REFSECT2,
	NODE_REFSECT3,
	NODE_REFSECTION,
	NODE_REFSYNOPSISDIV,
	NODE_REPLACEABLE,
	NODE_ROW,
	NODE_SBR,
	NODE_SCREEN,
	NODE_SGMLTAG,
	NODE_STRUCTNAME,
	NODE_SYNOPSIS,
	NODE_TABLE,
	NODE_TBODY,
	NODE_TERM, 
	NODE_TEXT, 
	NODE_TFOOT,
	NODE_TGROUP,
	NODE_THEAD,
	NODE_TIP,
	NODE_TITLE,
	NODE_ULINK,
	NODE_USERINPUT,
	NODE_VARIABLELIST,
	NODE_VARLISTENTRY,
	NODE_VARNAME,
	NODE_WARNING,
	NODE_WORDASWORD,
	NODE__MAX
};

/*
 * All recognised attribute keys.
 */
enum	attrkey {
	/* Alpha-order... */
	ATTRKEY_CHOICE = 0,
	ATTRKEY_ID,
	ATTRKEY_REP,
	ATTRKEY__MAX
};

/*
 * All [explicitly] recognised attribute values.
 * If an attribute has ATTRVAL__MAX, it could be a free-form.
 */
enum	attrval {
	/* Alpha-order... */
	ATTRVAL_NOREPEAT,
	ATTRVAL_OPT,
	ATTRVAL_PLAIN,
	ATTRVAL_REPEAT,
	ATTRVAL_REQ,
	ATTRVAL__MAX
};

__BEGIN_DECLS

int isattrkey(enum nodeid node, enum attrkey key);
int isattrval(enum attrkey key, enum attrval val);
int isparent(enum nodeid node, enum nodeid parent);

__END_DECLS

#endif