mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add auto-size to screen to \d? commands. Use UNION to show all
\d? results in one query. Add \d? field search feature. Rename MB to MULTIBYTE.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: pg_wchar.h,v 1.3 1998/06/16 07:29:43 momjian Exp $ */
|
||||
/* $Id: pg_wchar.h,v 1.4 1998/07/18 18:34:24 momjian Exp $ */
|
||||
|
||||
#ifndef PG_WCHAR_H
|
||||
#define PG_WCHAR_H
|
||||
@ -19,8 +19,8 @@
|
||||
/* followings are for client encoding only */
|
||||
#define SJIS 16 /* Shift JIS */
|
||||
|
||||
#ifdef MB
|
||||
# if LATIN1 <= MB && MB <= LATIN5
|
||||
#ifdef MULTIBYTE
|
||||
# if LATIN1 <= MULTIBYTE && MULTIBYTE <= LATIN5
|
||||
typedef unsigned char pg_wchar;
|
||||
# else
|
||||
typedef unsigned int pg_wchar;
|
||||
@ -65,7 +65,7 @@ typedef unsigned int pg_wchar;
|
||||
#define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */
|
||||
#define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */
|
||||
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
extern void pg_mb2wchar(const unsigned char *, pg_wchar *);
|
||||
extern void pg_mb2wchar_with_len(const unsigned char *, pg_wchar *, int);
|
||||
extern int pg_char_and_wchar_strcmp(const char *, const pg_wchar *);
|
||||
|
@ -52,7 +52,7 @@ typedef struct
|
||||
size_t re_nsub; /* number of parenthesized subexpressions */
|
||||
const pg_wchar *re_endp; /* end pointer for REG_PEND */
|
||||
struct re_guts *re_g; /* none of your business :-) */
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
pg_wchar *patsave; /* mee too :-) */
|
||||
#endif
|
||||
|
||||
|
@ -127,7 +127,7 @@ typedef struct
|
||||
{
|
||||
uch *ptr; /* -> uch [csetsize] */
|
||||
uch mask; /* bit within array */
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
pg_wchar hash; /* hash code */
|
||||
unsigned int lc; /* leading character (character-set) */
|
||||
#else
|
||||
@ -138,7 +138,7 @@ typedef struct
|
||||
} cset;
|
||||
|
||||
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#define CHlc(c) (((unsigned)(c)&0xff0000)>>16)
|
||||
#define CHadd(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] |= (cs)->mask, (cs)->hash += (unsigned)(c)&0xffff,\
|
||||
(cs)->lc = CHlc(c))
|
||||
@ -196,12 +196,12 @@ struct re_guts
|
||||
};
|
||||
|
||||
/* misc utilities */
|
||||
#ifdef MB
|
||||
# if MB == MULE_INTERNAL
|
||||
#ifdef MULTIBYTE
|
||||
# if MULTIBYTE == MULE_INTERNAL
|
||||
# define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
|
||||
# elif MB == EUC_JP || MB == EUC_CN || MB == EUC_KR || MB == EUC_TW
|
||||
# elif MULTIBYTE == EUC_JP || MULTIBYTE == EUC_CN || MULTIBYTE == EUC_KR || MULTIBYTE == EUC_TW
|
||||
# define OUT (USHRT_MAX+1) /* 2 bytes */
|
||||
# elif MB == UNICODE
|
||||
# elif MULTIBYTE == UNICODE
|
||||
# define OUT (USHRT_MAX+1) /* 2 bytes. assuming UCS-2 */
|
||||
# else
|
||||
# define OUT (UCHAR_MAX+1) /* other codes. assuming 1 byte */
|
||||
@ -210,7 +210,7 @@ struct re_guts
|
||||
# define OUT (CHAR_MAX+1) /* a non-character value */
|
||||
#endif
|
||||
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#define ISWORD(c) ((c >= 0 && c <= UCHAR_MAX) && \
|
||||
(isalnum(c) || (c) == '_'))
|
||||
#else
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define DUPMAX 100000000 /* xxx is this right? */
|
||||
#define INFINITY (DUPMAX + 1)
|
||||
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#define NC (SHRT_MAX - SHRT_MIN + 1)
|
||||
#else
|
||||
#define NC (CHAR_MAX - CHAR_MIN + 1)
|
||||
|
Reference in New Issue
Block a user