2002-05-23 Jeff Johnston <jjohnstn@redhat.com>

* libc/include/string.h (bcmp, bcopy, bzero): Change prototypes
        to use void * pointers and comply with Single Unix spec.
        * libc/string/bcmp.c: Change to use void * instead of char *.
        * libc/string/bcopy.c: Ditto.
        * libc/string/bzero.c: Ditto.
This commit is contained in:
Jeff Johnston
2002-05-23 18:46:04 +00:00
parent 7078175474
commit afe5651795
5 changed files with 28 additions and 19 deletions

View File

@ -7,12 +7,12 @@ INDEX
ANSI_SYNOPSIS
#include <string.h>
void bzero(char *<[b]>, size_t <[length]>);
void bzero(void *<[b]>, size_t <[length]>);
TRAD_SYNOPSIS
#include <string.h>
void bzero(<[b]>, <[length]>)
char *<[b]>;
void *<[b]>;
size_t <[length]>;
DESCRIPTION
@ -34,9 +34,10 @@ Neither ANSI C nor the System V Interface Definition (Issue 2) require
_VOID
_DEFUN (bzero, (b, length),
char *b _AND
void *b _AND
size_t length)
{
char *ptr = (char *)b;
while (length--)
*b++ = 0;
*ptr++ = 0;
}