Updating files somehow confused by CVS.

Old tree cvs reports up-to-date.
New tree - different ???
more to come...

svn path=/trunk/; revision=3807
This commit is contained in:
Robert Dickenson 2002-11-29 11:26:58 +00:00
parent 5f25774f6e
commit 2ebbba0d7d
16 changed files with 80 additions and 76 deletions

View file

@ -7,17 +7,17 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 28/12/98: Created * 28/12/98: Created
*/ */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef isalnum #undef isalnum
int isalnum(int c) int isalnum(int c)
{ {
return _isctype(c,_ALPHA | _DIGIT); return _isctype(c,_ALPHA | _DIGIT);
} }
#undef iswalnum #undef iswalnum
int iswalnum(wint_t c) int iswalnum(wint_t c)
{ {
return iswctype(c,_ALPHA | _DIGIT); return iswctype(c,_ALPHA | _DIGIT);
} }

View file

@ -7,17 +7,17 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 28/12/98: Created * 28/12/98: Created
*/ */
#include <msvcrt/ctype.h>
#include <crtdll/ctype.h>
#undef isalpha #undef isalpha
int isalpha(int c) int isalpha(int c)
{ {
return _isctype(c,_ALPHA); return _isctype(c, _ALPHA);
} }
#undef iswalpha #undef iswalpha
int iswalpha(wint_t c) int iswalpha(wint_t c)
{ {
return iswctype(c,_ALPHA); return iswctype(c, _ALPHA);
} }

View file

@ -1,14 +1,15 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef iscntrl #undef iscntrl
int iscntrl(int c) int iscntrl(int c)
{ {
return _isctype(c,_CONTROL); return _isctype(c, _CONTROL);
} }
#undef iswcntrl #undef iswcntrl
int iswcntrl(wint_t c) int iswcntrl(wint_t c)
{ {
return iswctype(c,_CONTROL); return iswctype(c, _CONTROL);
} }

View file

@ -7,8 +7,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 28/12/98: Created * 28/12/98: Created
*/ */
#include <msvcrt/ctype.h>
#include <crtdll/ctype.h>
int __iscsymf(int c) int __iscsymf(int c)
{ {

View file

@ -1,14 +1,15 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef isdigit #undef isdigit
int isdigit(int c) int isdigit(int c)
{ {
return _isctype(c,_DIGIT); return _isctype(c, _DIGIT);
} }
#undef iswdigit #undef iswdigit
int iswdigit(wint_t c) int iswdigit(wint_t c)
{ {
return iswctype(c,_DIGIT); return iswctype(c, _DIGIT);
} }

View file

@ -1,13 +1,14 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef islower #undef islower
int islower(int c) int islower(int c)
{ {
return _isctype(c,_LOWER); return _isctype(c, _LOWER);
} }
int iswlower(wint_t c) int iswlower(wint_t c)
{ {
return iswctype(c,_LOWER); return iswctype(c, _LOWER);
} }

View file

@ -1,14 +1,15 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef ispunct #undef ispunct
int ispunct(int c) int ispunct(int c)
{ {
return _isctype(c,_PUNCT); return _isctype(c, _PUNCT);
} }
#undef iswpunct #undef iswpunct
int iswpunct(wint_t c) int iswpunct(wint_t c)
{ {
return iswctype(c,_PUNCT); return iswctype(c, _PUNCT);
} }

View file

@ -1,13 +1,14 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef isupper #undef isupper
int isupper(int c) int isupper(int c)
{ {
return _isctype(c,_UPPER); return _isctype(c, _UPPER);
} }
int iswupper(wint_t c) int iswupper(wint_t c)
{ {
return iswctype(c,_UPPER); return iswctype(c, _UPPER);
} }

View file

@ -1,15 +1,16 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
#undef isxdigit #undef isxdigit
int isxdigit(int c) int isxdigit(int c)
{ {
return _isctype(c,_HEX); return _isctype(c, _HEX);
} }
#undef iswxdigit #undef iswxdigit
int iswxdigit(wint_t c) int iswxdigit(wint_t c)
{ {
return iswctype(c,_HEX); return iswctype(c, _HEX);
} }

View file

@ -1,9 +1,9 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/ctype.h> #include <msvcrt/ctype.h>
int __toascii(int c) int __toascii(int c)
{ {
return ((unsigned)(c) & 0x7F ); return((unsigned)(c) & 0x7F);
} }

View file

@ -1,10 +1,12 @@
#include <crtdll/float.h> #include <msvcrt/float.h>
#include <crtdll/internal/ieee.h> #include <msvcrt/internal/ieee.h>
double _chgsign( double __x )
double _chgsign(double __x)
{ {
double_t *x = (double_t *)&x; double_t* x = (double_t*)&x;
if ( x->sign == 1 )
if (x->sign == 1)
x->sign = 0; x->sign = 0;
else else
x->sign = 1; x->sign = 1;

View file

@ -1,6 +1,7 @@
#include <crtdll/float.h> #include <msvcrt/float.h>
#include <crtdll/math.h> #include <msvcrt/math.h>
#include <crtdll/internal/ieee.h> #include <msvcrt/internal/ieee.h>
#define _FPCLASS_SNAN 0x0001 /* signaling NaN */ #define _FPCLASS_SNAN 0x0001 /* signaling NaN */
#define _FPCLASS_QNAN 0x0002 /* quiet NaN */ #define _FPCLASS_QNAN 0x0002 /* quiet NaN */
@ -28,38 +29,35 @@ typedef int fpclass_t;
fpclass_t _fpclass(double __d) fpclass_t _fpclass(double __d)
{ {
double_t *d = (double_t *)&__d; double_t* d = (double_t*)&__d;
if ( d->exponent == 0 ) { if (d->exponent == 0) {
if ( d->mantissah == 0 && d->mantissal == 0 ) { if (d->mantissah == 0 && d->mantissal == 0) {
if ( d->sign ==0 ) if (d->sign ==0)
return FP_NZERO; return FP_NZERO;
else else
return FP_PZERO; return FP_PZERO;
} else { } else {
if ( d->sign ==0 ) if (d->sign ==0)
return FP_NDENORM; return FP_NDENORM;
else else
return FP_PDENORM; return FP_PDENORM;
} }
} }
if (d->exponent == 0x7ff ) { if (d->exponent == 0x7ff) {
if ( d->mantissah == 0 && d->mantissal == 0 ) { if (d->mantissah == 0 && d->mantissal == 0) {
if ( d->sign ==0 ) if (d->sign ==0)
return FP_NINF; return FP_NINF;
else else
return FP_PINF; return FP_PINF;
} }
else if ( d->mantissah == 0 && d->mantissal != 0 ) { else if (d->mantissah == 0 && d->mantissal != 0) {
return FP_QNAN; return FP_QNAN;
} }
else if ( d->mantissah == 0 && d->mantissal != 0 ) { else if (d->mantissah == 0 && d->mantissal != 0) {
return FP_SNAN; return FP_SNAN;
} }
} }
return 0; return 0;
} }

View file

@ -1,6 +1,7 @@
#include <crtdll/float.h> #include <msvcrt/float.h>
void _fpreset (void)
void _fpreset(void)
{ {
/* FIXME: This causes an exception */ /* FIXME: This causes an exception */
// __asm__ __volatile__("fninit\n\t"); // __asm__ __volatile__("fninit\n\t");

View file

@ -16,43 +16,40 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave, not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */ Cambridge, MA 02139, USA. */
#include <crtdll/math.h> #include <msvcrt/math.h>
#include <crtdll/float.h> #include <msvcrt/float.h>
#include <crtdll/internal/ieee.h> #include <msvcrt/internal/ieee.h>
int _isnan(double __x) int _isnan(double __x)
{ {
double_t * x = (double_t *)&__x; double_t* x = (double_t*)&__x;
return ( x->exponent == 0x7ff && ( x->mantissah != 0 || x->mantissal != 0 )); return (x->exponent == 0x7ff && (x->mantissah != 0 || x->mantissal != 0));
} }
int _isnanl(long double __x) int _isnanl(long double __x)
{ {
/* Intel's extended format has the normally implicit 1 explicit /* Intel's extended format has the normally implicit 1 explicit
present. Sigh! */ present. Sigh! */
long_double_t * x = (long_double_t *)&__x; long_double_t* x = (long_double_t*)&__x;
/* IEEE 854 NaN's have the maximum possible /* IEEE 854 NaN's have the maximum possible
exponent and a nonzero mantissa. */ exponent and a nonzero mantissa. */
return (( x->exponent == 0x7fff) return (( x->exponent == 0x7fff)
&& ( (x->mantissah & 0x80000000) != 0) && ((x->mantissah & 0x80000000) != 0)
&& ( (x->mantissah & (unsigned int)0x7fffffff) != 0 || x->mantissal != 0 )); && ((x->mantissah & (unsigned int)0x7fffffff) != 0 || x->mantissal != 0));
} }
int _isinf(double __x) int _isinf(double __x)
{ {
double_t * x = (double_t *)&__x; double_t* x = (double_t*)&__x;
return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 )); return (x->exponent == 0x7ff && (x->mantissah == 0 && x->mantissal == 0));
} }
int _finite(double x)
int _finite( double x )
{ {
return !_isinf(x); return !_isinf(x);
} }
@ -62,16 +59,14 @@ int _isinfl(long double __x)
/* Intel's extended format has the normally implicit 1 explicit /* Intel's extended format has the normally implicit 1 explicit
present. Sigh! */ present. Sigh! */
long_double_t * x = (long_double_t *)&__x; long_double_t* x = (long_double_t*)&__x;
/* An IEEE 854 infinity has an exponent with the /* An IEEE 854 infinity has an exponent with the
maximum possible value and a zero mantissa. */ maximum possible value and a zero mantissa. */
if ( x->exponent == 0x7fff && ( (x->mantissah == 0x80000000 ) && x->mantissal == 0 )) if (x->exponent == 0x7fff && ((x->mantissah == 0x80000000) && x->mantissal == 0))
return x->sign ? -1 : 1; return x->sign ? -1 : 1;
return 0; return 0;
} }

View file

@ -1,11 +1,12 @@
#include <crtdll/float.h> #include <msvcrt/float.h>
double _nextafter( double x, double y )
double _nextafter(double x, double y)
{ {
if ( x == y) if (x == y)
return x; return x;
if ( isnan(x) || isnan(y) ) if (isnan(x) || isnan(y))
return x; return x;
return x; return x;

View file

@ -1,10 +1,11 @@
#include <windows.h> #include <windows.h>
#include <crtdll/io.h> #include <msvcrt/io.h>
int _locking( int _fd, int mode, long nbytes )
int _locking(int _fd, int mode, long nbytes)
{ {
long offset = _lseek(_fd, 0L, 1); long offset = _lseek(_fd, 0L, 1);
if ( !LockFile(_get_osfhandle(_fd),offset,0,nbytes,0) ) if (!LockFile(_get_osfhandle(_fd),offset,0,nbytes,0))
return -1; return -1;
return 0; return 0;