summaryrefslogtreecommitdiff
path: root/src/bin/psql/mbprint.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2002-08-27 20:16:49 +0000
committerPeter Eisentraut <peter_e@gmx.net>2002-08-27 20:16:49 +0000
commit7292131c66db233675bef4767012783a584a2655 (patch)
tree6bc515529c6687d4665aa94519785b4995a013d2 /src/bin/psql/mbprint.c
parent7af5ea736f680109de569b00f2c36ea8e0211aea (diff)
Enable locale, so case conversion (identifier processing) and number
formatting (\timing) works correctly. Change "Total time" to "Time" since there is nothing that "total" refers to. Remove non-multibyte code.
Diffstat (limited to 'src/bin/psql/mbprint.c')
-rw-r--r--src/bin/psql/mbprint.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/bin/psql/mbprint.c b/src/bin/psql/mbprint.c
index b0478eeef8d..dcd305d9212 100644
--- a/src/bin/psql/mbprint.c
+++ b/src/bin/psql/mbprint.c
@@ -3,14 +3,12 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.3 2001/10/28 06:25:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.4 2002/08/27 20:16:48 petere Exp $
*/
#include "postgres_fe.h"
#include "mbprint.h"
-#ifdef MULTIBYTE
-
#include "mb/pg_wchar.h"
#include "settings.h"
@@ -195,7 +193,7 @@ utf2ucs(const unsigned char *c)
/* mb_utf_wcwidth : calculate column length for the utf8 string pwcs
*/
static int
-mb_utf_wcswidth(unsigned char *pwcs, int len)
+mb_utf_wcswidth(unsigned char *pwcs, size_t len)
{
int w,
l = 0;
@@ -312,7 +310,7 @@ mb_utf_validate(unsigned char *pwcs)
*/
int
-pg_wcswidth(unsigned char *pwcs, int len)
+pg_wcswidth(unsigned char *pwcs, size_t len)
{
if (pset.encoding == PG_UTF8)
return mb_utf_wcswidth(pwcs, len);
@@ -340,14 +338,3 @@ mbvalidate(unsigned char *pwcs)
return pwcs;
}
}
-
-#else /* !MULTIBYTE */
-
-/* in single-byte environment, all cells take 1 column */
-int
-pg_wcswidth(unsigned char *pwcs, int len)
-{
- return len;
-}
-
-#endif