diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-10 00:22:48 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-10 00:22:48 +0200 |
commit | 781716c240da330d57f27bf22f48017f9132a489 (patch) | |
tree | 1a8a345bfc043691befd55ef736c5c45ea6ba410 /include | |
parent | 39839acc9601c1b36d1b43f4ead05ee6fdfebf45 (diff) |
Add pushd/popd utility
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index f618f81..b496039 100644 --- a/include/util.h +++ b/include/util.h @@ -41,4 +41,13 @@ void print_version(void); */ int mkdir_p(const char *path); +/* Returns 0 on success. On failure, prints error message to stderr. */ +int pushd(const char *path); + +/* Same as pushd, but the string doesn't have to be null-terminated. */ +int pushdn(const char *path, size_t len); + +/* Returns 0 on success. On failure, prints error message to stderr. */ +int popd(void); + #endif /* UTIL_H */ |