1313char * ECPGalloc (long ,int );
1414
1515static int
16- deccall2 (Decimal * arg1 ,Decimal * arg2 ,int (* ptr ) (Numeric * ,Numeric * ))
16+ deccall2 (decimal * arg1 ,decimal * arg2 ,int (* ptr ) (numeric * ,numeric * ))
1717{
18- Numeric * a1 ,
18+ numeric * a1 ,
1919* a2 ;
2020int i ;
2121
@@ -51,9 +51,9 @@ deccall2(Decimal * arg1, Decimal * arg2, int (*ptr) (Numeric *, Numeric *))
5151}
5252
5353static int
54- deccall3 (Decimal * arg1 ,Decimal * arg2 ,Decimal * result ,int (* ptr ) (Numeric * ,Numeric * ,Numeric * ))
54+ deccall3 (decimal * arg1 ,decimal * arg2 ,decimal * result ,int (* ptr ) (numeric * ,numeric * ,numeric * ))
5555{
56- Numeric * a1 ,
56+ numeric * a1 ,
5757* a2 ,
5858* nres ;
5959int i ;
@@ -110,7 +110,7 @@ deccall3(Decimal * arg1, Decimal * arg2, Decimal * result, int (*ptr) (Numeric *
110110
111111/* we start with the numeric functions */
112112int
113- decadd (Decimal * arg1 ,Decimal * arg2 ,Decimal * sum )
113+ decadd (decimal * arg1 ,decimal * arg2 ,decimal * sum )
114114{
115115deccall3 (arg1 ,arg2 ,sum ,PGTYPESnumeric_add );
116116
@@ -123,15 +123,15 @@ decadd(Decimal * arg1, Decimal * arg2, Decimal * sum)
123123}
124124
125125int
126- deccmp (Decimal * arg1 ,Decimal * arg2 )
126+ deccmp (decimal * arg1 ,decimal * arg2 )
127127{
128128return (deccall2 (arg1 ,arg2 ,PGTYPESnumeric_cmp ));
129129}
130130
131131void
132- deccopy (Decimal * src ,Decimal * target )
132+ deccopy (decimal * src ,decimal * target )
133133{
134- memcpy (target ,src ,sizeof (Decimal ));
134+ memcpy (target ,src ,sizeof (decimal ));
135135}
136136
137137static char *
@@ -154,12 +154,12 @@ strndup(const char *str, size_t len)
154154}
155155
156156int
157- deccvasc (char * cp ,int len ,Decimal * np )
157+ deccvasc (char * cp ,int len ,decimal * np )
158158{
159- char * str = strndup (cp ,len );/*Decimal_in always converts the
159+ char * str = strndup (cp ,len );/*decimal_in always converts the
160160 * complete string */
161161int ret = 0 ;
162- Numeric * result ;
162+ numeric * result ;
163163
164164if (risnull (CSTRINGTYPE ,cp ))
165165{
@@ -201,9 +201,9 @@ deccvasc(char *cp, int len, Decimal * np)
201201}
202202
203203int
204- deccvdbl (double dbl ,Decimal * np )
204+ deccvdbl (double dbl ,decimal * np )
205205{
206- Numeric * nres = PGTYPESnumeric_new ();
206+ numeric * nres = PGTYPESnumeric_new ();
207207int result = 1 ;
208208
209209if (risnull (CDOUBLETYPE , (char * )& dbl ))
@@ -224,9 +224,9 @@ deccvdbl(double dbl, Decimal * np)
224224}
225225
226226int
227- deccvint (int in ,Decimal * np )
227+ deccvint (int in ,decimal * np )
228228{
229- Numeric * nres = PGTYPESnumeric_new ();
229+ numeric * nres = PGTYPESnumeric_new ();
230230int result = 1 ;
231231
232232if (risnull (CINTTYPE , (char * )& in ))
@@ -247,9 +247,9 @@ deccvint(int in, Decimal * np)
247247}
248248
249249int
250- deccvlong (long lng ,Decimal * np )
250+ deccvlong (long lng ,decimal * np )
251251{
252- Numeric * nres = PGTYPESnumeric_new ();
252+ numeric * nres = PGTYPESnumeric_new ();
253253int result = 1 ;
254254
255255if (risnull (CLONGTYPE , (char * )& lng ))
@@ -270,7 +270,7 @@ deccvlong(long lng, Decimal * np)
270270}
271271
272272int
273- decdiv (Decimal * n1 ,Decimal * n2 ,Decimal * n3 )
273+ decdiv (decimal * n1 ,decimal * n2 ,decimal * n3 )
274274{
275275int i = deccall3 (n1 ,n2 ,n3 ,PGTYPESnumeric_div );
276276
@@ -292,7 +292,7 @@ decdiv(Decimal * n1, Decimal * n2, Decimal * n3)
292292}
293293
294294int
295- decmul (Decimal * n1 ,Decimal * n2 ,Decimal * n3 )
295+ decmul (decimal * n1 ,decimal * n2 ,decimal * n3 )
296296{
297297int i = deccall3 (n1 ,n2 ,n3 ,PGTYPESnumeric_mul );
298298
@@ -311,7 +311,7 @@ decmul(Decimal * n1, Decimal * n2, Decimal * n3)
311311}
312312
313313int
314- decsub (Decimal * n1 ,Decimal * n2 ,Decimal * n3 )
314+ decsub (decimal * n1 ,decimal * n2 ,decimal * n3 )
315315{
316316int i = deccall3 (n1 ,n2 ,n3 ,PGTYPESnumeric_sub );
317317
@@ -330,10 +330,10 @@ decsub(Decimal * n1, Decimal * n2, Decimal * n3)
330330}
331331
332332int
333- dectoasc (Decimal * np ,char * cp ,int len ,int right )
333+ dectoasc (decimal * np ,char * cp ,int len ,int right )
334334{
335335char * str ;
336- Numeric * nres = PGTYPESnumeric_new ();
336+ numeric * nres = PGTYPESnumeric_new ();
337337
338338if (nres == NULL )
339339return -1211 ;
@@ -367,9 +367,9 @@ dectoasc(Decimal * np, char *cp, int len, int right)
367367}
368368
369369int
370- dectodbl (Decimal * np ,double * dblp )
370+ dectodbl (decimal * np ,double * dblp )
371371{
372- Numeric * nres = PGTYPESnumeric_new ();
372+ numeric * nres = PGTYPESnumeric_new ();
373373int i ;
374374
375375if (nres == NULL )
@@ -385,10 +385,10 @@ dectodbl(Decimal * np, double *dblp)
385385}
386386
387387int
388- dectoint (Decimal * np ,int * ip )
388+ dectoint (decimal * np ,int * ip )
389389{
390390int ret ;
391- Numeric * nres = PGTYPESnumeric_new ();
391+ numeric * nres = PGTYPESnumeric_new ();
392392
393393if (nres == NULL )
394394return -1211 ;
@@ -405,10 +405,10 @@ dectoint(Decimal * np, int *ip)
405405}
406406
407407int
408- dectolong (Decimal * np ,long * lngp )
408+ dectolong (decimal * np ,long * lngp )
409409{
410410int ret ;
411- Numeric * nres = PGTYPESnumeric_new ();;
411+ numeric * nres = PGTYPESnumeric_new ();;
412412
413413if (nres == NULL )
414414return -1211 ;
@@ -529,15 +529,15 @@ rdayofweek(Date d)
529529/* And the datetime stuff */
530530
531531void
532- dtcurrent (Timestamp * ts )
532+ dtcurrent (timestamp * ts )
533533{
534534PGTYPEStimestamp_current (ts );
535535}
536536
537537int
538- dtcvasc (char * str ,Timestamp * ts )
538+ dtcvasc (char * str ,timestamp * ts )
539539{
540- Timestamp ts_tmp ;
540+ timestamp ts_tmp ;
541541int i ;
542542char * * endptr = & str ;
543543
@@ -558,13 +558,13 @@ dtcvasc(char *str, Timestamp *ts)
558558}
559559
560560int
561- dtsub (Timestamp * ts1 ,Timestamp * ts2 ,Interval * iv )
561+ dtsub (timestamp * ts1 ,timestamp * ts2 ,interval * iv )
562562{
563563return PGTYPEStimestamp_sub (ts1 ,ts2 ,iv );
564564}
565565
566566int
567- dttoasc (Timestamp * ts ,char * output )
567+ dttoasc (timestamp * ts ,char * output )
568568{
569569char * asctime = PGTYPEStimestamp_to_asc (* ts );
570570
@@ -574,13 +574,13 @@ dttoasc(Timestamp *ts, char *output)
574574}
575575
576576int
577- dttofmtasc (Timestamp * ts ,char * output ,int str_len ,char * fmtstr )
577+ dttofmtasc (timestamp * ts ,char * output ,int str_len ,char * fmtstr )
578578{
579579return PGTYPEStimestamp_fmt_asc (ts ,output ,str_len ,fmtstr );
580580}
581581
582582int
583- intoasc (Interval * i ,char * str )
583+ intoasc (interval * i ,char * str )
584584{
585585str = PGTYPESinterval_to_asc (i );
586586