delta: use a table for converting between UCI_CMD_XXX and prefixes.
[project/uci.git] / uci.h
diff --git a/uci.h b/uci.h
index 36c8890..b31d007 100644 (file)
--- a/uci.h
+++ b/uci.h
@@ -262,6 +262,8 @@ extern int uci_set_confdir(struct uci_context *ctx, const char *dir);
  *
  * This function allows you to add directories, which contain 'overlays'
  * for the active config, that will never be committed.
+ * Caller of this API should ensure that no duplicate entries (including the
+ * default search path, e.g. `UCI_SAVEDIR') should be added.
  */
 extern int uci_add_delta_path(struct uci_context *ctx, const char *dir);
 
@@ -448,6 +450,9 @@ struct uci_option
        } v;
 };
 
+/*
+ * UCI_CMD_ADD is used for anonymous sections or list values
+ */
 enum uci_command {
        UCI_CMD_ADD,
        UCI_CMD_REMOVE,
@@ -456,7 +461,10 @@ enum uci_command {
        UCI_CMD_REORDER,
        UCI_CMD_LIST_ADD,
        UCI_CMD_LIST_DEL,
+       __UCI_CMD_MAX,
+       __UCI_CMD_LAST = __UCI_CMD_MAX - 1
 };
+extern char const uci_command_char[];
 
 struct uci_delta
 {