/*
* internal.h: Useful definitions
*
- * Copyright (C) 2007-2016 David Lutterkort
+ * Copyright (C) 2007-2017 David Lutterkort
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* file should have a need to mark nodes as dirty)
*
* The FILE flag is set for entries underneath /augeas/files that hold the
- * metadata for a file. It is only set by ADD_FILE_INFO and can not be set
- * by the user.
+ * metadata for a file by ADD_FILE_INFO. The FILE flag is set for entries
+ * underneath /files for the toplevel node corresponding to a file by
+ * TREE_FREPLACE and is used by AUG_SOURCE to find the file to which a node
+ * belongs.
*/
struct tree {
struct tree *next;
#define ROOT_P(t) ((t) != NULL && (t)->parent == (t)->parent->parent)
+#define TREE_HIDDEN(tree) ((tree)->label == NULL)
+
/* Function: make_tree
* Allocate a new tree node with the given LABEL, VALUE, and CHILDREN,
* which are not copied. The new tree is marked as dirty