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

Go to the source code of this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Macros

#define PATH_MAX   256
 

Functions

void set_malloc_options (void)
 
static void free_file (void)
 
int read_login_info (int argc, char **argv)
 
RETCODE sql_cmd (DBPROCESS *dbproc)
 
RETCODE sql_rewind (void)
 
RETCODE sql_reopen (const char *fn)
 
int syb_msg_handler (DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
 
int syb_err_handler (DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
 

Variables

char USER [512]
 
char SERVER [512]
 
char PASSWORD [512]
 
char DATABASE [512]
 
static char sql_file [256]
 
static FILE * input_file = NULL
 
static char * ARGV0 = NULL
 
static char * ARGV0B = NULL
 
static char * DIRNAME = NULL
 
static const char * BASENAME = NULL
 
char free_file_registered = 0
 

Macro Definition Documentation

◆ PATH_MAX

#define PATH_MAX   256

Definition at line 26 of file common.c.

Function Documentation

◆ free_file()

static void free_file ( void  )
static

Definition at line 90 of file common.c.

References ARGV0, ARGV0B, BASENAME, DIRNAME, free(), input_file, and NULL.

Referenced by read_login_info().

◆ read_login_info()

int read_login_info ( int  argc,
char **  argv 
)

◆ set_malloc_options()

void set_malloc_options ( void  )

Definition at line 47 of file common.c.

Referenced by main(), and test().

◆ sql_cmd()

RETCODE sql_cmd ( DBPROCESS dbproc)

◆ sql_reopen()

RETCODE sql_reopen ( const char *  fn)

Definition at line 317 of file common.c.

References assert, FAIL, FREETDS_SRCDIR, input_file, len, NULL, sql_file, and SUCCEED.

Referenced by main().

◆ sql_rewind()

RETCODE sql_rewind ( void  )

Definition at line 308 of file common.c.

References FAIL, input_file, and SUCCEED.

Referenced by test().

◆ syb_err_handler()

int syb_err_handler ( DBPROCESS dbproc,
int  severity,
int  dberr,
int  oserr,
char *  dberrstr,
char *  oserrstr 
)

◆ syb_msg_handler()

int syb_msg_handler ( DBPROCESS dbproc,
DBINT  msgno,
int  msgstate,
int  severity,
char *  msgtext,
char *  srvname,
char *  procname,
int  line 
)

Definition at line 334 of file common.c.

References dbgetuserdata(), dbproc, exit(), EXIT_FAILURE, and NULL.

Referenced by ignore_msg_handler(), main(), test(), and test_file().

Variable Documentation

◆ ARGV0

char* ARGV0 = NULL
static

Definition at line 37 of file common.c.

Referenced by free_file(), and read_login_info().

◆ ARGV0B

char* ARGV0B = NULL
static

Definition at line 38 of file common.c.

Referenced by free_file(), and read_login_info().

◆ BASENAME

const char* BASENAME = NULL
static

Definition at line 40 of file common.c.

Referenced by free_file(), read_login_info(), and sql_cmd().

◆ DATABASE

char DATABASE[512]

Definition at line 32 of file common.c.

◆ DIRNAME

char* DIRNAME = NULL
static

Definition at line 39 of file common.c.

Referenced by free_file(), and read_login_info().

◆ free_file_registered

char free_file_registered = 0

Definition at line 88 of file common.c.

Referenced by read_login_info().

◆ input_file

FILE* input_file = NULL
static

◆ PASSWORD

char PASSWORD[512]

Definition at line 31 of file common.c.

◆ SERVER

char SERVER[512]

Definition at line 30 of file common.c.

◆ sql_file

char sql_file[256]
static

Definition at line 34 of file common.c.

Referenced by read_login_info(), sql_cmd(), and sql_reopen().

◆ USER

char USER[512]

Definition at line 29 of file common.c.

Modified on Tue Apr 09 07:57:29 2024 by modify_doxy.py rev. 669887
Modified on Wed Apr 10 07:32:55 2024 by modify_doxy.py rev. 669887
Modified on Thu Apr 11 15:05:43 2024 by modify_doxy.py rev. 669887
Modified on Fri Apr 12 17:17:58 2024 by modify_doxy.py rev. 669887
Modified on Sat Apr 13 11:45:59 2024 by modify_doxy.py rev. 669887