fix types
[compress.git] / code.h
diff --git a/code.h b/code.h
new file mode 100644 (file)
index 0000000..5ffcf48
--- /dev/null
+++ b/code.h
@@ -0,0 +1,23 @@
+#ifndef __CODE_H__
+#define __CODE_H__
+
+#define NB_BYTES 256
+
+/* byte type */
+
+typedef unsigned char byte_t;
+
+/* code structure */
+
+typedef struct {
+    char code[NB_BYTES - 1 + 1];
+} code_t;
+
+int codcat (char *dst, size_t n, char *src);
+int codcmp (char *cod1, char *cod2);
+int codcpy (char *dst, size_t n, char *src);
+int codlen (char *code);
+
+#endif /* __CODE_H__ */
+
+// vim: ts=4 sw=4 et