home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !unixlib / source / clib / h / strings < prev    next >
Encoding:
Text File  |  2004-09-05  |  1.6 KB  |  56 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/strings.h,v $
  4.  * $Date: 2004/05/10 10:58:55 $
  5.  * $Revision: 1.9 $
  6.  * $State: Exp $
  7.  * $Author: peter $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef __STRINGS_H
  12. #define __STRINGS_H 1
  13.  
  14. /* We don't need and should not read this file if <string.h> was already
  15.    read. The one exception being that if __USE_BSD isn't defined, then
  16.    these aren't defined in string.h, so we need to define them here.  */
  17. #if !defined __STRING_H || !defined __USE_BSD
  18.  
  19. # include <unixlib/features.h>
  20. # define __need_size_t
  21. # include <stddef.h>
  22.  
  23. __BEGIN_DECLS
  24.  
  25. /* Same as strchr.  */
  26. extern char *index (const char *__s, int __c);
  27.  
  28. /* Same as strrchr.  */
  29. extern char *rindex (const char *__s, int __c);
  30.  
  31. /* Same as memcmp.  */
  32. extern int bcmp (const void *__s1,const void *__s2, size_t __n);
  33.  
  34. /* Copy n bytes of src to dest.  */
  35. extern void bcopy (const void *__src, void *__dest, size_t __n);
  36.  
  37. /* Set n bytes of s to 0.  */
  38. extern void bzero (void *__s, size_t __n);
  39.  
  40. /* Compare S1 and S2, ignoring case.  */
  41. extern int strcasecmp (const char *__s1, const char *__s2);
  42.  
  43. /* Compare n chars of S1 and S2, ignoring case.  */
  44. extern int strncasecmp (const char *__s1, const char *__s2, size_t __n);
  45.  
  46.  
  47. /* Return the position of the first bit set in I, or 0 if none are set.
  48.    The least-significant bit is position 1, the most-significant 32.  */
  49. extern int ffs (int __i);
  50.  
  51. __END_DECLS
  52.  
  53. #endif /* string.h  */
  54.  
  55. #endif /* strings.h  */
  56.