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

test.h « test « libm « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f58fcc96d72536cd0c61c7e749c22dbc02c357b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#define HAVE_FLOAT 1
#define X(x) (char *)x

#include <_ansi.h>
#include <math.h>
#include <float.h>
#include <ieeefp.h>
#include <stdio.h>

void checkf();
void enter();


double translate_from();

typedef struct 
{
  long msw, lsw;
} question_struct_type;


typedef struct 
{
  char error_bit;
  char errno_val;
  char merror;
  int line;
  
  question_struct_type qs[3];
} one_line_type;


#define MVEC_START(x) one_line_type x[] =  {
#define MVEC_END    0,};


int _EXFUN(mag_of_error,(double, double));


#define ERROR_PERFECT 20
#define ERROR_FAIL -1

#define AAAA 15
#define AAA 10
#define AA  6
#define A   5
#define B   3
#define C   1 
#define VECOPEN(x,f) \
{\
  char buffer[100];\
   sprintf(buffer,"%s_vec.c",x);\
    f = fopen(buffer,"w");\
     fprintf(f,"#include \"test.h\"\n");\
      fprintf(f," one_line_type %s_vec[] = {\n", x);\
}

#define VECCLOSE(f,name,args)\
{\
  fprintf(f,"0,};\n");      \
   fprintf(f,"test_%s(m)   {run_vector_1(m,%s_vec,(char *)(%s),\"%s\",\"%s\");   }	\n",\
	   name,\
	   name,name,name,args);\
	    fclose(f);\
}



typedef struct 
{
  int line;
  
  char *string;
  double value;
  int endscan;
} double_type;


typedef struct {
  long int value;
  char end;
  char errno_val;
} int_scan_type;

typedef struct 
{
  int line;
  int_scan_type octal;
  int_scan_type decimal;
  int_scan_type hex;
  int_scan_type normal;
  int_scan_type alphabetical;
  char *string;
} int_type;


typedef struct 
{
  int line;
  double value;
  char *estring;
  int e1;
  int e2;
  int e3;
  char *fstring;
  int f1;
  int f2;
  int f3;
  char *gstring;
  int g1;
} ddouble_type;

typedef struct
{
  int line;
  double value;
  char *result;
  char *format_string;
} sprint_double_type;


typedef struct
{
  int line;
  int value;
  char *result;
  char *format_string;
} sprint_int_type;


void _EXFUN(test_ieee,(void));
void _EXFUN(test_math2,(void));
void _EXFUN(test_math,(void));
void _EXFUN(test_string,(void));
void _EXFUN(test_is,(void));
void _EXFUN(test_cvt,(void));

void _EXFUN(line,(int));

void _EXFUN(test_mok, (double, double, int));
void _EXFUN(test_iok, (int, int));
void _EXFUN(test_eok, (int, int));
void _EXFUN(test_sok, (char *, char*));
void _EXFUN(test_scok, (char *, char*, int));
void _EXFUN(newfunc,(_CONST char *));