Get the basename from a relative path. Returns pointer into rel_path. */
| 133 | |
| 134 | /* Get the basename from a relative path. Returns pointer into rel_path. */ |
| 135 | static const char *path_basename(const char *rel_path) { |
| 136 | const char *last = strrchr(rel_path, '/'); |
| 137 | return last ? last + SKIP_ONE : rel_path; |
| 138 | } |
| 139 | |
| 140 | /* Get the directory part of a relative path (without trailing slash). |
| 141 | * Returns heap-allocated string. For "foo.json" returns "". */ |
no outgoing calls
no test coverage detected