1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Change pg_mblen and pg_encoding_mblen return types from void

to int so that they return the number of whcars.
This commit is contained in:
Tatsuo Ishii
2000-08-27 10:40:48 +00:00
parent 86ff9d2912
commit bfdd6a716d
4 changed files with 64 additions and 89 deletions

View File

@ -3,7 +3,7 @@
* client encoding and server internal encoding.
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
* $Id: mbutils.c,v 1.10 2000/06/13 07:35:12 tgl Exp $ */
* $Id: mbutils.c,v 1.11 2000/08/27 10:40:48 ishii Exp $ */
#include "postgres.h"
@ -173,17 +173,17 @@ pg_server_to_client(unsigned char *s, int len)
}
/* convert a multi-byte string to a wchar */
void
int
pg_mb2wchar(const unsigned char *from, pg_wchar * to)
{
(*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, strlen(from));
return (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, strlen(from));
}
/* convert a multi-byte string to a wchar with a limited length */
void
int
pg_mb2wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
{
(*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, len);
return (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, len);
}
/* returns the byte length of a multi-byte word */