Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/stdio.c')
-rw-r--r--newlib/libc/stdio/stdio.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c
index 8bc736088..bf304bc18 100644
--- a/newlib/libc/stdio/stdio.c
+++ b/newlib/libc/stdio/stdio.c
@@ -1,3 +1,5 @@
+/* No user fns here. Pesch 15apr92. */
+
/*
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -14,10 +16,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* No user fns here. Pesch 15apr92. */
-#include <_ansi.h>
-#include <reent.h>
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -30,10 +29,10 @@
*/
_READ_WRITE_RETURN_TYPE
-_DEFUN(__sread, (cookie, buf, n),
- _PTR cookie _AND
- char *buf _AND
- int n)
+__sread (cookie, buf, n)
+ _PTR cookie;
+ char *buf;
+ int n;
{
register FILE *fp = (FILE *) cookie;
register int ret;
@@ -41,14 +40,14 @@ _DEFUN(__sread, (cookie, buf, n),
#ifdef __SCLE
int oldmode = 0;
if (fp->_flags & __SCLE)
- oldmode = setmode (fp->_file, O_BINARY);
+ oldmode = setmode(fp->_file, O_BINARY);
#endif
ret = _read_r (_REENT, fp->_file, buf, n);
#ifdef __SCLE
if (oldmode)
- setmode (fp->_file, oldmode);
+ setmode(fp->_file, oldmode);
#endif
/* If the read succeeded, update the current offset. */
@@ -61,10 +60,10 @@ _DEFUN(__sread, (cookie, buf, n),
}
_READ_WRITE_RETURN_TYPE
-_DEFUN(__swrite, (cookie, buf, n),
- _PTR cookie _AND
- char _CONST *buf _AND
- int n)
+__swrite (cookie, buf, n)
+ _PTR cookie;
+ char _CONST *buf;
+ int n;
{
register FILE *fp = (FILE *) cookie;
int w;
@@ -73,29 +72,29 @@ _DEFUN(__swrite, (cookie, buf, n),
#endif
if (fp->_flags & __SAPP)
- _CAST_VOID _lseek_r (_REENT, fp->_file, (_off_t) 0, SEEK_END);
+ (void) _lseek_r (_REENT, fp->_file, (_off_t) 0, SEEK_END);
fp->_flags &= ~__SOFF; /* in case O_APPEND mode is set */
#ifdef __SCLE
if (fp->_flags & __SCLE)
- oldmode = setmode (fp->_file, O_BINARY);
+ oldmode = setmode(fp->_file, O_BINARY);
#endif
w = _write_r (_REENT, fp->_file, buf, n);
#ifdef __SCLE
if (oldmode)
- setmode (fp->_file, oldmode);
+ setmode(fp->_file, oldmode);
#endif
return w;
}
_fpos_t
-_DEFUN(__sseek, (cookie, offset, whence),
- _PTR cookie _AND
- _fpos_t offset _AND
- int whence)
+__sseek (cookie, offset, whence)
+ _PTR cookie;
+ _fpos_t offset;
+ int whence;
{
register FILE *fp = (FILE *) cookie;
register _off_t ret;
@@ -112,8 +111,8 @@ _DEFUN(__sseek, (cookie, offset, whence),
}
int
-_DEFUN(__sclose, (cookie),
- _PTR cookie)
+__sclose (cookie)
+ _PTR cookie;
{
FILE *fp = (FILE *) cookie;
@@ -122,8 +121,7 @@ _DEFUN(__sclose, (cookie),
#ifdef __SCLE
int
-_DEFUN(__stextmode, (fd),
- int fd)
+__stextmode (int fd)
{
#ifdef __CYGWIN__
return _cygwin_istext_for_stdio (fd);