pam_pkcs11  0.6.8
internal.h
Go to the documentation of this file.
00001 /*
00002  * $Id: internal.h 233 2007-04-04 09:52:54Z ludovic.rousseau $
00003  *
00004  * Copyright (C) 2002
00005  *  Antti Tapaninen <aet@cc.hut.fi>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 #ifndef _SCCONF_INTERNAL_H
00023 #define _SCCONF_INTERNAL_H
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #define TOKEN_TYPE_COMMENT      0
00030 #define TOKEN_TYPE_NEWLINE      1
00031 #define TOKEN_TYPE_STRING       2
00032 #define TOKEN_TYPE_PUNCT        3
00033 
00034 typedef struct _scconf_parser {
00035         scconf_context *config;
00036 
00037         scconf_block *block;
00038         scconf_item *last_item, *current_item;
00039 
00040         char *key;
00041         scconf_list *name;
00042 
00043         int state;
00044         int last_token_type;
00045         int line;
00046 
00047         unsigned int error:1;
00048         unsigned int warnings:1;
00049         char emesg[256];
00050 } scconf_parser;
00051 
00052 extern int scconf_lex_parse(scconf_parser * parser, const char *filename);
00053 extern int scconf_lex_parse_string(scconf_parser * parser,
00054                                    const char *config_string);
00055 extern void scconf_parse_token(scconf_parser * parser, int token_type, const char *token);
00056 
00057 #ifdef __cplusplus
00058 }
00059 #endif
00060 #endif