aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-14 19:10:40 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-18 20:48:34 -0400
commitfa9c66a6560a5009302aff22602ffa3e955726d9 (patch)
tree55215b572a47412f5eefb884517e6b71aaf9ee68 /src/string.h
parent0ac5e9e0fc84032c99d9be6c4903afb2d616c97f (diff)
downloadseabios-fa9c66a6560a5009302aff22602ffa3e955726d9.tar.gz
Rename util.c to string.c and introduce string.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/string.h')
-rw-r--r--src/string.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/string.h b/src/string.h
new file mode 100644
index 00000000..7c4c5ee9
--- /dev/null
+++ b/src/string.h
@@ -0,0 +1,30 @@
+// String manipulation function defs.
+#ifndef __STRING_H
+#define __STRING_H
+
+#include "types.h" // u32
+
+// string.c
+u8 checksum_far(u16 buf_seg, void *buf_far, u32 len);
+u8 checksum(void *buf, u32 len);
+size_t strlen(const char *s);
+int memcmp(const void *s1, const void *s2, size_t n);
+int strcmp(const char *s1, const char *s2);
+inline void memset_far(u16 d_seg, void *d_far, u8 c, size_t len);
+inline void memset16_far(u16 d_seg, void *d_far, u16 c, size_t len);
+void *memset(void *s, int c, size_t n);
+void memset_fl(void *ptr, u8 val, size_t size);
+inline void memcpy_far(u16 d_seg, void *d_far
+ , u16 s_seg, const void *s_far, size_t len);
+void memcpy_fl(void *d_fl, const void *s_fl, size_t len);
+void *memcpy(void *d1, const void *s1, size_t len);
+#if MODESEGMENT == 0
+#define memcpy __builtin_memcpy
+#endif
+void iomemcpy(void *d, const void *s, u32 len);
+void *memmove(void *d, const void *s, size_t len);
+char *strtcpy(char *dest, const char *src, size_t len);
+char *strchr(const char *s, int c);
+void nullTrailingSpace(char *buf);
+
+#endif // string.h