newlib-2.1.0

git-svn-id: svn://kolibrios.org@4921 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2014-05-10 22:12:19 +00:00
parent 914e67bd24
commit 7315bb05c0
204 changed files with 10781 additions and 3986 deletions

View File

@@ -26,12 +26,12 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
size_t fread(void *<[buf]>, size_t <[size]>, size_t <[count]>,
FILE *<[fp]>);
size_t fread(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>,
FILE *restrict <[fp]>);
#include <stdio.h>
size_t _fread_r(struct _reent *<[ptr]>, void *<[buf]>,
size_t <[size]>, size_t <[count]>, FILE *<[fp]>);
size_t _fread_r(struct _reent *<[ptr]>, void *restrict <[buf]>,
size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -131,10 +131,10 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof),
size_t
_DEFUN(_fread_r, (ptr, buf, size, count, fp),
struct _reent * ptr _AND
_PTR buf _AND
_PTR __restrict buf _AND
size_t size _AND
size_t count _AND
FILE * fp)
FILE * __restrict fp)
{
register size_t resid;
register char *p;
@@ -146,7 +146,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
CHECK_INIT(ptr, fp);
_flockfile (fp);
_newlib_flockfile_start (fp);
ORIENT (fp, -1);
if (fp->_r < 0)
fp->_r = 0;
@@ -195,11 +195,11 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
#ifdef __SCLE
if (fp->_flags & __SCLE)
{
_funlockfile (fp);
_newlib_flockfile_exit (fp);
return crlf_r (ptr, fp, buf, total-resid, 1) / size;
}
#endif
_funlockfile (fp);
_newlib_flockfile_exit (fp);
return (total - resid) / size;
}
}
@@ -220,11 +220,11 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
#ifdef __SCLE
if (fp->_flags & __SCLE)
{
_funlockfile (fp);
_newlib_flockfile_exit (fp);
return crlf_r (ptr, fp, buf, total-resid, 1) / size;
}
#endif
_funlockfile (fp);
_newlib_flockfile_exit (fp);
return (total - resid) / size;
}
}
@@ -237,21 +237,21 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
#ifdef __SCLE
if (fp->_flags & __SCLE)
{
_funlockfile (fp);
_newlib_flockfile_exit (fp);
return crlf_r(ptr, fp, buf, total, 0) / size;
}
#endif
_funlockfile (fp);
_newlib_flockfile_end (fp);
return count;
}
#ifndef _REENT_ONLY
size_t
_DEFUN(fread, (buf, size, count, fp),
_PTR buf _AND
_PTR __restrict buf _AND
size_t size _AND
size_t count _AND
FILE * fp)
FILE *__restrict fp)
{
return _fread_r (_REENT, buf, size, count, fp);
}