X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=libuci.c;h=d669c79634a7a2d39afe27f281c27a36b68816d2;hp=6e9587b9e0fb0e1abc2108980fcb09d272893d3e;hb=c8cc67f635eac49b2a002477c795d88205c50a33;hpb=6ce771b1095c220f849e70cdcbf23bd09f7fe7d5 diff --git a/libuci.c b/libuci.c index 6e9587b..d669c79 100644 --- a/libuci.c +++ b/libuci.c @@ -26,9 +26,6 @@ #include #include "uci.h" -static const char *uci_confdir = UCI_CONFDIR; -static const char *uci_savedir = UCI_SAVEDIR; - static const char *uci_errstr[] = { [UCI_OK] = "Success", [UCI_ERR_MEM] = "Out of memory", @@ -43,9 +40,10 @@ static const char *uci_errstr[] = { static void uci_unload_plugin(struct uci_context *ctx, struct uci_plugin *p); #include "uci_internal.h" -#include "util.c" #include "list.c" -#include "history.c" + +__private const char *uci_confdir = UCI_CONFDIR; +__private const char *uci_savedir = UCI_SAVEDIR; /* exported functions */ struct uci_context *uci_alloc_context(void) @@ -58,11 +56,11 @@ struct uci_context *uci_alloc_context(void) memset(ctx, 0, sizeof(struct uci_context)); uci_list_init(&ctx->root); - uci_list_init(&ctx->history_path); + uci_list_init(&ctx->delta_path); uci_list_init(&ctx->backends); uci_list_init(&ctx->hooks); uci_list_init(&ctx->plugins); - ctx->flags = UCI_FLAG_STRICT | UCI_FLAG_SAVED_HISTORY; + ctx->flags = UCI_FLAG_STRICT | UCI_FLAG_SAVED_DELTA; ctx->confdir = (char *) uci_confdir; ctx->savedir = (char *) uci_savedir; @@ -88,7 +86,7 @@ void uci_free_context(struct uci_context *ctx) struct uci_package *p = uci_to_package(e); uci_free_package(&p); } - uci_foreach_element_safe(&ctx->history_path, tmp, e) { + uci_foreach_element_safe(&ctx->delta_path, tmp, e) { uci_free_element(e); } UCI_TRAP_RESTORE(ctx);