+/* parse_merge_name is called to process merge-file names in three cases:
+ *
+ * 1. When an non-per-dir merge rule is added.
+ * - Sanitize path using NULL (module_dir) and dirbuf_depth (which is 0 as
+ * desired if the rule came from initial filter processing rather than a
+ * per-dir merge file). If non-sanitizing, just cancel .. components.
+ * - If the path is relative, prepend dirbuf. During initial filter
+ * processing, dirbuf is empty, so this step has no effect and we will
+ * follow the path relative to the current directory, as desired. From a
+ * per-dir merge file, this step makes the path absolute so that we
+ * interpret it correctly.
+ * 2. When a dir-merge rule is set up (setup_merge_file), with dirbuf containing
+ * the topmost dir to which it will apply.
+ * - Sanitize path using NULL (module_dir) and dirbuf_depth. If non-
+ * sanitizing, just cancel .. components.
+ * - If the path begins with ../, then prepend the dirbuf, yielding an
+ * absolute path.
+ * - A path that is absolute at this point will activate the parent_dirscan
+ * in setup_merge_file, while a relative path (which contains no .. due to
+ * sanitization/cleaning) will be stored for following from each dir.
+ * 3. When a dir-merge rule is added during another parent_dirscan.
+ * - We want to interpret the rule relative to the ancestor dir in which it
+ * was defined, even though we don't actually push into that dir to set up
+ * the rule. Thus, we apply the same processing as in #2 while we have the
+ * desired dirbuf value, leaving an absolute or ..-free relative path that
+ * #2 won't modify further, except...
+ * - #2 will prepend the module_dir to an absolute path, so we are passed
+ * prefix_skip == module_dirlen to avoid prepending a duplicate module_dir
+ * now.
+ *
+ * FIXME: A per-dir merge rule added during a parent-dirscan needs to load
+ * files in the same ancestor dirs, so it should be made absolute
+ * unconditionally. This might make a relative rule parent-dirscanning, and
+ * it will mess up multicomponent relative rules. Quite possibly I should
+ * introduce a better syntax that allows separate specification of the relative
+ * and parent-dirscanning parts of the path, like ./ for --relative.
+ *
+ * When this is called on a rule addition (#1 or #3), merge_file is not null-
+ * terminated, but len_ptr points to its length and is updated with the length
+ * of the result. In all cases, the result is null-terminated. */