properly.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.29 2000/01/10 05:23:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.30 2000/01/10 15:41:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* fix me when we figure out what we want to do about ANSIfication...
*/
+#include <ctype.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
{
if (sscanf(intString, "%hd", &result[slot]) != 1)
break;
- do
+ while (*intString && isspace(*intString))
+ intString++;
+ while (*intString && !isspace(*intString))
intString++;
- while (*intString && *intString != ' ')
}
+ while (*intString && isspace(*intString))
+ intString++;
+ if (*intString)
+ elog(ERROR,"int28 value has too many values");
while (slot < INDEX_MAX_KEYS)
result[slot++] = 0;
* int28out - converts internal form to "num num ..."
*/
char *
-int28out(int16 *shs)
+int28out(int16 *int2Array)
{
- int num;
- int16 *sp;
+ int num, maxnum;
char *rp;
char *result;
- if (shs == NULL)
+ if (int2Array == NULL)
{
result = (char *) palloc(2);
result[0] = '-';
result[1] = '\0';
return result;
}
- rp = result = (char *) palloc(INDEX_MAX_KEYS * 7);
- /* assumes sign, 5 digits, ' ' */
- sp = shs;
- for (num = INDEX_MAX_KEYS; num != 0; num--)
+
+ /* find last non-zero value in vector */
+ for (maxnum = INDEX_MAX_KEYS-1; maxnum >= 0; maxnum--)
+ if (int2Array[maxnum] != 0)
+ break;
+
+ /* assumes sign, 5 digits, ' ' */
+ rp = result = (char *) palloc(maxnum * 7 + 1);
+ for (num = 0; num <= maxnum; num++)
{
- itoa(*sp++, rp);
+ if (num != 0)
+ *rp++ = ' ';
+ ltoa(int2Array[num], rp);
while (*++rp != '\0')
;
- *rp++ = ' ';
}
- *--rp = '\0';
+ *rp = '\0';
return result;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.30 2000/01/10 05:23:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.31 2000/01/10 15:41:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
+#include <ctype.h>
#include "postgres.h"
#include "utils/builtins.h"
{
if (sscanf(oidString, "%u", &result[slot]) != 1)
break;
- do
+ while (*oidString && isspace(*oidString))
+ oidString++;
+ while (*oidString && !isspace(*oidString))
oidString++;
- while (*oidString && *oidString != ' ')
}
+ while (*oidString && isspace(*oidString))
+ oidString++;
+ if (*oidString)
+ elog(ERROR,"oid8 value has too many values");
while (slot < INDEX_MAX_KEYS)
result[slot++] = 0;
char *
oid8out(Oid *oidArray)
{
- int num;
- Oid *sp;
+ int num, maxnum;
char *rp;
char *result;
return result;
}
+ /* find last non-zero value in vector */
+ for (maxnum = INDEX_MAX_KEYS-1; maxnum >= 0; maxnum--)
+ if (oidArray[maxnum] != 0)
+ break;
+
/* assumes sign, 10 digits, ' ' */
- rp = result = (char *) palloc(INDEX_MAX_KEYS * 12);
- sp = oidArray;
- for (num = INDEX_MAX_KEYS; num != 0; num--)
+ rp = result = (char *) palloc(maxnum * 12 + 1);
+ for (num = 0; num <= maxnum; num++)
{
- ltoa(*sp++, rp);
+ if (num != 0)
+ *rp++ = ' ';
+ ltoa(oidArray[num], rp);
while (*++rp != '\0')
;
- *rp++ = ' ';
}
- *--rp = '\0';
+ *rp = '\0';
return result;
}
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.54 1999/12/16 06:53:10 meskes Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.55 2000/01/10 15:41:27 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= ecpg
SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= 0.9
+SO_MINOR_VERSION= 1.0
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
include $(SRCDIR)/Makefile.global
MAJOR_VERSION=2
-MINOR_VERSION=6
+MINOR_VERSION=7
PATCHLEVEL=14
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
# Makefile for pgeasy library
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.4 1999/12/16 01:25:16 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.5 2000/01/10 15:41:28 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pgeasy
SO_MAJOR_VERSION= 2
-SO_MINOR_VERSION= 0
+SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.37 1999/12/16 01:25:17 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.38 2000/01/10 15:41:29 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pgtcl
SO_MAJOR_VERSION= 2
-SO_MINOR_VERSION= 0
+SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.19 1999/12/16 01:25:20 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.20 2000/01/10 15:41:31 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pq++
SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= 0
+SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.50 1999/12/16 01:25:19 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.51 2000/01/10 15:41:30 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pq
SO_MAJOR_VERSION= 2
-SO_MINOR_VERSION= 0
+SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
-VERSION = 0.25
+VERSION = 0.26
EXTVER = .0
SO_MAJOR_VERSION = 0
-SO_MINOR_VERSION = 25
+SO_MINOR_VERSION = 26
psql help in psqlHelp.c
man pages
sgml docs
+update VERSION numbers of interfaces