NCBI C++ ToolKit
Macros | Functions
c2string.c File Reference
#include "common.h"
#include <common/test_assert.h>
+ Include dependency graph for c2string.c:

Go to the source code of this file.

Go to the SVN repository for this file.


#define IN   (*((const buf_t*) in))


static char * add_char (char *s, SQLWCHAR ch)
void odbc_c2string (char *out, SQLSMALLINT out_c_type, const void *in, size_t in_len)
 Converts an ODBC result into a string. More...

Macro Definition Documentation

◆ IN

#define IN   (*((const buf_t*) in))

Function Documentation

◆ add_char()

static char* add_char ( char *  s,

Definition at line 6 of file c2string.c.

Referenced by odbc_c2string().

◆ odbc_c2string()

void odbc_c2string ( char *  out,
SQLSMALLINT  out_c_type,
const void *  in,
size_t  in_len 

Converts an ODBC result into a string.

There is no check on destination length, use a buffer big enough.

Definition at line 26 of file c2string.c.

References add_char(), assert, i, IN, int, out(), tagSQL_NUMERIC_STRUCT::precision, PRId64, tagSQL_NUMERIC_STRUCT::scale, si, tagSQL_NUMERIC_STRUCT::sign, SQL_C_BINARY, SQL_C_CHAR, SQL_C_LONG, SQL_C_NUMERIC, SQL_C_SBIGINT, SQL_C_SHORT, SQL_C_TIMESTAMP, SQL_C_WCHAR, SQL_MAX_NUMERIC_LEN, tds_sysdep_int64_type, and tagSQL_NUMERIC_STRUCT::val.

Referenced by Test(), and TestOutput().

Modified on Mon Mar 04 05:12:57 2024 by rev. 669887