A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/utf8__4_8c_source.html below:

NCBI C++ ToolKit: src/dbapi/driver/ftds14/freetds/odbc/unittests/utf8_4.c Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

4 #include <freetds/odbc.h> 14 #ifdef ENABLE_ODBC_WIDE 16

wide_test(

const WCHAR

*

input

,

size_t

input_len,

const char

*exp,

int

line)

24

fprintf(stderr,

"%d: Wrong, len %u: %s\n"

, line,

31  if

(outlen < 0 || outlen !=input_len

33

fprintf(stderr,

"%d: out_len %u %x %x %x\n"

, line, outlen,

outbuf

[0],

outbuf

[1],

outbuf

[2]);

41 main

(

int

argc,

char

*argv[])

43 #ifdef ENABLE_ODBC_WIDE 64 #define WIDE_TEST(chars, exp) do { \ 65  static const SQLWCHAR input[] = chars; \ 66  wide_test(input, TDS_VECTOR_SIZE(input), exp, __LINE__); \ 70

WIDE_TEST({

'f' SEP 'o' SEP 'o'

},

"foo"

);

71

WIDE_TEST({ 0x41 },

"A"

);

72

WIDE_TEST({ 0xA1 },

"\xc2\xA1"

);

73

WIDE_TEST({ 0x81 },

"\xc2\x81"

);

74

WIDE_TEST({ 0x101 },

"\xc4\x81"

);

75

WIDE_TEST({ 0x201 },

"\xc8\x81"

);

76

WIDE_TEST({ 0x401 },

"\xd0\x81"

);

77

WIDE_TEST({ 0x801 },

"\xe0\xa0\x81"

);

78

WIDE_TEST({ 0x1001 },

"\xe1\x80\x81"

);

79

WIDE_TEST({ 0x2001 },

"\xe2\x80\x81"

);

80

WIDE_TEST({ 0x4001 },

"\xe4\x80\x81"

);

81

WIDE_TEST({ 0x8001 },

"\xe8\x80\x81"

);

82 #if SIZEOF_SQLWCHAR == 2 83

WIDE_TEST({ 0xd800

SEP

0xdc01 },

"\xf0\x90\x80\x81"

);

84

WIDE_TEST({ 0xd800

SEP

0xdd01 },

"\xf0\x90\x84\x81"

);

85

WIDE_TEST({ 0xd840

SEP

0xdd01 },

"\xf0\xa0\x84\x81"

);

86

WIDE_TEST({ 0xd8c0

SEP

0xdd01 },

"\xf1\x80\x84\x81"

);

87

WIDE_TEST({ 0xd9c0

SEP

0xdd01 },

"\xf2\x80\x84\x81"

);

89

WIDE_TEST({ 0x10001 },

"\xf0\x90\x80\x81"

);

#define CHKAllocHandle(a, b, c, res)

#define TDS_VECTOR_SIZE(x)

int odbc_disconnect(void)

int odbc_driver_is_freetds(void)

static const char * tds_dstr_cstr(DSTR *s)

Returns a C version (NUL terminated string) of dstr.

#define DSTR_INITIALIZER

Initializer, used to initialize string like in the following example.

void tds_dstr_free(DSTR *s)

free string

static size_t tds_dstr_len(DSTR *s)

Returns the length of the string in bytes.

SQLRETURN odbc_set_string_flag(TDS_DBC *dbc, SQLPOINTER buffer, SQLINTEGER cbBuffer, void FAR *pcbBuffer, const char *s, ssize_t len, int flag)

Copy a string to client setting size according to ODBC convenction.

int strcmp(const char *str1, const char *str2)

SQLRETURN SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)

#define SQL_ATTR_ODBC_VERSION

Structure to hold a string.

uchar outbuf[(1000000+1000000)]

int main(int argc, char *argv[])


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4