summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-10 00:22:48 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-10 00:22:48 +0200
commit781716c240da330d57f27bf22f48017f9132a489 (patch)
tree1a8a345bfc043691befd55ef736c5c45ea6ba410 /include/util.h
parent39839acc9601c1b36d1b43f4ead05ee6fdfebf45 (diff)
Add pushd/popd utility
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h9
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 */