projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ignore gdb files
[project/uci.git]
/
uci.h
diff --git
a/uci.h
b/uci.h
index
4706255
..
26cc3b7
100644
(file)
--- a/
uci.h
+++ b/
uci.h
@@
-50,6
+50,11
@@
struct uci_parse_context;
extern struct uci_context *uci_alloc(void);
/**
extern struct uci_context *uci_alloc(void);
/**
+ * uci_free: Free the uci context including all of its data
+ */
+extern void uci_free(struct uci_context *ctx);
+
+/**
* uci_perror: Print the last uci error that occured
* @ctx: uci context
* @str: string to print before the error message
* uci_perror: Print the last uci error that occured
* @ctx: uci context
* @str: string to print before the error message
@@
-62,15
+67,21
@@
extern void uci_perror(struct uci_context *ctx, const char *str);
* @ctx: uci context
* @name: name of the config file (relative to the config directory)
*/
* @ctx: uci context
* @name: name of the config file (relative to the config directory)
*/
-int uci_load(struct uci_context *ctx, const char *name);
+
extern
int uci_load(struct uci_context *ctx, const char *name);
/**
* uci_cleanup: Clean up after an error
*
* @ctx: uci context
*/
/**
* uci_cleanup: Clean up after an error
*
* @ctx: uci context
*/
-int uci_cleanup(struct uci_context *ctx);
+
extern
int uci_cleanup(struct uci_context *ctx);
+/**
+ * uci_list_configs: List available uci config files
+ *
+ * @ctx: uci context
+ */
+extern char **uci_list_configs(struct uci_context *ctx);
/* UCI data structures */
/* UCI data structures */
@@
-84,8
+95,6
@@
struct uci_context
/* private: */
int errno;
jmp_buf trap;
/* private: */
int errno;
jmp_buf trap;
- jmp_buf trap_saved;
- int saved;
};
struct uci_parse_context
};
struct uci_parse_context
@@
-97,6
+106,7
@@
struct uci_parse_context
struct uci_config *cfg;
FILE *file;
char *buf;
struct uci_config *cfg;
FILE *file;
char *buf;
+ char *reason;
int bufsz;
};
int bufsz;
};