aboutsummaryrefslogtreecommitdiff
path: root/contrib/string
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-06-05 19:09:48 +0000
committerBruce Momjian <bruce@momjian.us>1999-06-05 19:09:48 +0000
commit27b8143944dc0585597bdaa3ae5e5b49a4760def (patch)
treefb576673bee591564b1dedd300cd0732e341388c /contrib/string
parent977108e8d9ae68cac5ec6f2908e03bd7b46fdbc7 (diff)
downloadpostgresql-27b8143944dc0585597bdaa3ae5e5b49a4760def.tar.gz
postgresql-27b8143944dc0585597bdaa3ae5e5b49a4760def.zip
Hi,
I have updated my contrib code for version 6.5. In the attachment you will find the directories array, datetime, miscutil, string, tools and userlocks which replace the corresponding directories under contrib. In contrib/tools you will find some developement scripts which I use while hacking the sources. I hope they will be useful for some other people. I have also added a contrib/Makefile which tries to compile and install all the contribs. Unfortunately many of them don't have a Makefile or don't compile cleanly. -- Massimo Dal Zotto
Diffstat (limited to 'contrib/string')
-rw-r--r--contrib/string/Makefile9
-rw-r--r--contrib/string/string_io.c11
-rw-r--r--contrib/string/string_io.h9
-rw-r--r--contrib/string/string_io.sql.in4
4 files changed, 17 insertions, 16 deletions
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
index ea42cfa91b7..879fd2387f9 100644
--- a/contrib/string/Makefile
+++ b/contrib/string/Makefile
@@ -1,6 +1,7 @@
#-------------------------------------------------------------------------
#
# Makefile --
+#
# Makefile for string I/O module.
#
#-------------------------------------------------------------------------
@@ -19,6 +20,8 @@ CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
MODNAME = string_io
+SQLDEFS = $(MODNAME).sql
+
MODULE = $(MODNAME)$(DLSUFFIX)
MODDIR = $(LIBDIR)/modules
@@ -29,12 +32,12 @@ all: module sql
module: $(MODULE)
-sql: $(MODNAME).sql
+sql: $(SQLDEFS)
-install: $(MODULE) $(MODDIR) $(SQLDIR)
+install: $(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
cp -p $(MODULE) $(MODDIR)/
strip $(MODDIR)/$(MODULE)
- cp -p $(MODNAME).sql $(SQLDIR)/
+ cp -p $(SQLDEFS) $(SQLDIR)/
$(MODDIR):
mkdir -p $@
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index a83203887c8..f28968cbe54 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -23,7 +23,7 @@
#define ISO8859
#define MIN(x, y) ((x) < (y) ? (x) : (y))
-#define VALUE(char) ((char) - '0')
+#define VALUE(char) ((char) - '0')
#define DIGIT(val) ((val) + '0')
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#ifndef ISO8859
@@ -352,15 +352,14 @@ c_charin(char *str)
{
return (string_input(str, 1, 0, NULL));
}
-
#endif
/* end of file */
/*
- * Local variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
+ * Local Variables:
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
* End:
*/
diff --git a/contrib/string/string_io.h b/contrib/string/string_io.h
index b4a900bbb96..b1d2b7e2c28 100644
--- a/contrib/string/string_io.h
+++ b/contrib/string/string_io.h
@@ -14,15 +14,14 @@ char *c_varcharout(char *s);
#if 0
struct varlena *c_textin(char *str);
char *c_char16in(char *str);
-
#endif
#endif
/*
- * Local variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
+ * Local Variables:
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
* End:
*/
diff --git a/contrib/string/string_io.sql.in b/contrib/string/string_io.sql.in
index a1fafbc3ae8..2a15e4b5354 100644
--- a/contrib/string/string_io.sql.in
+++ b/contrib/string/string_io.sql.in
@@ -40,7 +40,7 @@ create function c_mode() returns text
update pg_type set typoutput=''c_textout'' where typname=''text'';
update pg_type set typoutput=''c_textout'' where typname=''unknown'';
update pg_type set typoutput=''c_varcharout'' where typname=''varchar'';
- select ''c_mode''::text'
+ select ''c_mode''::text;'
language 'sql';
-- Define a function which restores the standard routines for char types.
@@ -55,7 +55,7 @@ create function pg_mode() returns text
update pg_type set typoutput=''textout'' where typname=''text'';
update pg_type set typoutput=''textout'' where typname=''unknown'';
update pg_type set typoutput=''varcharout'' where typname=''varchar'';
- select ''pg_mode''::text'
+ select ''pg_mode''::text;'
language 'sql';
-- Use these to do the changes manually.