mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:53:02 +00:00
This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes
svn path=/branches/shell32_new-bringup/; revision=51893
This commit is contained in:
parent
4596e5e59b
commit
4019caae75
23116 changed files with 0 additions and 1109022 deletions
52
lib/sdk/crt/startup/merr.c
Normal file
52
lib/sdk/crt/startup/merr.c
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#include <internal.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int __defaultmatherr = 0;
|
||||
|
||||
int __CRTDECL
|
||||
_matherr (struct _exception *pexcept)
|
||||
{
|
||||
const char * type;
|
||||
|
||||
switch(pexcept->type)
|
||||
{
|
||||
case _DOMAIN:
|
||||
type = "Argument domain error (DOMAIN)";
|
||||
break;
|
||||
|
||||
case _SING:
|
||||
type = "Argument singularity (SIGN)";
|
||||
break;
|
||||
|
||||
case _OVERFLOW:
|
||||
type = "Overflow range error (OVERFLOW)";
|
||||
break;
|
||||
|
||||
case _PLOSS:
|
||||
type = "Partial loss of significance (PLOSS)";
|
||||
break;
|
||||
|
||||
case _TLOSS:
|
||||
type = "Total loss of significance (TLOSS)";
|
||||
break;
|
||||
|
||||
case _UNDERFLOW:
|
||||
type = "The result is too small to be represented (UNDERFLOW)";
|
||||
break;
|
||||
|
||||
default:
|
||||
type = "Unknown error";
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "_matherr(): %s in %s(%g, %g) (retval=%g)\n",
|
||||
type, pexcept->name, pexcept->arg1, pexcept->arg2, pexcept->retval);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue