/* Allocate a new string and store a path of pth relative to relto, assuming
   both path and relto are files. For example if
   path=/home/foo/bar/baz.pcb and relto=/home/foo/heh.txt, the result is
   bar/baz.pcb; if they are swapped the result is  ../heh.txt */
char *csch_relative_path_files(const char *pth, const char *relto);


/* Return pointer to file's base name (see basename(1)) within path */
const char *csch_basename(const char *path);

/* Return a pointer to the parent dir name in fullpath; e.g. if fullpath
   is /foo/bar/baz.rs, return a pointer to bar. If there's no parent dir,
   return pointer to fullpath. */
const char *csch_parent_dir_name(const char *fullpath);
