NCBI C++ ToolKit
Macros | Functions | Variables
common.h File Reference
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <sqlfront.h>
#include <sqldb.h>
#include <freetds/sysdep_private.h>
+ Include dependency graph for common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.


#define EXIT_FAILURE   1
#define EXIT_SUCCESS   0
#define FREETDS_SRCDIR   FREETDS_TOPDIR "/src/dblib/unittests"
#define int2ptr(i)   ((void*)(((char*)0)+(i)))
#define ptr2int(p)   ((int)(((char*)(p))-((char*)0)))


void set_malloc_options (void)
int read_login_info (int argc, char **argv)
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)
RETCODE sql_cmd (DBPROCESS *dbproc)
RETCODE sql_rewind (void)
RETCODE sql_reopen (const char *fn)


char * optarg
int optind
int optopt
int opterr
int optreset
char PASSWORD [512]
char USER [512]
char SERVER [512]
char DATABASE [512]

Macro Definition Documentation


#define EXIT_FAILURE   1

Definition at line 38 of file common.h.


#define EXIT_SUCCESS   0

Definition at line 39 of file common.h.


#define FREETDS_SRCDIR   FREETDS_TOPDIR "/src/dblib/unittests"

Definition at line 43 of file common.h.

◆ int2ptr

#define int2ptr (   i)    ((void*)(((char*)0)+(i)))

Definition at line 101 of file common.h.

◆ ptr2int

#define ptr2int (   p)    ((int)(((char*)(p))-((char*)0)))

Definition at line 102 of file common.h.

Function Documentation

◆ read_login_info()

int read_login_info ( int  argc,
char **  argv 

Definition at line 107 of file common.c.

◆ set_malloc_options()

void set_malloc_options ( void  )

Definition at line 47 of file common.c.

◆ sql_cmd()

RETCODE sql_cmd ( DBPROCESS dbproc)

Definition at line 280 of file common.c.

◆ sql_reopen()

RETCODE sql_reopen ( const char *  fn)

Definition at line 317 of file common.c.

◆ sql_rewind()

RETCODE sql_rewind ( void  )

Definition at line 308 of file common.c.

◆ syb_err_handler()

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

Definition at line 404 of file common.c.

◆ 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.

Variable Documentation


char DATABASE[512]

Definition at line 32 of file common.c.

◆ optarg

char* optarg

Definition at line 65 of file getopt.c.

◆ opterr

int opterr

Definition at line 160 of file replacements.h.

◆ optind

int optind

Definition at line 62 of file getopt.c.

◆ optopt

int optopt

Definition at line 63 of file getopt.c.

◆ optreset

int optreset

Definition at line 160 of file replacements.h.


char PASSWORD[512]

Definition at line 31 of file common.c.


char SERVER[512]

Definition at line 30 of file common.c.


char USER[512]

Definition at line 29 of file common.c.

Modified on Mon May 27 04:36:04 2024 by rev. 669887