+ ldi->cl_first = -1;
+ ldi->cl_cursor = -1;
+
+ ldi->node_parent = NULL;
+ ldi->node_group = NULL;
+ ldi->next = NULL;
+}
+
+static void setLevelDirInfoToDefaultsFromParent(struct LevelDirInfo *ldi,
+ struct LevelDirInfo *parent)
+{
+ if (parent == NULL)
+ {
+ setLevelDirInfoToDefaults(ldi);
+ return;
+ }
+
+ /* first copy all values from the parent structure ... */
+ *ldi = *parent;
+
+ /* ... then set all fields to default that cannot be inherited from parent.
+ This is especially important for all those fields that can be set from
+ the 'levelinfo.conf' config file, because the function 'setSetupInfo()'
+ calls 'free()' for all already set token values which requires that no
+ other structure's pointer may point to them!
+ */
+
+ ldi->filename = NULL;
+ ldi->fullpath = NULL;
+ ldi->basepath = NULL;
+ ldi->name = getStringCopy(ANONYMOUS_NAME);
+ ldi->name_short = NULL;
+ ldi->name_sorting = NULL;
+ ldi->author = getStringCopy(parent->author);
+ ldi->imported_from = getStringCopy(parent->imported_from);
+
+ ldi->level_group = FALSE;
+ ldi->parent_link = FALSE;
+
+ ldi->node_parent = parent;
+ ldi->node_group = NULL;
+ ldi->next = NULL;