]> Joshua Wise's Git repositories - netwatch.git/blobdiff - include/minilib.h
More ICH2-specific code diked out.
[netwatch.git] / include / minilib.h
index e0fc16bfd21ab6588f964d394d198fedb225a27e..d5afd2b3cd024f189928554346a51d2da46077bf 100644 (file)
@@ -1,33 +1,37 @@
-#ifndef __MINILIB_H
-#define __MINILIB_H
+/* minilib.h
+ * Definitions for a very small libc
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise.  All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree. 
+ *
+ */
 
-#define MINILIB 1
+#ifndef MINILIB_H
+#define MINILIB_H
 
-#ifndef __int8_t_defined
-# define __int8_t_defined
-typedef signed char             int8_t;
-typedef short int               int16_t;
-typedef int                     int32_t;
-# if __WORDSIZE == 64
-typedef long int                int64_t;
-# else
-__extension__
-typedef long long int           int64_t;
-# endif
-#endif
+#include <stdarg.h>
 
-/* Unsigned.  */
-typedef unsigned char           uint8_t;
-typedef unsigned short int      uint16_t;
-#ifndef __uint32_t_defined
-typedef unsigned int            uint32_t;
-# define __uint32_t_defined
-#endif
-#if __WORDSIZE == 64
-typedef unsigned long int       uint64_t;
-#else
-__extension__
-typedef unsigned long long int  uint64_t;
-#endif
+extern void memcpy(void *dest, const void *src, int bytes);
+extern void memset(void *dest, int data, int bytes);
+extern void *memchr(const void *buf, char c, int maxlen);
+extern void memmove(void *dest, void *src, int bytes);
+extern int memcmp(const char *a2, const char *a1, int bytes);
+extern int strcmp(const char *a2, const char *a1);
+extern int strncmp(const char *a2, const char *a1, int n);
+extern int strlen(const char *c);
+extern void strcat(char *dest, char *src);
+extern void strcpy(char *a2, const char *a1);
+extern void puts(const char *c);
+extern void tohex(char *s, unsigned long l);
+extern void btohex(char *s, unsigned char c);
+extern void puthex(unsigned long l);
+extern int vsprintf(char *s, const char *fmt, va_list args);
+extern int vsnprintf(char *s, int size, const char *fmt, va_list args);
+extern int sprintf(char *s, const char *fmt, ...);
+extern int snprintf(char *s, int size, const char *fmt, ...);
+extern unsigned short htons(unsigned short in);
+extern unsigned int htonl(unsigned int in);
 
 #endif
This page took 0.024552 seconds and 4 git commands to generate.