From fdaf47f9f44c3dd8fe8768c471fe36e345e38000 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Thu, 23 Jan 1997 19:47:18 +0000 Subject: [PATCH] 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 --- src/include/config.h | 2 +- src/interfaces/libpgtcl/pgtclCmds.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/config.h b/src/include/config.h index 64664d127d..b70533556c 100644 --- a/src/include/config.h +++ b/src/include/config.h @@ -318,7 +318,7 @@ typedef unsigned char slock_t; * of postgres C-like arrays, for example {{"a1" "a2"} {"b1" "b2"}} instead * of {{"a1","a2"},{"b1","b2"}}. */ -#define TCL_ARRAY +#define TCL_ARRAYS /* * The comparison routines for text and char data type give incorrect results diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index 0cfc3cb3a8..1babd8890e 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.11 1997/01/11 14:28:51 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.12 1997/01/23 19:47:18 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -43,7 +43,7 @@ translate_escape(char *p, int isArray) { register char c, *q, *s; -#ifdef DEBUG_ESCAPE +#ifdef TCL_ARRAYS_DEBUG_ESCAPE printf(" escape = '%s'\n", p); #endif /* Address of the first character after the escape sequence */ @@ -125,7 +125,7 @@ translate_escape(char *p, int isArray) *q++ = *s++; } *q = '\0'; -#ifdef DEBUG_ESCAPE +#ifdef TCL_ARRAYS_DEBUG_ESCAPE printf(" after = '%s'\n", p); #endif return p; @@ -143,13 +143,13 @@ static char * tcl_value (char *value) { int literal, last; - register char c, *p, *q, *s; + register char *p; if (!value) { return ((char *) NULL); } -#ifdef DEBUG +#ifdef TCL_ARRAYS_DEBUG printf("pq_value = '%s'\n", value); #endif last = strlen(value)-1; @@ -202,7 +202,7 @@ tcl_value (char *value) } } } -#ifdef DEBUG +#ifdef TCL_ARRAYS_DEBUG printf("tcl_value = '%s'\n\n", value); #endif return (value);