+
+/*
+ * Resolve a DAT path predictably.
+ *
+ * Resolution order:
+ * 1. explicit_dir, when non-empty (authoritative);
+ * 2. FRIIDUMP_REDUMP_DAT_DIR, when set (authoritative);
+ * 3. executable_dir/redump_dat (portable and CMake build layout);
+ * 4. executable_dir/../share/friidump/redump_dat (installed Unix layout);
+ * 5. current-working-directory redump_dat.
+ *
+ * CMake copies the bundled DAT files beside the build executable and installs
+ * them under the platform-appropriate data directory. The selected candidate
+ * is always written to out_path when arguments are valid. The return value is
+ * nonzero only when that candidate exists.
+ */
+int redump_resolve_dat_path(
+ const char *explicit_dir,
+ const char *executable_dir,
+ const char *basename,
+ char *out_path,
+ size_t out_path_size
+);
+