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:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-12-04 06:43:30 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2018-01-17 20:47:26 +0300
commit9087163804df8af6dc2ec1f675a2341c25f7795f (patch)
tree86fcb38236347d0e97a16c957e41dca597b8e8a8 /newlib/libm/test
parent44276afe2a0365d655425702205604640829668d (diff)
ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libm/test')
-rw-r--r--newlib/libm/test/convert.c12
-rw-r--r--newlib/libm/test/dcvt.c33
-rw-r--r--newlib/libm/test/math.c33
-rw-r--r--newlib/libm/test/string.c6
-rw-r--r--newlib/libm/test/test.c27
-rw-r--r--newlib/libm/test/test_ieee.c3
-rw-r--r--newlib/libm/test/test_is.c43
7 files changed, 60 insertions, 97 deletions
diff --git a/newlib/libm/test/convert.c b/newlib/libm/test/convert.c
index 24188fa8b..fe5bc0aa4 100644
--- a/newlib/libm/test/convert.c
+++ b/newlib/libm/test/convert.c
@@ -49,8 +49,7 @@ test_atoff (void)
static
void
-_DEFUN(iterate,(func, name),
- void _EXFUN((*func),(void)),
+iterate (void _EXFUN((*func),(void)),
char *name)
{
@@ -70,8 +69,7 @@ int_type *p = ints;
static void
-_DEFUN(int_iterate,(func, name),
- void (*func)(),
+int_iterate (void (*func)(),
char *name)
{
newfunc(name);
@@ -86,8 +84,7 @@ _DEFUN(int_iterate,(func, name),
}
void
-_DEFUN(test_strtol_base,(base, pi, string),
- int base,
+test_strtol_base (int base,
int_scan_type *pi,
char *string)
{
@@ -206,8 +203,7 @@ test_fcvt (void)
static void
-_DEFUN(diterate,(func, name),
- void (*func)(),
+diterate (void (*func)(),
char *name)
{
newfunc(name);
diff --git a/newlib/libm/test/dcvt.c b/newlib/libm/test/dcvt.c
index 922652e9f..56d5c2b6b 100644
--- a/newlib/libm/test/dcvt.c
+++ b/newlib/libm/test/dcvt.c
@@ -28,8 +28,7 @@ static struct p {
#define _MAX_PREC 16
static char
-_DEFUN(nextdigit,(value),
-double *value)
+nextdigit (double *value)
{
double tmp;
@@ -39,8 +38,7 @@ double *value)
static char *
-_DEFUN(print_nan,(buffer, value, precision),
- char *buffer,
+print_nan (char *buffer,
double value,
int precision)
{
@@ -100,8 +98,7 @@ typedef struct
void
-_DEFUN(renormalize,(in),
- cvt_info_type *in)
+renormalize (cvt_info_type *in)
{
/* Make sure all numbers are less than 1 */
@@ -133,8 +130,7 @@ _DEFUN(renormalize,(in),
*/
static void
-_DEFUN(normalize,(value, in),
- double value,
+normalize (double value,
cvt_info_type *in)
{
int j;
@@ -195,8 +191,7 @@ _DEFUN(normalize,(value, in),
}
int
-_DEFUN(round,(in, start, now, ch),
- cvt_info_type *in,
+round (cvt_info_type *in,
char *start,
char *now,
char ch)
@@ -272,8 +267,7 @@ _DEFUN(round,(in, start, now, ch),
void
-_DEFUN(_cvte,(in),
- register cvt_info_type *in)
+_cvte (register cvt_info_type *in)
{
int buffer_idx =0;
int digit = 0;
@@ -341,8 +335,7 @@ _DEFUN(_cvte,(in),
/* Produce NNNN.FFFF */
void
-_DEFUN(_cvtf,(in),
- cvt_info_type *in)
+_cvtf (cvt_info_type *in)
{
int buffer_idx = 0; /* Current char being output */
@@ -434,8 +427,7 @@ _DEFUN(_cvtf,(in),
char *
-_DEFUN(_dcvt,(buffer, invalue, precision, width, type, dot),
- char *buffer,
+_dcvt (char *buffer,
double invalue,
int precision,
int width,
@@ -533,8 +525,7 @@ _DEFUN(_dcvt,(buffer, invalue, precision, width, type, dot),
char *
-_DEFUN(fcvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf),
- double invalue,
+fcvtbuf (double invalue,
int ndigit,
int *decpt,
int *sign,
@@ -563,8 +554,7 @@ _DEFUN(fcvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf),
char *
-_DEFUN(ecvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf),
- double invalue,
+ecvtbuf (double invalue,
int ndigit,
int *decpt,
int *sign,
@@ -596,8 +586,7 @@ _DEFUN(ecvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf),
char *
-_DEFUN(gcvt,(d,ndigit,buf),
- double d,
+gcvt (double d,
int ndigit,
char *buf)
{
diff --git a/newlib/libm/test/math.c b/newlib/libm/test/math.c
index f58f64f79..dda587a33 100644
--- a/newlib/libm/test/math.c
+++ b/newlib/libm/test/math.c
@@ -35,8 +35,7 @@ int verbose;
/* To test exceptions - we trap them all and return a known value */
int
-_DEFUN(matherr,(e),
- struct exception *e)
+matherr (struct exception *e)
{
if (traperror)
{
@@ -50,8 +49,7 @@ _DEFUN(matherr,(e),
}
-void _DEFUN(translate_to,(file,r),
- FILE *file,
+void translate_to (FILE *file,
double r)
{
__ieee_double_shape_type bits;
@@ -60,8 +58,7 @@ void _DEFUN(translate_to,(file,r),
}
int
-_DEFUN(ffcheck,( is, p, name, serrno, merror),
- double is,
+ffcheck (double is,
one_line_type *p,
char *name,
int serrno,
@@ -108,8 +105,7 @@ _DEFUN(ffcheck,( is, p, name, serrno, merror),
}
double
-_DEFUN(thedouble, (msw, lsw),
- long msw,
+thedouble (long msw,
long lsw)
{
__ieee_double_shape_type x;
@@ -123,8 +119,7 @@ int calc;
int reduce;
-_DEFUN(frontline,(f, mag, p, result, merror, errno, args, name),
- FILE *f,
+frontline (FILE *f,
int mag,
one_line_type *p,
double result,
@@ -176,8 +171,7 @@ _DEFUN(frontline,(f, mag, p, result, merror, errno, args, name),
fprintf(f, ")*/\n");
}
-_DEFUN(finish,(f, vector, result , p, args, name),
- FILE *f,
+finish (FILE *f,
int vector,
double result,
one_line_type *p,
@@ -194,8 +188,7 @@ _DEFUN(finish,(f, vector, result , p, args, name),
}
int redo;
-_DEFUN(run_vector_1,(vector, p, func, name, args),
- int vector,
+run_vector_1 (int vector,
one_line_type *p,
char *func,
char *name,
@@ -429,12 +422,12 @@ test_math (void)
*/
#if 0
-float _DEFUN(cosf,(a), float a) { return cos((double)a); }
-float _DEFUN(sinf,(a), float a) { return sin((double)a); }
-float _DEFUN(log1pf,(a), float a) { return log1p((double)a); }
-float _DEFUN(tanf,(a), float a) { return tan((double)a); }
-float _DEFUN(ceilf,(a), float a) { return ceil(a); }
-float _DEFUN(floorf,(a), float a) { return floor(a); }
+float cosf (float a) { return cos((double)a); }
+float sinf (float a) { return sin((double)a); }
+float log1pf (float a) { return log1p((double)a); }
+float tanf (float a) { return tan((double)a); }
+float ceilf (float a) { return ceil(a); }
+float floorf (float a) { return floor(a); }
#endif
/*ndef HAVE_FLOAT*/
diff --git a/newlib/libm/test/string.c b/newlib/libm/test/string.c
index e66117fb6..a8cc1a16f 100644
--- a/newlib/libm/test/string.c
+++ b/newlib/libm/test/string.c
@@ -10,8 +10,7 @@ int errors = 0;
#define check(thing) checkit(thing, __LINE__)
void
-_DEFUN(checkit,(ok,l),
- int ok,
+checkit (int ok,
int l )
{
@@ -31,8 +30,7 @@ _DEFUN(checkit,(ok,l),
#define equal(a, b) funcqual(a,b,__LINE__);
void
-_DEFUN(funcqual,(a,b,l),
- char *a,
+funcqual (char *a,
char *b,
int l)
{
diff --git a/newlib/libm/test/test.c b/newlib/libm/test/test.c
index 365c4c843..7769e2b36 100644
--- a/newlib/libm/test/test.c
+++ b/newlib/libm/test/test.c
@@ -9,8 +9,7 @@ int inacc;
int
-_DEFUN(main,(ac, av),
- int ac,
+main (int ac,
char **av)
{
int i;
@@ -57,8 +56,7 @@ bt();
static const char *iname = "foo";
void
-_DEFUN(newfunc,(string),
- const char *string)
+newfunc (const char *string)
{
if (strcmp(iname, string))
{
@@ -92,8 +90,7 @@ int reduce = 0;
int strtod_vector = 0;
int
-_DEFUN(bigger,(a,b),
- __ieee_double_shape_type *a,
+bigger (__ieee_double_shape_type *a,
__ieee_double_shape_type *b)
{
@@ -116,8 +113,7 @@ _DEFUN(bigger,(a,b),
/* Return the first bit different between two double numbers */
int
-_DEFUN(mag_of_error,(is, shouldbe),
- double is,
+mag_of_error (double is,
double shouldbe)
{
__ieee_double_shape_type a,b;
@@ -183,8 +179,7 @@ _DEFUN(mag_of_error,(is, shouldbe),
void
-_DEFUN(test_sok,(is, shouldbe),
- char *is,
+test_sok (char *is,
char *shouldbe)
{
if (strcmp(is,shouldbe))
@@ -197,8 +192,7 @@ _DEFUN(test_sok,(is, shouldbe),
}
}
void
-_DEFUN(test_iok,(is, shouldbe),
- int is,
+test_iok (int is,
int shouldbe)
{
if (is != shouldbe){
@@ -215,8 +209,7 @@ _DEFUN(test_iok,(is, shouldbe),
prec float conversions against double results
*/
void
-_DEFUN(test_scok,(is, shouldbe, count),
- char *is,
+test_scok (char *is,
char *shouldbe,
int count)
{
@@ -231,8 +224,7 @@ _DEFUN(test_scok,(is, shouldbe, count),
}
void
-_DEFUN(test_eok,(is, shouldbe),
- int is,
+test_eok (int is,
int shouldbe)
{
if (is != shouldbe){
@@ -245,8 +237,7 @@ _DEFUN(test_eok,(is, shouldbe),
}
void
-_DEFUN(test_mok,(value, shouldbe, okmag),
- double value,
+test_mok (double value,
double shouldbe,
int okmag)
{
diff --git a/newlib/libm/test/test_ieee.c b/newlib/libm/test/test_ieee.c
index 167a40c87..f23ceba6d 100644
--- a/newlib/libm/test/test_ieee.c
+++ b/newlib/libm/test/test_ieee.c
@@ -82,8 +82,7 @@ test_getroundtoi (void)
}
double
- _DEFUN(dnumber,(msw, lsw),
- int msw,
+ dnumber (int msw,
int lsw)
{
diff --git a/newlib/libm/test/test_is.c b/newlib/libm/test/test_is.c
index c4c8e2fdb..ac8f79c49 100644
--- a/newlib/libm/test/test_is.c
+++ b/newlib/libm/test/test_is.c
@@ -18,8 +18,7 @@ int mygraph;
int mypunct;
void
-_DEFUN(test_is_single,(i),
- int i)
+test_is_single (int i)
{
setascii = 0;
setlower = 0;
@@ -1913,28 +1912,27 @@ _DEFUN(test_is_single,(i),
}
-int _DEFUN(def_isascii,(i), int i) { return isascii(i); }
-int _DEFUN(def_iscntrl,(i), int i) { return iscntrl(i); }
-int _DEFUN(def_isspace,(i), int i) { return isspace(i); }
-int _DEFUN(def_isprint,(i), int i) { return isprint(i); }
-int _DEFUN(def_isalnum,(i), int i) { return isalnum(i); }
-int _DEFUN(def_isdigit,(i), int i) { return isdigit(i); }
-int _DEFUN(def_isxdigit,(i), int i) { return isxdigit(i); }
-int _DEFUN(def_isalpha,(i), int i) { return isalpha(i); }
-int _DEFUN(def_isupper,(i), int i) { return isupper(i); }
-int _DEFUN(def_islower,(i), int i) { return islower(i); }
-int _DEFUN(def_isgraph,(i), int i) { return isgraph(i); }
-int _DEFUN(def_ispunct,(i), int i) { return ispunct(i); }
-int _DEFUN(def_tolower,(i), int i) { return tolower(i); }
-int _DEFUN(def_toupper,(i), int i) { return toupper(i); }
-int _DEFUN(def_toascii,(i), int i) { return toascii(i); }
-int _DEFUN(def__tolower,(i), int i) { return _tolower(i); }
-int _DEFUN(def__toupper,(i), int i) { return _toupper(i); }
+int def_isascii (int i) { return isascii(i); }
+int def_iscntrl (int i) { return iscntrl(i); }
+int def_isspace (int i) { return isspace(i); }
+int def_isprint (int i) { return isprint(i); }
+int def_isalnum (int i) { return isalnum(i); }
+int def_isdigit (int i) { return isdigit(i); }
+int def_isxdigit (int i) { return isxdigit(i); }
+int def_isalpha (int i) { return isalpha(i); }
+int def_isupper (int i) { return isupper(i); }
+int def_islower (int i) { return islower(i); }
+int def_isgraph (int i) { return isgraph(i); }
+int def_ispunct (int i) { return ispunct(i); }
+int def_tolower (int i) { return tolower(i); }
+int def_toupper (int i) { return toupper(i); }
+int def_toascii (int i) { return toascii(i); }
+int def__tolower (int i) { return _tolower(i); }
+int def__toupper (int i) { return _toupper(i); }
extern int inacc;
void
-_DEFUN(test_is_set,(func, name, p),
- int (*func)(),
+test_is_set (int (*func)(),
char *name,
int *p)
{
@@ -1952,8 +1950,7 @@ _DEFUN(test_is_set,(func, name, p),
}
}
void
-_DEFUN(test_to_set,(func, name, p, low, high),
- int (*func)(),
+test_to_set (int (*func)(),
char *name,
int *p,
int low,