Skip to content

Commit fdaf47f

Browse files
committed
The last patch fixes some incongruences in the #define used to compile the
Tcl arrays support. Here are the correct values to be defined in config.h and pgtclCmds.c. Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1 parent 37a8bdb commit fdaf47f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/include/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ typedef unsigned char slock_t;
318318
* of postgres C-like arrays, for example {{"a1" "a2"} {"b1" "b2"}} instead
319319
* of {{"a1","a2"},{"b1","b2"}}.
320320
*/
321-
#define TCL_ARRAY
321+
#define TCL_ARRAYS
322322

323323
/*
324324
* The comparison routines for text and char data type give incorrect results

src/interfaces/libpgtcl/pgtclCmds.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.11 1997/01/11 14:28:51 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.12 1997/01/23 19:47:18 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -43,7 +43,7 @@ translate_escape(char *p, int isArray)
4343
{
4444
register char c, *q, *s;
4545

46-
#ifdef DEBUG_ESCAPE
46+
#ifdef TCL_ARRAYS_DEBUG_ESCAPE
4747
printf(" escape = '%s'\n", p);
4848
#endif
4949
/* Address of the first character after the escape sequence */
@@ -125,7 +125,7 @@ translate_escape(char *p, int isArray)
125125
*q++ = *s++;
126126
}
127127
*q = '\0';
128-
#ifdef DEBUG_ESCAPE
128+
#ifdef TCL_ARRAYS_DEBUG_ESCAPE
129129
printf(" after = '%s'\n", p);
130130
#endif
131131
return p;
@@ -143,13 +143,13 @@ static char *
143143
tcl_value (char *value)
144144
{
145145
int literal, last;
146-
register char c, *p, *q, *s;
146+
register char *p;
147147

148148
if (!value) {
149149
return ((char *) NULL);
150150
}
151151

152-
#ifdef DEBUG
152+
#ifdef TCL_ARRAYS_DEBUG
153153
printf("pq_value = '%s'\n", value);
154154
#endif
155155
last = strlen(value)-1;
@@ -202,7 +202,7 @@ tcl_value (char *value)
202202
}
203203
}
204204
}
205-
#ifdef DEBUG
205+
#ifdef TCL_ARRAYS_DEBUG
206206
printf("tcl_value = '%s'\n\n", value);
207207
#endif
208208
return (value);

0 commit comments

Comments
 (0)