A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ncbi__util_8h_source.html below:

NCBI C++ ToolKit: include/connect/ncbi_util.h Source File

1 #ifndef CONNECT___NCBI_UTIL__H 2 #define CONNECT___NCBI_UTIL__H 141 #define LOG_WRITE(lg, code, subcode, level, message) \ 142  LOG_Write(lg, code, subcode, level, THIS_MODULE, CORE_CURRENT_FUNCTION, \ 143  __FILE__, __LINE__, message, 0, 0) 150 #define LOG_DATA(lg, code, subcode, level, data, size, message) \ 151  LOG_Write(lg, code, subcode, level, THIS_MODULE, CORE_CURRENT_FUNCTION, \ 152  __FILE__, __LINE__, message, data, size) 158 # define THIS_MODULE 0 168 #if defined(__GNUC__) || \ 169  (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || \ 170  (defined(__ICC) && (__ICC >= 600)) 171 # define CORE_CURRENT_FUNCTION __PRETTY_FUNCTION__ 172 #elif defined(__FUNCSIG__) 173 # define CORE_CURRENT_FUNCTION __FUNCSIG__ 174 #elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || \ 175  (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) 176 # define CORE_CURRENT_FUNCTION __FUNCTION__ 177 #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) 178 # define CORE_CURRENT_FUNCTION __FUNC__ 179 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) 180 # define CORE_CURRENT_FUNCTION __func__ 182 # define CORE_CURRENT_FUNCTION 0 190 #if !defined(NCBI_CXX_TOOLKIT) && defined(_DEBUG) && !defined(NDEBUG) 191 # define CORE_LOGFILE_CUTOFF_LEVEL eLOG_Trace 193 # define CORE_LOGFILE_CUTOFF_LEVEL eLOG_Note 269

(

const char

* logfile,

281

(

const char

* logfile

301 #define fLOG_Short fLOG_Level 302 #define fLOG_Full (fLOG_Level | fLOG_Module | fLOG_FileLine) 386  const char

* message,

540

(

unsigned int

checksum,

559

(

unsigned int

checksum,

583  int

(*init) (

void

**

ctx

);

584

void (*update)(

void

*

ctx

,

const void

*

data

,

size_t

data_len);

585

void (*fini) (

void

*

ctx

,

void

* digest);

674

(

const char

*

text

,

685

(

const char

*

text

,

717

(

const char

*

data

,

722 #define UTIL_PRINTABLE_WIDTH_MIN 80 723 #define UTIL_PRINTABLE_WIDTH 130 770

(

const char

*

data

,

782 #define UTIL_PrintableString(d,s,b,f) UTIL_PrintableStringEx((d),(s),(b),(f),0) 789

(

int

argc,

char

** argv);

809 #if defined(NCBI_OS_MSWIN) && defined(_UNICODE) 813 # define UTIL_ReleaseBuffer(x) UTIL_ReleaseBufferOnHeap(x) 815 # define UTIL_TcharToUtf8OnHeap(x) (x) 816 # define UTIL_TcharToUtf8(x) (x) 817 # define UTIL_Utf8ToTchar(x) (x) 818 # define UTIL_ReleaseBuffer(x) 824 # define UTIL_ReleaseBufferOnHeap(x)

ncbi::TMaskedQueryRegions mask

static const char * str(char *buf, int n)

MT_LOCK CORE_GetLOCK(void)

Get the lock handle that is to be used by the core internals.

ELOG_Level

Log severity level.

char * UTIL_PrintableStringEx(const char *data, size_t size, char *buf, TUTIL_PrintableFlags flags, int width)

Create a printable representation of a block of data of the specified size (or, if size is 0,...

void CORE_SetREG(REG rg)

Set the registry (no registry if "rg" is passed zero) – to be used by the core internals.

ECORE_Username

Select which username is the most preferable to obtain from the system.

void * UTIL_GenerateHMAC(const SHASH_Descriptor *hash, const void *text, size_t text_len, const void *key, size_t key_len, void *digest)

Generate an RFC2401 digest (HMAC).

unsigned int UTIL_Adler32_Update(unsigned int checksum, const void *ptr, size_t len)

Calculate/Update Adler-32 checksum NB: Initial checksum is "1".

unsigned int TLOG_FormatFlags

bitwise OR of "ELOG_FormatFlag"

time_t UTIL_Timezone(void)

Return timezone offset (in seconds West of UTC) for the current time zone.

void UTIL_ReleaseBufferOnHeap(const void *ptr)

#define UTIL_TcharToUtf8OnHeap(x)

Conversion from Unicode to UTF8, and back.

TLOG_FormatFlags CORE_SetLOGFormatFlags(TLOG_FormatFlags)

ELOG_FormatFlag

LOG formatting flags: what parts of the message to actually appear.

int UTIL_MatchesMask(const char *text, const char *mask)

Shortcut for UTIL_MatchesMaskEx(text, mask, 1), that is matching is done case-insensitively for the l...

#define UTIL_TcharToUtf8(x)

int CORE_SetLOGFILE_NAME(const char *logfile)

Same as CORE_SetLOGFILE_NAME_Ex(logfile, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal).

int UTIL_HelpRequested(int argc, char **argv)

Given the main()'s argc and argv return non-zero (true) if the arguments specify that only a help opt...

void CORE_SetLOCK(MT_LOCK lk)

Set the MT critical section lock/unlock handler – to be used by the core internals for protection of ...

LOG CORE_GetLOG(void)

Get the log handle that is to be used by the core internals (CORE LOG).

int CORE_SetLOGFILE_NAME_Ex(const char *logfile, ELOG_Level cut_off, ELOG_Level fatal_err)

Same as CORE_SetLOGFILE_Ex(fopen(logfile, "a"), cut_off, fatal_err, TRUE).

void LOG_ToFILE(LOG lg, FILE *fp, int auto_close)

Same as LOG_ToFILEx(lg, fp, eLOG_Trace, eLOG_Fatal, auto_close).

size_t CORE_GetVMPageSize(void)

Obtain virtual memory page size.

void CORE_SetLOGFILE_Ex(FILE *fp, ELOG_Level cut_off, ELOG_Level fatal_err, int auto_close)

Standard logging (CORE LOG) to the specified file stream.

REG CORE_GetREG(void)

Get the registry that is to be used by the core internals.

int TUTIL_PrintableFlags

Bitwise "OR" of EUTIL_PrintableFlags.

const char * CORE_GetUsername(char *buf, size_t bufsize)

Equivalent to CORE_GetUsernameEx(buf, bufsize, eNCBI_UsernameLogin) except that it always returns non...

const char * CORE_GetAppName(void)

Obtain current application name (toolkit dependent).

const char * CORE_GetUsernameEx(char *buf, size_t bufsize, ECORE_Username username)

Obtain and store in the buffer provided, the best (as possible) user name that matches the requested ...

int UTIL_MatchesMaskEx(const char *text, const char *mask, int ignore_case)

Match a given text with a given pattern mask.

void CORE_Msdelay(unsigned long ms)

Delay execution of the current thread by the specified number of milliseconds.

size_t UTIL_PrintableStringSize(const char *data, size_t size)

Calculate size of buffer needed to store printable representation of the block of data of the specifi...

char * CORE_GetNcbiRequestID(ENcbiRequestID reqid)

Obtain current NCBI request ID (if known, per thread).

char * LOG_ComposeMessage(const SLOG_Message *mess, TLOG_FormatFlags flags)

Compose a message using the "call_data" info.

void CORE_SetLOG(LOG lg)

Set the log handle (no logging if "lg" is passed zero) – to be used by the core internals (CORE LOG).

void CORE_SetLOGFILE(FILE *fp, int auto_close)

Same as CORE_SetLOGFILE_Ex(fp, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal, auto_close).

char * UTIL_NcbiLocalHostName(char *hostname)

Cut off well-known NCBI domain suffix out of the passed "hostname".

#define UTIL_Utf8ToTchar(x)

const char * NcbiMessagePlusError(int *dynamic, const char *message, int error, const char *descr)

Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,...

unsigned int UTIL_CRC32_Update(unsigned int checksum, const void *ptr, size_t len)

Calculate/Update CRC-32 checksum NB: Initial checksum is "0".

const char * CORE_GetPlatform(void)

Return NCBI platrofm ID (if known).

void LOG_ToFILE_Ex(LOG lg, FILE *fp, ELOG_Level cut_off, ELOG_Level fatal_err, int auto_close)

LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage.

ENcbiRequestID

NCBI request ID enumerator.

@ eCORE_UsernameLogin

login UID

@ eCORE_UsernameCurrent

process UID

@ eCORE_UsernameReal

real UID

@ eUTIL_PrintableFullOctal

deprecated

@ eUTIL_PrintableNoNewLine

deprecated

@ fUTIL_PrintableNoNewLine

Do not include graphical newlines.

@ fUTIL_PrintableFullOctal

No contactions in octals \ooo.

@ fLOG_FullOctal

do not do reduction in octal data bytes

@ fLOG_Default

fLOG_Short if NDEBUG, else fLOG_Full

@ fLOG_None

nothing but spec'd parts, msg and data

@ fLOG_OmitNoteLevel

do not add "NOTE" if level is eLOG_Note

@ eNcbiRequestID_SID

NCBI Session ID.

@ eNcbiTraceState

OpenTelemetry tracestate header.

@ eNcbiRequestID_HitID

NCBI Hit ID.

@ eNcbiTraceParent

OpenTelemetry traceparent header.

#define NCBI_XCONNECT_EXPORT

static void text(MDB_val *v)

const struct ncbi::grid::netcache::search::fields::SIZE size

const struct ncbi::grid::netcache::search::fields::KEY key

static PCRE2_SIZE bufsize

static SLJIT_INLINE sljit_ins ms(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static SLJIT_INLINE sljit_ins lg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Message and miscellaneous data to pass to log post callback FLOG_Handler.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4