Blame agen5/directive.h

Packit Service 96b5d3
/*   -*- buffer-read-only: t -*- vi: set ro:
Packit Service 96b5d3
 *
Packit Service 96b5d3
 *  DO NOT EDIT THIS FILE   (directive.h)
Packit Service 96b5d3
 *
Packit Service 96b5d3
 *  It has been AutoGen-ed
Packit Service 96b5d3
 *  From the definitions    directive.def
Packit Service 96b5d3
 *  and the template file   str2enum
Packit Service 96b5d3
 *
Packit Service 96b5d3
 * Redistribution and use in source and binary forms, with or without
Packit Service 96b5d3
 * modification, are permitted provided that the following conditions
Packit Service 96b5d3
 * are met:
Packit Service 96b5d3
 * 1. Redistributions of source code must retain the above copyright
Packit Service 96b5d3
 *    notice, this list of conditions and the following disclaimer.
Packit Service 96b5d3
 * 2. Redistributions in binary form must reproduce the above copyright
Packit Service 96b5d3
 *    notice, this list of conditions and the following disclaimer in the
Packit Service 96b5d3
 *    documentation and/or other materials provided with the distribution.
Packit Service 96b5d3
 * 3. Neither the name ``Bruce Korb'' nor the name of any other
Packit Service 96b5d3
 *    contributor may be used to endorse or promote products derived
Packit Service 96b5d3
 *    from this software without specific prior written permission.
Packit Service 96b5d3
 *
Packit Service 96b5d3
 * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
Packit Service 96b5d3
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Packit Service 96b5d3
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit Service 96b5d3
 * ARE DISCLAIMED.  IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
Packit Service 96b5d3
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Packit Service 96b5d3
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Packit Service 96b5d3
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
Packit Service 96b5d3
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
Packit Service 96b5d3
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
Packit Service 96b5d3
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
Packit Service 96b5d3
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit Service 96b5d3
 *
Packit Service 96b5d3
 * Command/Keyword Dispatcher
Packit Service 96b5d3
 */
Packit Service 96b5d3
#ifndef STR2ENUM_DIRECTIVE_H_GUARD
Packit Service 96b5d3
#define STR2ENUM_DIRECTIVE_H_GUARD 1
Packit Service 96b5d3
/** \file directive.h
Packit Service 96b5d3
 * Header for string to enumeration values and back again.
Packit Service 96b5d3
 * @addtogroup autogen
Packit Service 96b5d3
 * @{
Packit Service 96b5d3
 */
Packit Service 96b5d3
#include <sys/types.h>
Packit Service 96b5d3
#ifndef MISSING_INTTYPES_H
Packit Service 96b5d3
# include <inttypes.h>
Packit Service 96b5d3
#endif
Packit Service 96b5d3
Packit Service 96b5d3
typedef enum {
Packit Service 96b5d3
    DIR_INVALID = 0,
Packit Service 96b5d3
    DIR_ASSERT   = 1,
Packit Service 96b5d3
    DIR_DEFINE   = 2,
Packit Service 96b5d3
    DIR_ELIF     = 3,
Packit Service 96b5d3
    DIR_ELSE     = 4,
Packit Service 96b5d3
    DIR_ENDIF    = 5,
Packit Service 96b5d3
    DIR_ENDMAC   = 6,
Packit Service 96b5d3
    DIR_ENDSHELL = 7,
Packit Service 96b5d3
    DIR_ERROR    = 8,
Packit Service 96b5d3
    DIR_IDENT    = 9,
Packit Service 96b5d3
    DIR_IF       = 10,
Packit Service 96b5d3
    DIR_IFDEF    = 11,
Packit Service 96b5d3
    DIR_IFNDEF   = 12,
Packit Service 96b5d3
    DIR_INCLUDE  = 13,
Packit Service 96b5d3
    DIR_LET      = 14,
Packit Service 96b5d3
    DIR_LINE     = 15,
Packit Service 96b5d3
    DIR_MACDEF   = 16,
Packit Service 96b5d3
    DIR_OPTION   = 17,
Packit Service 96b5d3
    DIR_PRAGMA   = 18,
Packit Service 96b5d3
    DIR_SHELL    = 19,
Packit Service 96b5d3
    DIR_UNDEF    = 20,
Packit Service 96b5d3
    DIR_COUNT
Packit Service 96b5d3
} directive_enum_t;
Packit Service 96b5d3
Packit Service 96b5d3
extern directive_enum_t
Packit Service 96b5d3
find_directive(char const * str);
Packit Service 96b5d3
Packit Service 96b5d3
extern char const *
Packit Service 96b5d3
directive_name(directive_enum_t id);
Packit Service 96b5d3
Packit Service 96b5d3
extern char *
Packit Service 96b5d3
doDir_directive_disp(char const * str,
Packit Service 96b5d3
	char * scan_next);
Packit Service 96b5d3
Packit Service 96b5d3
typedef char * (doDir_hdl_t)(
Packit Service 96b5d3
	directive_enum_t id, char const * str,
Packit Service 96b5d3
	char * scan_next);
Packit Service 96b5d3
Packit Service 96b5d3
doDir_hdl_t
Packit Service 96b5d3
    doDir_invalid,  doDir_assert,   doDir_define,   doDir_elif,
Packit Service 96b5d3
    doDir_else,     doDir_endif,    doDir_endmac,   doDir_endshell,
Packit Service 96b5d3
    doDir_error,    doDir_ident,    doDir_if,       doDir_ifdef,
Packit Service 96b5d3
    doDir_ifndef,   doDir_include,  doDir_let,      doDir_line,
Packit Service 96b5d3
    doDir_macdef,   doDir_option,   doDir_pragma,   doDir_shell,
Packit Service 96b5d3
    doDir_undef;
Packit Service 96b5d3
Packit Service 96b5d3
/** @} */#endif /* STR2ENUM_DIRECTIVE_H_GUARD */
Packit Service 96b5d3
/* end of directive.h */