rb_helpers.h
¶
Contains various helper functions for the librootbeer
API.
General purpose functions that can easily be extracted for reuse. Good examples are rb_canon_relative which canonicalizes an absolute path to a relative path, etc.
Functions
-
char *rb_canon_relative(rb_ctx_t *ctx, const char *abs_path)¶
Canonicalizes an absolute path to a relative path based on the context. The path is relative to the entrypoint lua script directory.
- Parameters:
ctx – Pointer to the rootbeer context.
abs_path – The absolute path to be canonicalized.
- Returns:
A newly allocated string containing the relative path.