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

Go to the source code of this file.

Go to the SVN repository for this file.


#define INFILE_NAME   "t0016"
#define TABLE_NAME   "#dblib0016"


static void failure (const char *fmt,...)
static void test_file (const char *fn)
static int compare_files (const char *fn1, const char *fn2)
static unsigned count_file_rows (FILE *f)
int main (int argc, char *argv[])
static int ignore_msg_handler (DBPROCESS *dbproc, DBINT msgno, int state, int severity, char *text, char *server, char *proc, int line)
static int ignore_err_handler (DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
static size_t fgets_raw (char *s, int len, FILE *f)


static int failed = 0
static DBPROCESSdbproc
static int got_error = 0
static char line1 [1024 *16]
static char line2 [1024 *16]

Macro Definition Documentation


#define INFILE_NAME   "t0016"

Definition at line 24 of file t0016.c.


#define TABLE_NAME   "#dblib0016"

Definition at line 25 of file t0016.c.

Function Documentation

◆ compare_files()

static int compare_files ( const char *  fn1,
const char *  fn2 

Definition at line 257 of file t0016.c.

References failure(), fgets_raw(), line1, line2, and NULL.

Referenced by test_file().

◆ count_file_rows()

static unsigned count_file_rows ( FILE *  f)

Definition at line 309 of file t0016.c.

References assert, f(), fgets_raw(), last(), and line1.

Referenced by test_file().

◆ failure()

static void failure ( const char *  fmt,

Definition at line 13 of file t0016.c.

References failed.

Referenced by compare_files(), and test_file().

◆ fgets_raw()

static size_t fgets_raw ( char *  s,
int  len,
FILE *  f 

Definition at line 236 of file t0016.c.

References f(), and len.

Referenced by compare_files(), and count_file_rows().

◆ ignore_err_handler()

static int ignore_err_handler ( DBPROCESS dbproc,
int  severity,
int  dberr,
int  oserr,
char *  dberrstr,
char *  oserrstr 

Definition at line 92 of file t0016.c.

References got_error, and INT_CANCEL.

Referenced by test_file().

◆ ignore_msg_handler()

static int ignore_msg_handler ( DBPROCESS dbproc,
DBINT  msgno,
int  state,
int  severity,
char *  text,
char *  server,
char *  proc,
int  line 

Definition at line 85 of file t0016.c.

References got_error.

Referenced by test_file().

◆ main()

int main ( int  argc,
char *  argv[] 

◆ test_file()

static void test_file ( const char *  fn)

Variable Documentation

◆ dbproc


Definition at line 30 of file t0016.c.

Referenced by main(), and test_file().

◆ failed

int failed = 0

Definition at line 10 of file t0016.c.

Referenced by failure(), main(), and test_file().

◆ got_error

int got_error = 0

Definition at line 82 of file t0016.c.

Referenced by ignore_err_handler(), ignore_msg_handler(), and test_file().

◆ line1

char line1[1024 *16]

◆ line2

char line2[1024 *16]
Modified on Sat Dec 02 09:20:35 2023 by rev. 669887