]> pd.if.org Git - pdclib/blobdiff - includes/string.h
Re-import from Subversion.
[pdclib] / includes / string.h
index d28e18e6d2540e5d04d9cb1d86003b2d2cf5e90f..9d2a517a7cc2de434d46af6274b686d77d5c1205 100644 (file)
@@ -1,27 +1,37 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// String handling
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * String handling
+ * --------------------------------------------------------------------------*/
 
-#ifndef __STRING_H
-#define __STRING_H __STRING_H
+#ifndef _STRING_H
+#define _STRING_H _STRING_H
 
-// ----------------------------------------------------------------------------
-// MACROS
+#ifndef _NULL
+#include "__intern.h"
+#endif /* _NULL */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+#define NULL _NULL
 
-#include "__size_t.h"
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-// ----------------------------------------------------------------------------
-// FUNCTIONS
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t
+#endif /* _SIZE_T */
+
+/* ----------------------------------------------------------------------------
+ * FUNCTIONS
+ * --------------------------------------------------------------------------*/
 
 /** MEMory search for CHaRacter. Searches a memory area for a character.
  *  @param src The memory area.
@@ -202,7 +212,7 @@ int strncmp( const char * src_1, const char * src_2, size_t n );
 char * strncpy( char * restrict dest, const char * restrict src, size_t n );
 
 /** STRing SPaN. Compares two C strings, determining the length of the
- *  substring where both strings are equal.
+ *  substring containing only characters from the second string.
  *  @param src_1 The first string to be compared.
  *  @param src_2 The second string to be compared.
  *  @return The length of the identical substring.
@@ -269,4 +279,4 @@ char * strrchr( const char * src, int c );
  */
 char * strstr( const char * src_1, const char * src_2 );
 
-#endif // __STRING_H
+#endif /* _STRING_H */