summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi.h1
-rw-r--r--include/lib.h56
2 files changed, 53 insertions, 4 deletions
diff --git a/include/acpi.h b/include/acpi.h
index 637ccd2..99a446c 100644
--- a/include/acpi.h
+++ b/include/acpi.h
@@ -1,3 +1,4 @@
+#pragma once
enum acpi_status {
ACPI_SUCCESS = 0,
diff --git a/include/lib.h b/include/lib.h
index 4271aa5..0651770 100644
--- a/include/lib.h
+++ b/include/lib.h
@@ -1,12 +1,60 @@
+#pragma once
+
+/**
+ * The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory
+ * areas s1 and s2.
+ */
+extern int memcmp(const void *restrict s1, const void *restrict s2, unsigned long n);
+
+/**
+ * The memcpy() function copies n bytes from memory area src to memory area dest.
+ * The memory areas must not overlap.
+ */
+extern void *memcpy(void *restrict dest, const void *restrict src, unsigned long n);
+
+/**
+ * The memmove() function copies n bytes from memory area src to memory area dest. The memory areas
+ * may overlap: copying takes place as though the bytes in src are first copied into a temporary array
+ * that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.
+ */
+extern void *memmove(void *dest, const void *src, unsigned long n);
+
+/**
+ * The memset() function fills the first n bytes of the memory area pointed to by s with the constant
+ * byte c.
+ */
+extern void *memset(void *restrict dest, int c, unsigned long n);
/**
* The strcmp() function compares the two strings s1 and s2. The locale is not taken into account
* (for a locale-aware comparison, see strcoll(3)). The comparison is done using unsigned characters.
*/
-int strncmp(const char *s1, const char *s2, unsigned long n);
+extern int strncmp(const char *restrict s1, const char *restrict s2, unsigned long n);
/**
- * The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory
- * areas s1 and s2.
+ * @returns 1 if c is a space
+ */
+int isspace(int c);
+
+/**
+ * @returns 1 if c is a digit (0 - 9)
*/
-int memcmp(const void *s1, const void *s2, unsigned long n);
+int isdigit(int c);
+
+
+char itoc(int i);
+int ctoi(char c);
+
+int atoi(const char* s);
+long int atol(const char* s);
+long long int atoll(const char* s);
+
+char *itoa(int n, char *buffer, int radix);
+char *ltoa(long int n, char *buffer, int radix);
+char *utoa(unsigned int n, char *buffer, int radix);
+char *ultoa(unsigned long int n, char *buffer, int radix);
+char *ftoa(float f, char *buffer);
+
+int strtoi(const char *str, char **endptr, int base);
+long int strtol(const char *str, char **endptr, int base);
+long long int strtoll(const char *str, char **endptr, int base);