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
int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst)
int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst)
void PGTYPESdecimal_free(decimal *var)
int PGTYPESnumeric_mul(numeric *var1, numeric *var2, numeric *result)
int PGTYPESnumeric_to_long(numeric *nv, long *lp)
int PGTYPESnumeric_to_double(numeric *nv, double *dp)
int PGTYPESnumeric_from_long(signed long int long_val, numeric *var)
int PGTYPESnumeric_to_int(numeric *nv, int *ip)
char * PGTYPESnumeric_to_asc(numeric *num, int dscale)
numeric * PGTYPESnumeric_new(void)
int PGTYPESnumeric_from_int(signed int int_val, numeric *var)
int PGTYPESnumeric_sub(numeric *var1, numeric *var2, numeric *result)
decimal * PGTYPESdecimal_new(void)
numeric * PGTYPESnumeric_from_asc(char *str, char **endptr)
void PGTYPESnumeric_free(numeric *var)
int PGTYPESnumeric_cmp(numeric *var1, numeric *var2)
int PGTYPESnumeric_div(numeric *var1, numeric *var2, numeric *result)
int PGTYPESnumeric_add(numeric *var1, numeric *var2, numeric *result)
static void check_errno(void)
static void print_double(double x)
static void convert(const int32 val, char *const buf)