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$ */
|
||||
|
||||
#ifndef __CONF_H__
|
||||
#define __CONF_H__
|
||||
#ifndef __CONFIG_FILE_H__
|
||||
#define __CONFIG_FILE_H__
|
||||
|
||||
enum {
|
||||
krb5_config_value_string,
|
||||
krb5_config_value_list
|
||||
};
|
||||
|
||||
struct krb5_config_relation;
|
||||
|
||||
typedef struct krb5_config_value{
|
||||
int type;
|
||||
struct krb5_config_binding {
|
||||
enum { STRING, LIST } type;
|
||||
char *name;
|
||||
struct krb5_config_binding *next;
|
||||
union {
|
||||
char *string;
|
||||
struct krb5_config_relation *relations;
|
||||
}data;
|
||||
}krb5_config_value;
|
||||
struct krb5_config_binding *list;
|
||||
} u;
|
||||
};
|
||||
|
||||
typedef struct krb5_config_relation{
|
||||
char *tag;
|
||||
struct krb5_config_value value;
|
||||
struct krb5_config_relation *next;
|
||||
}krb5_config_relation;
|
||||
typedef struct krb5_config_binding krb5_config_binding;
|
||||
|
||||
typedef struct krb5_config_section{
|
||||
struct krb5_config_section {
|
||||
char *name;
|
||||
struct krb5_config_relation *relations;
|
||||
krb5_config_binding *list;
|
||||
struct krb5_config_section *next;
|
||||
}krb5_config_section;
|
||||
};
|
||||
|
||||
typedef struct k5_cfile{
|
||||
char *filename;
|
||||
struct krb5_config_section *sections;
|
||||
}k5_cfile;
|
||||
typedef struct krb5_config_section krb5_config_section;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
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__ */
|
||||
#endif /* __CONFIG_FILE_H__ */
|
||||
|
Reference in New Issue
Block a user