Commit 8f17e53f authored by Tatsuo Ishii's avatar Tatsuo Ishii

Move pg_encoding_mblen() from common.c to wchar.c.

parent f54c02d2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This file contains some public functions * This file contains some public functions
* usable for both the backend and the frontend. * usable for both the backend and the frontend.
* Tatsuo Ishii * Tatsuo Ishii
* $Id: common.c,v 1.11 2001/02/10 02:31:27 tgl Exp $ * $Id: common.c,v 1.12 2001/02/11 01:59:22 ishii Exp $
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -96,10 +96,3 @@ PG_encoding_to_char(PG_FUNCTION_ARGS) ...@@ -96,10 +96,3 @@ PG_encoding_to_char(PG_FUNCTION_ARGS)
} }
#endif #endif
/* returns the byte length of a multi-byte word for an encoding */
int
pg_encoding_mblen(int encoding, const unsigned char *mbstr)
{
return ((*pg_wchar_table[encoding].mblen) (mbstr));
}
/* /*
* conversion functions between pg_wchar and multi-byte streams. * conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii * Tatsuo Ishii
* $Id: wchar.c,v 1.14 2001/02/10 02:31:27 tgl Exp $ * $Id: wchar.c,v 1.15 2001/02/11 01:59:22 ishii Exp $
* *
* WIN1250 client encoding updated by Pavel Behal * WIN1250 client encoding updated by Pavel Behal
* *
...@@ -497,3 +497,12 @@ pg_mic_mblen(const unsigned char *mbstr) ...@@ -497,3 +497,12 @@ pg_mic_mblen(const unsigned char *mbstr)
{ {
return (pg_mule_mblen(mbstr)); return (pg_mule_mblen(mbstr));
} }
/*
* Returns the byte length of a multi-byte word.
*/
int
pg_encoding_mblen(int encoding, const unsigned char *mbstr)
{
return ((*pg_wchar_table[encoding].mblen) (mbstr));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment