koreth@ssyx.ucsc.edu (Steven Grimm) (03/12/89)
Submitted-by: csrobe@cs.wm.edu (Chip Roberson) Posting-number: Volume 2, Issue 25 Archive-name: mwstring Here is a reasonable implementation of the Draft Proposed American National Standard (dpANS) header file for strings in C. It should be reasonably consistent with the dpANS while representing MWC's implementation. Enjoy, -c |Chip Roberson ARPANET: csrobe@cs.wm.edu | |Dept of Comp. Sci. csrobe@icase.edu | |College of William and Mary BITNET: #csrobe@wmmvs.bitnet | |Williamsburg, VA 23185 UUCP: ...!uunet!pyrdc!gmu90x!wmcs!csrobe| PS: Anyone wishing to join a mailing list to discuss the timely topic of animal-rights, can send their name and e-mail address to csrobe@cs.wm.edu, and I'll add you name to the list. "It takes 40 dumb animals to make a fur coat, and just one dumb animal to wear it." -European TV commercial ---------------snip---------------snip---------------snip--------------- /* [csr] 10 Mar 1988 * string.h -- declarations for handling strings * * * This is a replacement string.h file for MWC. * It was written using _Notes_on_the_Draft_C_Standard_ * written by Thomas Plum, the MWC "Lexicon" for release 2.0, * and MWC _Release_Notes_ for Update Version 3.0.6. * * I guess I could claim a copyright, but why? Please feel free * to share this with others and correct where necessary. * * C. Roberson csrobe@cs.wm.edu */ #ifndef _STRING_HDR_ #define _STRING_HDR_ /* * void * memchr(const void *s, int c, size_t n); */ char * memchr( /* char *region, unsigned int character, unsigned int n */ ); /* * int memcmp(const void *s1, const void *s2, size_t n); */ int memcmp( /* char *region1, char *region2, unsigned int count */ ); /* * void * memcpy(const void *s1, const void *s2, size_t n); */ char * memcpy( /* char *region1, char *region2, unsigned int n */ ); /* * void * memmove(const void *s1, const void *s2, size_t n); */ /* * void * memset(const void *s, int c, size_t n); */ char * memset( /* char *buffer, int character, unsigned int n */ ); /* * char * strcat(char *s1, const char *s2); */ char * strcat( /* char *string1, char *string2 */ ); /* * char * strchr(const char *s, int c); */ char * strchr( /* char * string, int character */ ); /* * int strcmp(const char *s1, const char *s2); */ int strcmp( /* char *string1, char *string2 */ ); /* * int strcoll(const char *s1, const char *s2); */ /* * int strcpy(const char *s1, const char *s2); */ char * strcpy( /* char *string1, char *string2 */ ); /* * size_t strcspn(const char *s1, const char *s2); */ unsigned int strcspn( /* char *string1, char *string2 */ ); /* * char * strerror(int errnum); */ char * strerror( /* int error */ ); /* * size_t strlen(const char *s); */ int strlen( /* char * string */ ); char * strncat( /* char *string1, char *string2, unsigned n */ ); /* * char * strncmp(const char *s1, const char *s2, size_t n); */ int strncmp( /* char *string1, char *string2, unsigned n */ ); /* * char * strncpy(char *s1, const char *s2, size_t n); */ char * strncpy( /* char *string1, char *string2, unsigned n */ ); /* * char * strpbrk(const char *s1, const char *s2); */ char * strpbrk( /* char *string1, char *string2 */ ); /* * char * strrchr(const char *s1, int c); */ char * strrchr( /* char *string1, int character */ ); /* * size_t strspn(const char *s1, const char *s2); */ unsigned int strspn( /* char *string1, char *string2 */ ); /* * char * strstr(const char *s1, const char *s2); */ char * strstr( /* char *string1, char *string2 */ ); /* * char * strtok(char *s1, char *s2); */ char * strtok( /* char *string1, char *string2 */ ); /* * size_t strxfrm(char *to, const char *from, size_t maxsize); */ #endif