Build entry path: dir/suffix or just suffix if dir is empty. */
| 378 | |
| 379 | /* Build entry path: dir/suffix or just suffix if dir is empty. */ |
| 380 | static char *build_entry_path(const char *rel_path, const char *suffix) { |
| 381 | char *dir = path_dirname(rel_path); |
| 382 | char buf[PKGMAP_PATH_BUF]; |
| 383 | snprintf(buf, sizeof(buf), "%s%s%s", dir[0] ? dir : "", dir[0] ? "/" : "", suffix); |
| 384 | free(dir); |
| 385 | return strdup(buf); |
| 386 | } |
| 387 | |
| 388 | /* Rust: Cargo.toml — [package] name */ |
| 389 | static void parse_cargo_toml(const char *source, int source_len, const char *rel_path, |
no test coverage detected