summaryrefslogtreecommitdiffstats
path: root/src/bfstd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bfstd.h')
-rw-r--r--src/bfstd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bfstd.h b/src/bfstd.h
index 750847e..6f2e21e 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -127,6 +127,18 @@ int ynprompt(void);
// #include <string.h>
/**
+ * Allocate a copy of a region of memory.
+ *
+ * @param src
+ * The memory region to copy.
+ * @param size
+ * The size of the memory region.
+ * @return
+ * A copy of the region, allocated with malloc(), or NULL on failure.
+ */
+void *xmemdup(const void *src, size_t size);
+
+/**
* Format a mode like ls -l (e.g. -rw-r--r--).
*
* @param mode