本文整理汇总了C++中OUTMSG函数的典型用法代码示例。如果您正苦于以下问题:C++ OUTMSG函数的具体用法?C++ OUTMSG怎么用?C++ OUTMSG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUTMSG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ShowFiles
static rc_t ShowFiles(const KConfig* cfg, const Params* prm) {
rc_t rc = 0;
bool hasAny = false;
uint32_t count = 0;
KNamelist* names = NULL;
rc = KConfigListIncluded(cfg, &names);
if (rc == 0)
{ rc = KNamelistCount(names, &count); }
if (rc == 0) {
uint32_t i = 0;
if (prm->showMultiple) {
OUTMSG(("<!-- Configuration files -->\n"));
hasAny = true;
}
for (i = 0; i < count && rc == 0; ++i) {
const char* name = NULL;
if (rc == 0)
{ rc = KNamelistGet(names, i, &name); }
if (rc == 0) {
OUTMSG(("%s\n", name));
hasAny = true;
}
}
}
if (rc == 0 && hasAny)
{ OUTMSG(("\n")); }
RELEASE(KNamelist, names);
return rc;
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:33,代码来源:vdb-config.c
示例2: scan_mod_dir
static rc_t CC scan_mod_dir(const KDirectory* dir,
uint32_t type, const char* name, void* data)
{
rc_t rc = 0;
const char ext[] = SHLX;
assert(data);
if (strlen(name) > strlen(ext) + 1 &&
name[strlen(name) - strlen(ext) - 1] == '.')
{
char buf[PATH_MAX + 1];
rc = KDirectoryResolvePath
(dir, true, buf, sizeof buf, "%s/%s", data, name);
while (rc == 0) {
uint32_t type = KDirectoryPathType(dir, buf);
if (type & kptAlias) {
rc = KDirectoryResolveAlias
(dir, true, buf, sizeof buf, buf);
DISP_RC(rc, name);
}
else if (rc == 0) {
if (type == kptNotFound || type == kptBadPath) {
OUTMSG(("%s: %s\n", buf,
type == kptNotFound ? "not found" : "bad path"));
}
else { OUTMSG(("%s\n", buf)); }
break;
}
}
}
return rc;
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:35,代码来源:vdb-config.c
示例3: ShowEnv
static void ShowEnv(const Params* prm) {
bool hasAny = false;
const char * env_list [] = {
"KLIB_CONFIG",
"VDB_CONFIG",
"VDBCONFIG",
"LD_LIBRARY_PATH"
};
int i = 0;
if (prm->showMultiple) {
OUTMSG(("<!-- Environment -->\n"));
hasAny = true;
}
for (i = 0; i < sizeof env_list / sizeof env_list [ 0 ]; ++ i ) {
const char *eval = getenv ( env_list [ i ] );
if (eval) {
OUTMSG(("%s=%s\n", env_list [ i ], eval));
hasAny = true;
}
}
if (hasAny)
{ OUTMSG(("\n")); }
else { OUTMSG(("Environment variables are not found\n")); }
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:26,代码来源:vdb-config.c
示例4: Usage
rc_t CC Usage ( struct Args const * args )
{
rc_t rc = 0;
const char* progname = UsageDefaultName;
const char* fullpath = UsageDefaultName;
if (args == NULL)
rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
else
rc = ArgsProgram(args, &fullpath, &progname);
UsageSummary (progname);
OUTMSG (("\nInput: the stream of lines in the format: <key> <tab> <input variation>\n\n"));
OUTMSG (("\nOptions:\n"));
HelpOptionLine (NULL, VarExpand::OPTION_ALG, "value", VarExpand::USAGE_ALG);
XMLLogger_Usage();
HelpOptionsStandard ();
HelpVersion (fullpath, KAppVersion());
return rc;
}
开发者ID:Jingyu9,项目名称:sra-tools,代码行数:27,代码来源:var-expand.cpp
示例5: Usage
rc_t CC Usage( const Args* args )
{
rc_t rc;
int i;
const char* progname = UsageDefaultName;
const char* fullname = UsageDefaultName;
rc = ArgsProgram(args, &fullname, &progname);
UsageSummary(progname);
for(i = 0; i < MainArgsQty; i++ ) {
if( MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
}
}
OUTMSG(("\nOptions:\n"));
for(i = 0; i < MainArgsQty; i++ ) {
if( !MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
}
}
XMLLogger_Usage();
OUTMSG(("\n"));
HelpOptionsStandard();
HelpVersion(fullname, KAppVersion());
return rc;
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:28,代码来源:cg-load.c
示例6: PrintOS
rc_t PrintOS(bool xml) {
const char *b = xml ? " <Os>" : "Operating system: '";
const char *e = xml ? "</Os>" : "'\n";
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof osvi);
osvi.dwOSVersionInfoSize = sizeof osvi;
if (GetVersionEx(&osvi)) {
if (osvi.dwPlatformId == 2) {
return OUTMSG((
"%sMicrosoft Windows. Version %d.%d (Build %d: %s)%s\n", b,
osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber,
osvi.szCSDVersion, e));
}
else {
return OUTMSG((
"%sMicrosoft Windows. Version %d.%d (Build %d: %s). PlatformId %d%s\n",
b,
osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber,
osvi.szCSDVersion, osvi.dwPlatformId, e));
}
}
else {
return OUTMSG(("%sGetLastError(GetVersionEx()) = %d%s\n",
b, GetLastError(), e));
}
}
开发者ID:gconcepcion,项目名称:sratoolkit,代码行数:28,代码来源:PrintOS.c
示例7: Usage
rc_t CC Usage(const Args* args)
{
const char * progname = UsageDefaultName;
const char * fullpath = UsageDefaultName;
rc_t rc;
int i;
if (args == NULL)
rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
else
rc = ArgsProgram (args, &fullpath, &progname);
OUTMSG(( "\nUsage:\n\t%s [options] <table>\n\n", progname));
for(i = 0; i < MainArgsQty; i++ ) {
if( MainArgs[i].required && MainArgs[i].help ) {
HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
}
}
OUTMSG(("\nOptions:\n"));
for(i = 0; i < MainArgsQty; i++ ) {
if( !MainArgs[i].required && MainArgs[i].help ) {
HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
}
}
OUTMSG(("\n"));
HelpOptionsStandard();
HelpVersion(fullpath, KAppVersion());
return rc;
}
开发者ID:ncbi,项目名称:sra-tools,代码行数:30,代码来源:sra-makeidx.c
示例8: In
static rc_t In(const char* prompt, const char* def, char** read) {
rc_t rc = 0;
char buf[PATH_MAX + 1];
assert(prompt && read);
*read = NULL;
while (rc == 0 && (*read == NULL || read[0] == '\0')) {
OUTMSG(("%s", prompt));
if (def)
{ OUTMSG((" [%s]", def)); }
OUTMSG((": "));
rc = ReadStdinLine(buf, sizeof buf);
if (rc == 0) {
while (strlen(buf) > 0) {
char c = buf[strlen(buf) - 1];
if (c == '\n' || c == '\r')
{ buf[strlen(buf) - 1] = '\0'; }
else
{ break; }
}
if (buf[0] == '\0' && def)
{ strcpy(buf, def); }
if (buf[0]) {
*read = strdup(buf);
if (*read == NULL) {
rc = RC
(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
}
}
}
}
return rc;
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:32,代码来源:vdb-config.c
示例9: _tee_shm_attach_dma_buf
static int _tee_shm_attach_dma_buf(struct dma_buf *dmabuf,
struct device *dev,
struct dma_buf_attachment *attach)
{
struct tee_shm_attach *tee_shm_attach;
struct tee_shm *shm;
struct tee *tee;
shm = dmabuf->priv;
tee = shm->tee;
INMSG();
tee_shm_attach = devm_kzalloc(_DEV(tee),
sizeof(*tee_shm_attach), GFP_KERNEL);
if (!tee_shm_attach) {
OUTMSG(-ENOMEM);
return -ENOMEM;
}
tee_shm_attach->dir = DMA_NONE;
attach->priv = tee_shm_attach;
OUTMSG(0);
return 0;
}
开发者ID:flowher,项目名称:optee_linuxdriver,代码行数:26,代码来源:tee_shm.c
示例10: _tee_shm_detach_dma_buf
static void _tee_shm_detach_dma_buf(struct dma_buf *dmabuf,
struct dma_buf_attachment *attach)
{
struct tee_shm_attach *tee_shm_attach = attach->priv;
struct sg_table *sgt;
struct tee_shm *shm;
struct tee *tee;
shm = dmabuf->priv;
tee = shm->tee;
INMSG();
if (!tee_shm_attach) {
OUTMSG(0);
return;
}
sgt = &tee_shm_attach->sgt;
if (tee_shm_attach->dir != DMA_NONE)
dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents,
tee_shm_attach->dir);
sg_free_table(sgt);
devm_kfree(_DEV(tee), tee_shm_attach);
attach->priv = NULL;
OUTMSG(0);
}
开发者ID:flowher,项目名称:optee_linuxdriver,代码行数:29,代码来源:tee_shm.c
示例11: PrintOS
rc_t PrintOS(bool xml) {
int ret = 1;
struct utsname unameData;
memset(&unameData, 0, sizeof unameData);
errno = 0;
ret = uname(&unameData);
if (ret != 0) {
if (xml) {
OUTMSG((" <Os>"));
perror("uname returned : ");
OUTMSG(("</Os>\n"));
}
else {
perror("uname returned : ");
}
return 0;
}
else {
const char *b = xml ? " <Os>" : "Operating system: '";
const char *e = xml ? "</Os>" : "'\n";
return OUTMSG(("%s%s %s %s %s %s%s\n", b,
unameData.sysname, unameData.nodename, unameData.release,
unameData.version, unameData.machine, e));
}
}
开发者ID:Bhumi28,项目名称:sra-tools,代码行数:29,代码来源:PrintOS.c
示例12: CoreUsage
static void CoreUsage( const char* prog, const SRADumperFmt* fmt, bool brief, int exit_status )
{
OUTMSG(( "\n"
"Usage:\n"
" %s [options] <path [path...]>\n"
" %s [options] [ -A ] <accession>\n"
"\n", prog, prog));
if ( !brief )
{
if ( fmt->usage )
{
rc_t rc = fmt->usage( fmt, KMainArgs, 1 );
if ( rc != 0 )
{
LOGERR(klogErr, rc, "Usage print failed");
}
}
else
{
int k, i;
const SRADumperFmt_Arg* d[ 2 ] = { KMainArgs, NULL };
d[ 1 ] = fmt->arg_desc;
for ( k = 0; k < ( sizeof( d ) / sizeof( d[0] ) ); k++ )
{
for ( i = 1;
d[k] != NULL && ( d[ k ][ i ].abbr != NULL || d[ k ][ i ].full != NULL );
++ i )
{
if ( ( !fmt->gzip && strcmp( d[ k ][ i ].full, "gzip" ) == 0 ) ||
( !fmt->bzip2 && strcmp (d[ k ][ i ].full, "bzip2" ) == 0 ) )
{
continue;
}
if ( k > 0 && i == 0 )
{
OUTMSG(("\nFormat options:\n\n"));
}
HelpOptionLine( d[ k ][ i ].abbr, d[ k ][ i ].full,
d[ k ][ i ].param, (const char**)( d[ k ][ i ].descr ) );
if ( k == 0 && i == 0 )
{
OUTMSG(( "\nOptions:\n\n" ));
}
}
}
}
}
else
{
OUTMSG(( "Use option --help for more information\n" ));
}
HelpVersion( prog, KAppVersion() );
exit( exit_status );
}
开发者ID:mariux,项目名称:sratoolkit,代码行数:56,代码来源:core.c
示例13: progress
static void progress(const char *acc, uint64_t sz,
uint64_t srcSz, uint64_t hSrc, char sfSrc, KTime_t date)
{
if (sz > 0) {
if (srcSz > 0) {
uint64_t p = 100 * sz / srcSz;
char sf = 'B';
uint64_t fr = 0;
uint64_t h = humanize(sz, &sf, &fr);
if (p > 0) {
if (sfSrc != 'B' && sf != 'B') {
if (fr == 0) {
if (date == 0) {
OUTMSG(("%s %,ld/%,ld %ld%c/%,ld%c %ld%% \r",
acc, sz, srcSz, h,sf,hSrc,sfSrc,p));
}
else {
OUTMSG(("%s %,ld/%,ld %ld%c/%,ld%c %ld%% %ld \r",
acc, sz, srcSz, h,sf,hSrc,sfSrc,p,
KTimeStamp() - date));
}
}
else {
OUTMSG(("%s %,ld/%,ld %ld.%03ld%c/%,ld%c %ld%% \r",
acc, sz, srcSz,h,fr,sf,hSrc,sfSrc,p));
}
}
else {
OUTMSG(("%s %,ld/%,ld %ld%% \r",
acc, sz, srcSz, p));
}
}
else {
if (sfSrc != 'B' && sf != 'B') {
if (fr == 0) {
OUTMSG((
"%s %,ld/%,ld %ld%c/%ld%c \r",
acc, sz,srcSz,h, sf,hSrc,sfSrc));
}
else {
OUTMSG((
"%s %,ld/%,ld %ld.%03ld%c/%ld%c \r",
acc, sz,srcSz,h, fr,sf,hSrc,sfSrc));
}
}
else {
OUTMSG(("%s %,ld/%,ld \r", acc, sz, srcSz));
}
}
}
else {
OUTMSG(("%s %,ld \r", acc, sz));
}
}
else {
OUTMSG((" \r%s\r", acc));
}
}
开发者ID:thelegend6420,项目名称:ncbi-vdb,代码行数:58,代码来源:connect.c
示例14: KMain
rc_t CC KMain(int argc, char *argv[]) {
OUTMSG((
"WARNING: vdb-passwd IS OBSOLETE AND SHOULD NOT BE USED.\n"
"\n"
"\n"
"To access dbGaP data you need:\n"
"\n"
"- Make sure you have the latest version of SRA Toolkit installed:\n"
"https://github.com/ncbi/sra-tools/wiki/Downloads\n"
"\n"
"- Have permission to access controlled-access data for a dbGaP project;\n"
"\n"
"- Get dbGaP repository key (ngc file);\n"
"\n"
"- Import the dbGaP repository key to SRA Toolkit.\n"
" It will set up the project's workspace directory.\n"
"\n"
"- Change directory to the project's workspace.\n"
"\n"
"N.B. MAKE SURE YOU DO NOT HAVE A VDB_PWFILE ENVIRONMENT VARIABLE SET !!!\n"
"\n"
"Now you should be able to work with encrypted data.\n"
"The SRA Toolkit will work with encrypted SRA data files,\n"
"there is no need to decrypt the read data.\n"
"\n"
"The complete instructions are:\n"
"http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=dbgap_use\n"
"\n"
"Send questions/bug reports to [email protected]\n"));
return RC(rcExe, rcProcess, rcExecuting, rcProcess, rcUnsupported);
}
开发者ID:Bhumi28,项目名称:sra-tools,代码行数:31,代码来源:vdb-passwd.c
示例15: _tee_shm_dma_buf_mmap
static int _tee_shm_dma_buf_mmap(struct dma_buf *dmabuf,
struct vm_area_struct *vma)
{
struct tee_shm *shm = dmabuf->priv;
size_t size = vma->vm_end - vma->vm_start;
struct tee *tee;
int ret;
pgprot_t prot;
unsigned long pfn;
tee = shm->ctx->tee;
pfn = shm->paddr >> PAGE_SHIFT;
INMSG();
if (shm->flags & TEE_SHM_CACHED)
prot = vma->vm_page_prot;
else
prot = pgprot_noncached(vma->vm_page_prot);
ret =
remap_pfn_range(vma, vma->vm_start, pfn, size, prot);
if (!ret)
vma->vm_private_data = (void *)shm;
dev_dbg(_DEV(shm->ctx->tee), "%s: map the shm ([email protected]=%p,s=%dKiB) => %x\n",
__func__, (void *)shm->paddr, (int)size / 1024,
(unsigned int)vma->vm_start);
OUTMSG(ret);
return ret;
}
开发者ID:flowher,项目名称:optee_linuxdriver,代码行数:33,代码来源:tee_shm.c
示例16: continue_one_thread
/* Resume all artificially suspended threads if we are continuing
execution. */
static int
continue_one_thread (struct inferior_list_entry *this_thread, void *id_ptr)
{
struct thread_info *thread = (struct thread_info *) this_thread;
int thread_id = * (int *) id_ptr;
win32_thread_info *th = inferior_target_data (thread);
if ((thread_id == -1 || thread_id == th->tid)
&& th->suspended)
{
if (th->context.ContextFlags)
{
win32_set_thread_context (th);
th->context.ContextFlags = 0;
}
if (ResumeThread (th->h) == (DWORD) -1)
{
DWORD err = GetLastError ();
OUTMSG (("warning: ResumeThread failed in continue_one_thread, "
"(error %d): %s\n", (int) err, strwinerror (err)));
}
th->suspended = 0;
}
return 0;
}
开发者ID:Claruarius,项目名称:stblinux-2.6.37,代码行数:29,代码来源:win32-low.c
示例17: thread_rec
/* Find a thread record given a thread id. If GET_CONTEXT is set then
also retrieve the context for this thread. */
static win32_thread_info *
thread_rec (ptid_t ptid, int get_context)
{
struct thread_info *thread;
win32_thread_info *th;
thread = (struct thread_info *) find_inferior_id (&all_threads, ptid);
if (thread == NULL)
return NULL;
th = inferior_target_data (thread);
if (get_context && th->context.ContextFlags == 0)
{
if (!th->suspended)
{
if (SuspendThread (th->h) == (DWORD) -1)
{
DWORD err = GetLastError ();
OUTMSG (("warning: SuspendThread failed in thread_rec, "
"(error %d): %s\n", (int) err, strwinerror (err)));
}
else
th->suspended = 1;
}
win32_get_thread_context (th);
}
return th;
}
开发者ID:Claruarius,项目名称:stblinux-2.6.37,代码行数:32,代码来源:win32-low.c
示例18: TEEC_InitializeContext
/*
* This function initializes a new TEE Context, connecting this Client
* application to the TEE identified by the name name.
*
* name == NULL will give the default TEE.
*/
TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context)
{
int name_size = 0;
const char* _name = name;
INMSG("%s", name);
if (context == NULL)
return TEEC_ERROR_BAD_PARAMETERS;
/*
* Specification says that when no name is provided it should fall back
* on a predefined TEE.
*/
if (name == NULL)
_name = TEE_TZ_DEVICE_NAME;
name_size = snprintf(context->devname, TEEC_MAX_DEVNAME_SIZE,
"/dev/%s", _name);
if (name_size >= TEEC_MAX_DEVNAME_SIZE)
return TEEC_ERROR_BAD_PARAMETERS; /* Device name truncated */
context->fd = open(context->devname, O_RDWR);
if (context->fd == -1)
return TEEC_ERROR_ITEM_NOT_FOUND;
pthread_mutex_init(&mutex, NULL);
OUTMSG("");
return TEEC_SUCCESS;
}
开发者ID:Elooon,项目名称:optee_client,代码行数:38,代码来源:tee_client_api.c
示例19: Usage
rc_t CC Usage (const Args * args)
{
const char * progname = UsageDefaultName;
const char * fullpath = UsageDefaultName;
rc_t rc;
if (args == NULL)
rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
else
rc = ArgsProgram (args, &fullpath, &progname);
UsageSummary (progname);
OUTMSG (("Options:\n"));
rc = string_printf (buff, sizeof buff, NULL, "%s", tablePath);
HelpOptionLine (ALIAS_TABLE, OPTION_TABLE, "path", table_usage);
rc = string_printf (buff, sizeof buff, NULL, "Number of Rows. Defaults to %u", ROWS);
HelpOptionLine (ALIAS_ROW, OPTION_ROW, "row", row_usage);
HelpOptionsStandard ();
HelpVersion (fullpath, KAppVersion());
return rc;
}
开发者ID:gconcepcion,项目名称:sratoolkit,代码行数:29,代码来源:rowwritetest.c
示例20: whack_ref_node
static void CC whack_ref_node( BSTNode *n, void *data )
{
ref_node * node = ( ref_node * )n;
bool * info = ( bool * )data;
if ( *info )
{
OUTMSG(( "node >%S< used for %lu bytes (%lu active)\n",
node->name, node->bytes_requested, node->active_positions ));
}
if ( node->cur != NULL )
{
VCursorRelease( node->cur );
}
if ( node->tab != NULL )
{
VTableRelease( node->tab );
}
if ( node->name != NULL )
{
StringWhack ( node->name );
}
free( n );
}
开发者ID:ncbi,项目名称:sra-tools,代码行数:25,代码来源:ref_exclude.c
注:本文中的OUTMSG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论