diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 2000-08-27 10:40:48 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 2000-08-27 10:40:48 +0000 |
commit | bfdd6a716dc2ea03587c41dd9cd8ece39a654a8d (patch) | |
tree | 3ba350b768690d2e9753ed24a17a0a83b48db2c5 /src/backend/utils/mb/conv.c | |
parent | 86ff9d29125849619cb100f4132c9f60e7390536 (diff) | |
download | postgresql-bfdd6a716dc2ea03587c41dd9cd8ece39a654a8d.tar.gz postgresql-bfdd6a716dc2ea03587c41dd9cd8ece39a654a8d.zip |
Change pg_mblen and pg_encoding_mblen return types from void
to int so that they return the number of whcars.
Diffstat (limited to 'src/backend/utils/mb/conv.c')
-rw-r--r-- | src/backend/utils/mb/conv.c | 69 |
1 files changed, 1 insertions, 68 deletions
diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c index af7f5623b54..15a5dee25ec 100644 --- a/src/backend/utils/mb/conv.c +++ b/src/backend/utils/mb/conv.c @@ -6,7 +6,7 @@ * WIN1250 client encoding support contributed by Pavel Behal * SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya * - * $Id: conv.c,v 1.16 2000/06/28 03:32:45 tgl Exp $ + * $Id: conv.c,v 1.17 2000/08/27 10:40:48 ishii Exp $ * * */ @@ -1519,70 +1519,3 @@ pg_encoding_conv_tbl pg_conv_tbl[] = { {WIN1250, "WIN1250", 1, win12502mic, mic2win1250}, /* WIN 1250 */ {-1, "", 0, 0, 0} /* end mark */ }; - -#ifdef DEBUGMAIN -#include "postgres.h" -#include "utils/memutils.h" -/* - * testing for sjis2mic() and mic2sjis() - */ - -int -main() -{ - unsigned char eucbuf[1024]; - unsigned char sjisbuf[1024]; - unsigned char sjis[] = {0x81, 0x40, 0xa1, 0xf0, 0x40, 0xf0, 0x9e, 0xf5, 0x40, 0xfa, 0x40, 0xfa, 0x54, 0xfa, 0x7b, 0x00}; - - int i; - - sjis2mic(sjis, eucbuf, 1024); - for (i = 0; i < 1024; i++) - { - if (eucbuf[i]) - printf("%02x ", eucbuf[i]); - else - { - printf("\n"); - break; - } - } - - mic2sjis(eucbuf, sjisbuf, 1024); - for (i = 0; i < 1024; i++) - { - if (sjisbuf[i]) - printf("%02x ", sjisbuf[i]); - else - { - printf("\n"); - break; - } - } - - return (0); -} - -void -elog(int lev, const char *fmt,...) -{ -} - -MemoryContext CurrentMemoryContext; - -void * -MemoryContextAlloc(MemoryContext context, Size size) -{ -} - -void -pfree(void *pointer) -{ -} - -void * -repalloc(void *pointer, Size size) -{ -} - -#endif |