14 static void fatal(
const char *
msg, ...) __attribute__((noreturn));
23 vfprintf(stderr,
msg, ap);
37 l = strtol(s, &end, 0);
76 #define TYPE(s) { #s, s }
86 #define TYPE(s) { #s, s }
94 #define TYPE(s) { #s, s }
103 #define TYPE(s) { #s, s }
113 #define TYPE(s) { #s, s }
121 #define TYPE(s) { #s, s }
129 #define TYPE(s) { #s, s }
138 #define TYPE(s) { #s, s }
166 #define ATTR(s,t) { #s, s, type_##t, NULL }
167 #define ATTR2(s,t,l) { #s, s, type_##t, l }
222 #define ATTR_PARAMS const struct attribute *attr, int expected
234 switch (attr->type) {
253 fatal(
"Line %u: CHAR* check still not supported\n",
line_num);
273 #define TEST_FILE "attributes.in"
288 f = fopen(in_file,
"r");
292 fprintf(stderr,
"error opening test file\n");
297 while (fgets(
buf,
sizeof(
buf),
f)) {
302 while (
isspace((
unsigned char) *p))
307 if (!
cmd ||
cmd[0] ==
'#' ||
cmd[0] == 0 ||
cmd[0] ==
'\n')
333 switch (attr->
type) {
352 fatal(
"Line %u: not implemented\n");
355 fatal(
"Line %u: failure not expected setting statement attribute\n",
line_num);
#define odbc_reset_statement()
#define odbc_command(cmd)
static const char si[8][64]
static SQLRETURN odbc_connect(TDS_DBC *dbc, TDSLOGIN *login)
int(* get_attr_t)(const struct attribute *attr, int expected)
static struct lookup_int concurrency[]
static int get_attr_stmt(const struct attribute *attr, int expected)
int main(int argc, char *argv[])
static int get_int(const char *s)
static struct lookup_int cursor_type[]
static struct lookup_int simulate_cursor[]
static struct lookup_int sensitivity[]
static struct lookup_int use_bookmarks[]
static unsigned int line_num
static const struct attribute * lookup_attr(const char *name)
static int lookup(const char *name, const struct lookup_int *table)
static struct lookup_int scrollable[]
static struct lookup_int noscan[]
static const struct attribute attributes[]
static struct lookup_int retrieve_data[]
static const char * unlookup(int value, const struct lookup_int *table)
static void fatal(const char *msg,...)
static const char * expected[]
void odbc_check_cursor(void)
int odbc_disconnect(void)
unsigned int
A callback function used to compare two keys in a database.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const GenericPointer< typename T::ValueType > T2 value
int strcmp(const char *str1, const char *str2)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define SQL_ATTR_APP_ROW_DESC
#define SQL_ATTR_APP_PARAM_DESC
#define SQL_ATTR_CURSOR_SCROLLABLE
#define SQL_ATTR_IMP_PARAM_DESC
#define SQL_NONSCROLLABLE
SQLRETURN SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
SQLRETURN SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
#define SQL_ATTR_CURSOR_SENSITIVITY
#define SQL_SUCCEEDED(rc)
#define SQL_ATTR_METADATA_ID
SQLRETURN SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
#define SQL_ATTR_IMP_ROW_DESC
#define SQL_ATTR_ROWS_FETCHED_PTR
#define SQL_ATTR_ROW_ARRAY_SIZE
#define SQL_CURSOR_FORWARD_ONLY
#define SQL_ATTR_ROW_STATUS_PTR
#define SQL_SC_TRY_UNIQUE
#define SQL_ATTR_ROW_OPERATION_PTR
#define SQL_ATTR_PARAMS_PROCESSED_PTR
#define SQL_CONCUR_VALUES
#define SQL_ATTR_SIMULATE_CURSOR
#define SQL_CONCUR_READ_ONLY
#define SQL_SC_NON_UNIQUE
#define SQL_CURSOR_KEYSET_DRIVEN
#define SQL_ATTR_ROW_BIND_OFFSET_PTR
#define SQL_ATTR_PARAM_STATUS_PTR
#define SQL_ATTR_FETCH_BOOKMARK_PTR
#define SQL_ATTR_CURSOR_TYPE
#define SQL_ATTR_PARAM_OPERATION_PTR
#define SQL_ATTR_QUERY_TIMEOUT
#define SQL_ATTR_PARAM_BIND_TYPE
#define SQL_ATTR_ENABLE_AUTO_IPD
#define SQL_ATTR_RETRIEVE_DATA
#define SQL_ATTR_KEYSET_SIZE
#define SQL_CURSOR_DYNAMIC
#define SQL_ATTR_MAX_ROWS
#define SQL_ATTR_ROW_BIND_TYPE
#define SQL_ATTR_CONCURRENCY
#define SQL_ATTR_PARAMSET_SIZE
#define SQL_CURSOR_STATIC
#define SQL_ATTR_PARAM_BIND_OFFSET_PTR
#define SQL_ATTR_ROW_NUMBER
#define SQL_CONCUR_ROWVER
#define SQL_ATTR_ASYNC_ENABLE
#define SQL_ATTR_USE_BOOKMARKS
#define SQL_ATTR_MAX_LENGTH
signed short int SQLSMALLINT
const struct lookup_int * lookup