]>
Commit | Line | Data |
---|---|---|
f1584bb0 JW |
1 | /* minilib.h |
2 | * Definitions for a very small libc | |
3 | * NetWatch system management mode administration console | |
4 | * | |
5 | * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. | |
6 | * This program is free software; you can redistribute and/or modify it under | |
7 | * the terms found in the file LICENSE in the root of this source tree. | |
8 | * | |
9 | */ | |
10 | ||
36ce375d JP |
11 | #ifndef MINILIB_H |
12 | #define MINILIB_H | |
d56898ee | 13 | |
d24901e6 JW |
14 | #include <stdarg.h> |
15 | ||
42e26afa | 16 | extern void memcpy(void *dest, const void *src, int bytes); |
6e6d4a8b | 17 | extern void memset(void *dest, int data, int bytes); |
db9fad13 | 18 | extern void *memchr(const void *buf, char c, int maxlen); |
d24901e6 JW |
19 | extern void memmove(void *dest, void *src, int bytes); |
20 | extern int memcmp(const char *a2, const char *a1, int bytes); | |
21 | extern int strcmp(const char *a2, const char *a1); | |
6f9272bd | 22 | extern int strncmp(const char *a2, const char *a1, int n); |
a9d1719c | 23 | extern int strlen(const char *c); |
9343e933 | 24 | extern void strcat(char *dest, char *src); |
d24901e6 | 25 | extern void strcpy(char *a2, const char *a1); |
a9d1719c | 26 | extern void puts(const char *c); |
d24901e6 | 27 | extern void tohex(char *s, unsigned long l); |
db9fad13 | 28 | extern void btohex(char *s, unsigned char c); |
d24901e6 JW |
29 | extern void puthex(unsigned long l); |
30 | extern int vsprintf(char *s, const char *fmt, va_list args); | |
31 | extern int vsnprintf(char *s, int size, const char *fmt, va_list args); | |
32 | extern int sprintf(char *s, const char *fmt, ...); | |
33 | extern int snprintf(char *s, int size, const char *fmt, ...); | |
644af6b4 | 34 | extern unsigned short htons(unsigned short in); |
6e6d4a8b | 35 | extern unsigned int htonl(unsigned int in); |
d56898ee | 36 | |
37 | #endif |