|
@@ -1,28 +1,33 @@
|
1
|
|
-#ifndef ETHERBOOT_BITS_STRING_H
|
2
|
|
-#define ETHERBOOT_BITS_STRING_H
|
|
1
|
+#ifndef X86_BITS_STRING_H
|
|
2
|
+#define X86_BITS_STRING_H
|
|
3
|
+
|
3
|
4
|
/*
|
4
|
|
- * Taken from Linux /usr/include/asm/string.h
|
5
|
|
- * All except memcpy, memmove, memset and memcmp removed.
|
|
5
|
+ * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
|
|
6
|
+ *
|
|
7
|
+ * This program is free software; you can redistribute it and/or
|
|
8
|
+ * modify it under the terms of the GNU General Public License as
|
|
9
|
+ * published by the Free Software Foundation; either version 2 of the
|
|
10
|
+ * License, or any later version.
|
6
|
11
|
*
|
7
|
|
- * Non-standard memswap() function added because it saves quite a bit
|
8
|
|
- * of code (mbrown@fensystems.co.uk).
|
|
12
|
+ * This program is distributed in the hope that it will be useful, but
|
|
13
|
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
+ * General Public License for more details.
|
|
16
|
+ *
|
|
17
|
+ * You should have received a copy of the GNU General Public License
|
|
18
|
+ * along with this program; if not, write to the Free Software
|
|
19
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
20
|
+ * 02110-1301, USA.
|
9
|
21
|
*/
|
10
|
22
|
|
11
|
|
-/*
|
12
|
|
- * This string-include defines all string functions as inline
|
13
|
|
- * functions. Use gcc. It also assumes ds=es=data space, this should be
|
14
|
|
- * normal. Most of the string-functions are rather heavily hand-optimized,
|
15
|
|
- * see especially strtok,strstr,str[c]spn. They should work, but are not
|
16
|
|
- * very easy to understand. Everything is done entirely within the register
|
17
|
|
- * set, making the functions fast and clean. String instructions have been
|
18
|
|
- * used through-out, making for "slightly" unclear code :-)
|
|
23
|
+FILE_LICENCE ( GPL2_OR_LATER );
|
|
24
|
+
|
|
25
|
+/** @file
|
|
26
|
+ *
|
|
27
|
+ * Optimised string operations
|
19
|
28
|
*
|
20
|
|
- * NO Copyright (C) 1991, 1992 Linus Torvalds,
|
21
|
|
- * consider these trivial functions to be PD.
|
22
|
29
|
*/
|
23
|
30
|
|
24
|
|
-FILE_LICENCE ( PUBLIC_DOMAIN );
|
25
|
|
-
|
26
|
31
|
#define __HAVE_ARCH_MEMCPY
|
27
|
32
|
|
28
|
33
|
extern void * __memcpy ( void *dest, const void *src, size_t len );
|
|
@@ -224,4 +229,4 @@ extern int strncmp ( const char *str1, const char *str2, size_t len );
|
224
|
229
|
|
225
|
230
|
extern size_t strlen ( const char *string );
|
226
|
231
|
|
227
|
|
-#endif /* ETHERBOOT_BITS_STRING_H */
|
|
232
|
+#endif /* X86_BITS_STRING_H */
|