new c-based configuration reading stuff
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1971 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,57 +1,26 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#ifndef __CONF_H__
|
#ifndef __CONFIG_FILE_H__
|
||||||
#define __CONF_H__
|
#define __CONFIG_FILE_H__
|
||||||
|
|
||||||
enum {
|
struct krb5_config_binding {
|
||||||
krb5_config_value_string,
|
enum { STRING, LIST } type;
|
||||||
krb5_config_value_list
|
char *name;
|
||||||
|
struct krb5_config_binding *next;
|
||||||
|
union {
|
||||||
|
char *string;
|
||||||
|
struct krb5_config_binding *list;
|
||||||
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct krb5_config_relation;
|
typedef struct krb5_config_binding krb5_config_binding;
|
||||||
|
|
||||||
typedef struct krb5_config_value{
|
struct krb5_config_section {
|
||||||
int type;
|
char *name;
|
||||||
union {
|
krb5_config_binding *list;
|
||||||
char *string;
|
struct krb5_config_section *next;
|
||||||
struct krb5_config_relation *relations;
|
};
|
||||||
}data;
|
|
||||||
}krb5_config_value;
|
|
||||||
|
|
||||||
typedef struct krb5_config_relation{
|
typedef struct krb5_config_section krb5_config_section;
|
||||||
char *tag;
|
|
||||||
struct krb5_config_value value;
|
|
||||||
struct krb5_config_relation *next;
|
|
||||||
}krb5_config_relation;
|
|
||||||
|
|
||||||
typedef struct krb5_config_section{
|
#endif /* __CONFIG_FILE_H__ */
|
||||||
char *name;
|
|
||||||
struct krb5_config_relation *relations;
|
|
||||||
struct krb5_config_section *next;
|
|
||||||
}krb5_config_section;
|
|
||||||
|
|
||||||
typedef struct k5_cfile{
|
|
||||||
char *filename;
|
|
||||||
struct krb5_config_section *sections;
|
|
||||||
}k5_cfile;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
static char *gettoken(FILE *F);
|
|
||||||
static void
|
|
||||||
free_config_file(k5_cfile *cf);
|
|
||||||
static krb5_error_code
|
|
||||||
new_config_file(k5_cfile **cf, const char *filename);
|
|
||||||
static void
|
|
||||||
free_config_section(krb5_config_section *sec);
|
|
||||||
static krb5_error_code
|
|
||||||
new_config_section(krb5_config_section **sec, const char *name);
|
|
||||||
static void
|
|
||||||
free_config_relation(krb5_config_relation *rel);
|
|
||||||
static void
|
|
||||||
free_config_value(krb5_config_value val);
|
|
||||||
static krb5_error_code
|
|
||||||
parse_config_file(k5_cfile **cf, const char *filename);
|
|
||||||
*/
|
|
||||||
#endif /* __CONF_H__ */
|
|
||||||
|
Reference in New Issue
Block a user