mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Remove variable length macros used in debugging, per Karel.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
* Encoding names and routines for work with it. All
|
* Encoding names and routines for work with it. All
|
||||||
* in this file is shared bedween FE and BE.
|
* in this file is shared bedween FE and BE.
|
||||||
*
|
*
|
||||||
* $Id: encnames.c,v 1.1 2001/09/07 03:32:11 ishii Exp $
|
* $Id: encnames.c,v 1.2 2001/09/07 15:01:45 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#ifdef FRONTEND
|
#ifdef FRONTEND
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -22,20 +22,6 @@
|
|||||||
#include "mb/pg_wchar.h"
|
#include "mb/pg_wchar.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Debug
|
|
||||||
*/
|
|
||||||
/* #define DEBUG_ENCODING */
|
|
||||||
#ifdef DEBUG_ENCODING
|
|
||||||
#ifdef FRONTEND
|
|
||||||
#define encdebug(_format, _a...) fprintf(stderr, _format, ##_a)
|
|
||||||
#else
|
|
||||||
#define encdebug(_format, _a...) elog(NOTICE, _format, ##_a)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define encdebug(_format, _a...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ----------
|
/* ----------
|
||||||
* All encoding names, sorted: *** A L P H A B E T I C ***
|
* All encoding names, sorted: *** A L P H A B E T I C ***
|
||||||
*
|
*
|
||||||
@ -52,7 +38,7 @@ pg_encname pg_encname_tbl[] =
|
|||||||
{
|
{
|
||||||
{ "alt", PG_ALT }, /* IBM866 */
|
{ "alt", PG_ALT }, /* IBM866 */
|
||||||
{ "big5", PG_BIG5 }, /* Big5; Chinese for Taiwan Multi-byte set */
|
{ "big5", PG_BIG5 }, /* Big5; Chinese for Taiwan Multi-byte set */
|
||||||
{ "euccn", PG_EUC_CN }, /* EUC-CN; ??? */
|
{ "euccn", PG_EUC_CN }, /* EUC-CN; ??? */
|
||||||
{ "eucjp", PG_EUC_JP }, /* EUC-JP; Extended UNIX Code Fixed Width for Japanese, stdandard OSF */
|
{ "eucjp", PG_EUC_JP }, /* EUC-JP; Extended UNIX Code Fixed Width for Japanese, stdandard OSF */
|
||||||
{ "euckr", PG_EUC_KR }, /* EUC-KR; RFC1557,Choi */
|
{ "euckr", PG_EUC_KR }, /* EUC-KR; RFC1557,Choi */
|
||||||
{ "euctw", PG_EUC_TW }, /* EUC-TW; ??? */
|
{ "euctw", PG_EUC_TW }, /* EUC-TW; ??? */
|
||||||
@ -192,8 +178,6 @@ pg_char_to_encname_struct(const char *name)
|
|||||||
}
|
}
|
||||||
key = clean_encoding_name((char *) name, buff);
|
key = clean_encoding_name((char *) name, buff);
|
||||||
|
|
||||||
encdebug("Name: %s", key);
|
|
||||||
|
|
||||||
while (last >= base)
|
while (last >= base)
|
||||||
{
|
{
|
||||||
position = base + ((last - base) >> 1);
|
position = base + ((last - base) >> 1);
|
||||||
@ -210,8 +194,6 @@ pg_char_to_encname_struct(const char *name)
|
|||||||
else
|
else
|
||||||
base = position + 1;
|
base = position + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
encdebug("UNKNOWN! encoding");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user