# 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 $
#
#-------------------------------------------------------------------------
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 \
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
/*
* 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"
* 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)
{
}
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},