Go to the SVN repository for this file.
4 #include <freetds/odbc.h> 14 #ifdef ENABLE_ODBC_WIDE 16wide_test(
const WCHAR*
input,
size_tinput_len,
const char*exp,
intline)
24fprintf(stderr,
"%d: Wrong, len %u: %s\n", line,
31 if(outlen < 0 || outlen !=input_len
33fprintf(stderr,
"%d: out_len %u %x %x %x\n", line, outlen,
outbuf[0],
outbuf[1],
outbuf[2]);
41 main(
intargc,
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__); \ 70WIDE_TEST({
'f' SEP 'o' SEP 'o'},
"foo");
71WIDE_TEST({ 0x41 },
"A");
72WIDE_TEST({ 0xA1 },
"\xc2\xA1");
73WIDE_TEST({ 0x81 },
"\xc2\x81");
74WIDE_TEST({ 0x101 },
"\xc4\x81");
75WIDE_TEST({ 0x201 },
"\xc8\x81");
76WIDE_TEST({ 0x401 },
"\xd0\x81");
77WIDE_TEST({ 0x801 },
"\xe0\xa0\x81");
78WIDE_TEST({ 0x1001 },
"\xe1\x80\x81");
79WIDE_TEST({ 0x2001 },
"\xe2\x80\x81");
80WIDE_TEST({ 0x4001 },
"\xe4\x80\x81");
81WIDE_TEST({ 0x8001 },
"\xe8\x80\x81");
82 #if SIZEOF_SQLWCHAR == 2 83WIDE_TEST({ 0xd800
SEP0xdc01 },
"\xf0\x90\x80\x81");
84WIDE_TEST({ 0xd800
SEP0xdd01 },
"\xf0\x90\x84\x81");
85WIDE_TEST({ 0xd840
SEP0xdd01 },
"\xf0\xa0\x84\x81");
86WIDE_TEST({ 0xd8c0
SEP0xdd01 },
"\xf1\x80\x84\x81");
87WIDE_TEST({ 0xd9c0
SEP0xdd01 },
"\xf2\x80\x84\x81");
89WIDE_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