PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
mbprint.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * Multibyte character printing support for frontend code
4  *
5  *
6  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/fe_utils/mbprint.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef MBPRINT_H
14 #define MBPRINT_H
15 
16 struct lineptr
17 {
18  unsigned char *ptr;
19  int width;
20 };
21 
22 extern unsigned char *mbvalidate(unsigned char *pwcs, int encoding);
23 extern int pg_wcswidth(const char *pwcs, size_t len, int encoding);
24 extern void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding,
25  struct lineptr * lines, int count);
26 extern void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding,
27  int *width, int *height, int *format_size);
28 
29 #endif /* MBPRINT_H */
int pg_wcswidth(const char *pwcs, size_t len, int encoding)
Definition: mbprint.c:177
void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding, int *width, int *height, int *format_size)
Definition: mbprint.c:211
unsigned char * mbvalidate(unsigned char *pwcs, int encoding)
Definition: mbprint.c:392
void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding, struct lineptr *lines, int count)
Definition: mbprint.c:294
static char * encoding
Definition: initdb.c:121
int width
Definition: mbprint.h:19
unsigned char * ptr
Definition: mbprint.h:18