3 #define POSTGRES_ECPG_INTERNAL
24 'S',
'Q',
'L',
'C',
'A',
' ',
' ',
' '
35 'N',
'O',
'T',
' ',
'S',
'E',
'T',
' '
41 0, 0, 0, 0, 0, 0, 0, 0
44 '0',
'0',
'0',
'0',
'0'
132 i = (*ptr) (
a1,
a2, nres);
175 memcpy(target, src,
sizeof(
decimal));
394 if ((
int) (strlen(
str) + 1) >
len)
521 mdy[0] = (short) mdy_int[0];
522 mdy[1] = (short) mdy_int[1];
523 mdy[2] = (short) mdy_int[2];
597 char **endptr = &
str;
657 memcpy(
str, tmp, strlen(tmp));
685 value.val = lng_val >= 0 ? lng_val : lng_val * (-1);
686 value.sign = lng_val >= 0 ?
'+' :
'-';
687 value.maxdigits = log10(2) * (8 *
sizeof(long) - 1);
697 while ((l - 1) <
value.val && l <= LONG_MAX / 10);
699 if (l <= LONG_MAX / 10)
713 for (
i =
value.digits,
j = 0;
i > 0;
i--,
j++)
715 value.val_string[
j] = dig / l +
'0';
732 for (
i =
len - 1;
i >= 0;
i--)
745 size_t fmt_len = strlen(
fmt);
762 temp = (
char *)
malloc(fmt_len + 1);
778 if (strchr(
fmt, (
int)
'<'))
782 if (strchr(
fmt, (
int)
'(') && strchr(
fmt, (
int)
')'))
791 k =
value.digits - 1;
792 for (
i = fmt_len - 1,
j = 0;
i >= 0;
i--,
j++)
812 if (dotpos >= 0 && dotpos <=
i)
817 tmp[0] =
value.sign ==
'-' ?
')' :
' ';
827 if (blank &&
fmt[
i] ==
',')
845 tmp[0] =
value.val_string[k];
851 tmp[0] =
value.val_string[k];
857 tmp[0] =
value.val_string[k];
860 if (
sign &&
value.sign ==
'-' && !signdone)
868 tmp[0] =
value.val_string[k];
871 if (
sign && !signdone)
879 tmp[0] =
value.val_string[k];
882 if (
sign && brackets_ok &&
value.sign ==
'-')
887 tmp[0] =
value.val_string[k];
890 if (brackets_ok &&
value.sign ==
'-')
896 if (blank && !entitydone)
904 tmp[0] =
value.val_string[k];
907 tmp[0] =
value.val_string[k];
917 temp[fmt_len] =
'\0';
920 temp_len = strlen(temp);
922 for (
i = temp_len - 1;
i >= 0;
i--)
927 outbuf[temp_len] =
'\0';
939 for (; *
str !=
'\0';
str++)
940 if (islower((
unsigned char) *
str))
941 *
str = toupper((
unsigned char) *
str);
956 memmove(
dest, src, dlen);
static const FormData_pg_attribute a1
static const FormData_pg_attribute a2
void ECPGset_var(int number, void *pointer, int lineno)
void ECPGset_noind_null(enum ECPGttype type, void *ptr)
bool ECPGis_noind_null(enum ECPGttype type, const void *ptr)
void * ECPGget_var(int number)
struct sqlca_t * ECPGget_sqlca(void)
static void const char * fmt
char * pnstrdup(const char *in, Size len)
int PGTYPESdate_dayofweek(date dDate)
void PGTYPESdate_today(date *d)
int PGTYPESdate_fmt_asc(date dDate, const char *fmtstring, char *outbuf)
int PGTYPESdate_defmt_asc(date *d, const char *fmt, const char *str)
void PGTYPESdate_julmdy(date jd, int *mdy)
void PGTYPESdate_mdyjul(int *mdy, date *jdate)
char * PGTYPESdate_to_asc(date dDate)
#define PGTYPES_DATE_ERR_ENOTDMY
#define PGTYPES_NUM_BAD_NUMERIC
#define PGTYPES_DATE_BAD_DAY
#define PGTYPES_NUM_OVERFLOW
#define PGTYPES_DATE_ERR_ENOSHORTDATE
#define PGTYPES_NUM_UNDERFLOW
#define PGTYPES_NUM_DIVIDE_ZERO
#define PGTYPES_DATE_ERR_EARGS
#define PGTYPES_DATE_BAD_MONTH
char * PGTYPESinterval_to_asc(interval *span)
int PGTYPESnumeric_from_double(double d, numeric *dst)
int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst)
int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst)
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)
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)
timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr)
int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv)
void PGTYPEStimestamp_current(timestamp *ts)
char * PGTYPEStimestamp_to_asc(timestamp tstamp)
int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, const char *fmtstr)
int PGTYPEStimestamp_defmt_asc(const char *str, const char *fmt, timestamp *d)
static void fmtchar(int value, int leftjust, int minlen, PrintfTarget *target)
static void fmtstr(const char *value, int leftjust, int minlen, int maxwidth, int pointflag, PrintfTarget *target)