From: Bruce Momjian Date: Tue, 25 Aug 1998 04:19:16 +0000 (+0000) Subject: >Applied. X-Git-Tag: REL9_0_0~26724 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2aab1b9a2229a989869e11ce32cdb4217cc0b38c;p=pg-rex%2Fsyncrep.git >Applied. Thanks. But patches for src/backend/catalog/Makefile seems missing in the current source tree. Please apply attached patches. It also includes some corrections to src/backend/util/mb/wchar.c. -- Tatsuo Ishii t-ishii@sra.co.jp --- diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index 9c444da559..80c90e7a15 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -4,7 +4,7 @@ # Makefile for catalog # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.12 1998/07/26 04:30:20 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.13 1998/08/25 04:19:14 momjian Exp $ # #------------------------------------------------------------------------- @@ -24,28 +24,11 @@ SUBSYS.o: $(OBJS) GENBKI= ./genbki.sh -ifdef MULTIBYTE -GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \ - pg_database_mb.h pg_variable.h pg_shadow.h \ - pg_group.h pg_log.h \ - ) -else GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \ pg_database.h pg_variable.h pg_shadow.h \ pg_group.h pg_log.h \ ) -endif -ifdef MULTIBYTE -LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \ - pg_proc.h pg_type.h pg_attribute_mb.h pg_class_mb.h \ - pg_inherits.h pg_index.h pg_version.h pg_statistic.h \ - pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \ - pg_language.h pg_parg.h \ - pg_aggregate.h pg_ipl.h pg_inheritproc.h \ - pg_rewrite.h pg_listener.h pg_description.h indexing.h \ - ) -else LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \ pg_proc.h pg_type.h pg_attribute.h pg_class.h \ pg_inherits.h pg_index.h pg_version.h pg_statistic.h \ @@ -54,7 +37,7 @@ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \ pg_aggregate.h pg_ipl.h pg_inheritproc.h \ pg_rewrite.h pg_listener.h pg_description.h indexing.h \ ) -endif + global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS) sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index f83c462867..3cc2477061 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -1,7 +1,7 @@ /* * conversion functions between pg_wchar and multi-byte streams. * Tatsuo Ishii - * $Id: wchar.c,v 1.2 1998/08/24 01:14:01 momjian Exp $ + * $Id: wchar.c,v 1.3 1998/08/25 04:19:16 momjian Exp $ */ #include "mb/pg_wchar.h" @@ -13,6 +13,29 @@ * supported in the client, you don't need to define * mb2wchar_with_len() function (SJIS is the case). */ + +/* + * SQL/ASCII + */ +static void pg_ascii2wchar_with_len +(const unsigned char *from, pg_wchar *to, int len) +{ + while (*from && len > 0) { + *to++ = *from++; + len--; + } + *to = 0; +} + +static int pg_ascii_mblen(const unsigned char *s) +{ + return(1); +} + +/* + * EUC + */ + static void pg_euc2wchar_with_len (const unsigned char *from, pg_wchar *to, int len) { @@ -316,7 +339,7 @@ static int pg_sjis_mblen(const unsigned char *s) } pg_wchar_tbl pg_wchar_table[] = { - {0, 0}, + {pg_ascii2wchar_with_len, pg_ascii_mblen}, {pg_eucjp2wchar_with_len, pg_eucjp_mblen}, {pg_euccn2wchar_with_len, pg_euccn_mblen}, {pg_euckr2wchar_with_len, pg_euckr_mblen},