aboutsummaryrefslogtreecommitdiff
path: root/cat.h
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-02-28 13:03:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-02-28 13:03:40 +1300
commit7208f6fd2d62bef16edbafd327e7e0d4c13b7966 (patch)
tree4c87ce5bcdc9cc44022d2cd06fbab57a56507d96 /cat.h
downloadcat-7208f6fd2d62bef16edbafd327e7e0d4c13b7966.tar.gz
cat-7208f6fd2d62bef16edbafd327e7e0d4c13b7966.zip
First commit of that cat(1) clone I'm making
Diffstat (limited to 'cat.h')
-rw-r--r--cat.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/cat.h b/cat.h
new file mode 100644
index 0000000..c8db240
--- /dev/null
+++ b/cat.h
@@ -0,0 +1,24 @@
+#ifndef CAT_H
+#define CAT_H
+
+/* Whole bunch of headers I only sort-of understand that are used for the
+ * various system functions in the source files */
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+/* How big the buffer is to hold the bytes for the read-write cycle from each
+ * file descriptor */
+#define BUFLEN (2 << 12)
+
+/* Function prototypes so that I can refer to these functions in main() before
+ * I actually define them */
+int cfn(const char *fn, void *buf);
+int cfd(int fd, void *buf);
+
+#endif
+