summaryrefslogtreecommitdiff
path: root/usr/src/lib/libbc/libc/stdio/common/fputs.c
diff options
context:
space:
mode:
authormuffin <none@none>2005-10-20 11:47:44 -0700
committermuffin <none@none>2005-10-20 11:47:44 -0700
commit5d54f3d8999eac1762fe0a8c7177d20f1f201fae (patch)
tree65c7761c305dbd97609e64517f5781b433efa980 /usr/src/lib/libbc/libc/stdio/common/fputs.c
parent1b42782e10f177b2bd092559506a96dbbefefa54 (diff)
downloadillumos-joyent-5d54f3d8999eac1762fe0a8c7177d20f1f201fae.tar.gz
6309237 gcc and libbc don't get along
Diffstat (limited to 'usr/src/lib/libbc/libc/stdio/common/fputs.c')
-rw-r--r--usr/src/lib/libbc/libc/stdio/common/fputs.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/usr/src/lib/libbc/libc/stdio/common/fputs.c b/usr/src/lib/libbc/libc/stdio/common/fputs.c
index a18ba04b12..c91c890f85 100644
--- a/usr/src/lib/libbc/libc/stdio/common/fputs.c
+++ b/usr/src/lib/libbc/libc/stdio/common/fputs.c
@@ -20,8 +20,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1995, by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 1995 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/* Copyright (c) 1984 AT&T */
@@ -39,25 +39,23 @@
#include <stdio.h>
#include "stdiom.h"
#include <errno.h>
+#include <memory.h>
-extern char *memccpy();
-static char *memnulccpy();
+static char *memnulccpy(char *, char *, int, int);
int
-fputs(ptr, iop)
-char *ptr;
-register FILE *iop;
+fputs(char *ptr, FILE *iop)
{
- register int ndone = 0, n;
- register unsigned char *cptr, *bufend;
- register char *p;
- register char c;
+ int ndone = 0, n;
+ unsigned char *cptr, *bufend;
+ char *p;
+ char c;
if (_WRTCHK(iop)) {
iop->_flag |= _IOERR;
#ifdef POSIX
errno = EBADF;
-#endif POSIX
+#endif /* POSIX */
return (EOF);
}
bufend = iop->_base + iop->_bufsiz;
@@ -131,11 +129,9 @@ register FILE *iop;
* or NULL if c or NUL is not found in the first n bytes.
*/
static char *
-memnulccpy(s1, s2, c, n)
-register char *s1, *s2;
-register int c, n;
+memnulccpy(char *s1, char *s2, int c, int n)
{
- register int cmoved;
+ int cmoved;
while (--n >= 0) {
cmoved = *s2++;