|
|
@@ -14,33 +14,8 @@
|
|
14
|
14
|
#ifndef ETHERBOOT_STRING_H
|
|
15
|
15
|
#define ETHERBOOT_STRING_H
|
|
16
|
16
|
|
|
17
|
|
-#include "stddef.h"
|
|
18
|
|
-#include "bits/string.h"
|
|
19
|
|
-
|
|
20
|
|
-
|
|
21
|
|
-/* *** FROM ctype.h *** */
|
|
22
|
|
-
|
|
23
|
|
-#define isdigit(c) ((c & 0x04) != 0)
|
|
24
|
|
-#define islower(c) ((c & 0x02) != 0)
|
|
25
|
|
-//#define isspace(c) ((c & 0x20) != 0)
|
|
26
|
|
-#define isupper(c) ((c & 0x01) != 0)
|
|
27
|
|
-
|
|
28
|
|
-static inline unsigned char tolower(unsigned char c)
|
|
29
|
|
-{
|
|
30
|
|
- if (isupper(c))
|
|
31
|
|
- c -= 'A'-'a';
|
|
32
|
|
- return c;
|
|
33
|
|
-}
|
|
34
|
|
-
|
|
35
|
|
-static inline unsigned char toupper(unsigned char c)
|
|
36
|
|
-{
|
|
37
|
|
- if (islower(c))
|
|
38
|
|
- c -= 'a'-'A';
|
|
39
|
|
- return c;
|
|
40
|
|
-}
|
|
41
|
|
-
|
|
42
|
|
-
|
|
43
|
|
-/* *** FROM string.h *** */
|
|
|
17
|
+#include <stddef.h>
|
|
|
18
|
+#include <bits/string.h>
|
|
44
|
19
|
|
|
45
|
20
|
int strnicmp(const char *s1, const char *s2, size_t len);
|
|
46
|
21
|
char * strcpy(char * dest,const char *src);
|