7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
9 #line 1 "num_test2.pgc"
17 #line 1 "regression.h"
24 #line 7 "num_test2.pgc"
28 #line 1 "printf_hack.h"
59 #line 9 "num_test2.pgc"
63 char*
nums[] = {
"2E394",
"-2",
".794",
"3.44",
"592.49E21",
"-32.84e4",
64 "2E-394",
".1E-2",
"+.0",
"-592.49E-07",
"+32.84e-4",
65 ".500001",
"-.5000001",
66 "1234567890123456789012345678.91",
68 "1234567890123456789012345678.921",
85 int i,
j, k, q, r, count = 0;
97 printf(
"endptr of %d is not NULL\n",
i);
99 printf(
"*endptr of %d is not \\0\n",
i);
104 numarr[count++] = num;
126 printf(
"num[%d,6]: %ld (r: %d)\n",
i, r?0L:l, r);
133 printf(
"num[%d,7]: %s (r: %d - cmp: %d)\n",
i,
text, r, q);
139 printf(
"num[%d,8]: %d (r: %d)\n",
i, r?0:k, r);
146 printf(
"num[%d,9]: %s (r: %d - cmp: %d)\n",
i,
text, r, q);
172 printf(
"num[%d,11]: - (r: %d)\n",
i, r);
179 printf(
"num[%d,12]: %s (r: %d - cmp: %d)\n",
i,
text, r, q);
188 for (
i = 0;
i < count;
i++)
190 for (
j = 0;
j < count;
j++)
252 for (
i = 0;
i < count;
i++)
270 printf(
"(no errno set) - ");
273 printf(
"(errno == PGTYPES_NUM_OVERFLOW) - ");
276 printf(
"(errno == PGTYPES_NUM_UNDERFLOW) - ");
279 printf(
"(errno == PGTYPES_NUM_BAD_NUMERIC) - ");
282 printf(
"(errno == PGTYPES_NUM_DIVIDE_ZERO) - ");
285 printf(
"(unknown errno (%d))\n", errno);
void PGTYPESchar_free(char *ptr)
#define PGTYPES_NUM_BAD_NUMERIC
#define PGTYPES_NUM_OVERFLOW
#define PGTYPES_NUM_UNDERFLOW
#define PGTYPES_NUM_DIVIDE_ZERO
void PGTYPESdecimal_free(decimal *)
int PGTYPESnumeric_to_double(numeric *, double *)
int PGTYPESnumeric_to_long(numeric *, long *)
int PGTYPESnumeric_from_int(signed int, numeric *)
int PGTYPESnumeric_mul(numeric *, numeric *, numeric *)
int PGTYPESnumeric_from_decimal(decimal *, numeric *)
int PGTYPESnumeric_sub(numeric *, numeric *, numeric *)
int PGTYPESnumeric_to_int(numeric *, int *)
char * PGTYPESnumeric_to_asc(numeric *, int)
numeric * PGTYPESnumeric_new(void)
int PGTYPESnumeric_div(numeric *, numeric *, numeric *)
int PGTYPESnumeric_add(numeric *, numeric *, numeric *)
int PGTYPESnumeric_cmp(numeric *, numeric *)
int PGTYPESnumeric_to_decimal(numeric *, decimal *)
int PGTYPESnumeric_from_long(signed long int, numeric *)
decimal * PGTYPESdecimal_new(void)
void PGTYPESnumeric_free(numeric *)
numeric * PGTYPESnumeric_from_asc(char *, char **)
static void check_errno(void)
static void print_double(double x)
static void convert(const int32 val, char *const buf)