您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ str_printf函数代码示例

51自学网 2021-06-03 08:26:34
  C++
这篇教程C++ str_printf函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中str_printf函数的典型用法代码示例。如果您正苦于以下问题:C++ str_printf函数的具体用法?C++ str_printf怎么用?C++ str_printf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了str_printf函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: cf_zones_out

/* * Convert node address to outbound base name */char *bink_out_name(Node *node){    static char buf[MAXPATH];    char *out, *outbound;    #ifndef AMIGADOS_4D_OUTBOUND    out = cf_zones_out(node->zone);#else    out = cf_zones_out(0);#endif    if(!out)	return NULL;    outbound = cf_p_btbasedir();    if(!outbound)	return NULL;#ifdef AMIGADOS_4D_OUTBOUND    str_printf(buf, sizeof(buf), "%s/%s/%d.%d.%d.%d.",	       outbound, out, node->zone,	       node->net, node->node, node->point);#else        if(node->point > 0)	str_printf(buf, sizeof(buf), "%s/%s/%04x%04x.pnt/0000%04x.",		   outbound, out, node->net, node->node, node->point);    else	str_printf(buf, sizeof(buf), "%s/%s/%04x%04x.",		   outbound, out, node->net, node->node);#endif /**AMIGADOS_4D_OUTBOUND**/    return buf;}
开发者ID:oldprogs,项目名称:fidogate-ds,代码行数:34,


示例2: get_prompt_str

static void get_prompt_str(struct gstr *r, struct property *prop){	int i, j;	struct menu *submenu[8], *menu;	str_printf(r, _("Prompt: %s/n"), _(prop->text));	str_printf(r, _("  Defined at %s:%d/n"), prop->menu->file->name,		prop->menu->lineno);	if (!expr_is_yes(prop->visible.expr)) {		str_append(r, _("  Depends on: "));		expr_gstr_print(prop->visible.expr, r);		str_append(r, "/n");	}	menu = prop->menu->parent;	for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)		submenu[i++] = menu;	if (i > 0) {		str_printf(r, _("  Location:/n"));		for (j = 4; --i >= 0; j += 2) {			menu = submenu[i];			str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));			if (menu->sym) {				str_printf(r, " (%s [=%s])", menu->sym->name ?					menu->sym->name : _("<choice>"),					sym_get_string_value(menu->sym));			}			str_append(r, "/n");		}	}}
开发者ID:Christopher83,项目名称:linaro_crosstool-ng,代码行数:30,


示例3: vgpu_uop_get_markup

void vgpu_uop_get_markup(struct vgpu_uop_t *uop, char *buf_ptr, int buf_size){	char vliw_elems[5] = { 'x', 'y', 'z', 'w', 't' };	char *uop_color[3] = { "darkgreen", "red", "blue" };	int i;	if (uop->engine == VGPU_ENGINE_ALU)	{		str_printf(&buf_ptr, &buf_size, "<span color=/"%s/">",			uop_color[uop->engine]);		for (i = 0; i < 5; i++)		{			if (uop->vliw_slot[i][0])				str_printf(&buf_ptr, &buf_size, "  <b>%c:</b> %s",					vliw_elems[i], uop->vliw_slot[i]);		}		str_printf(&buf_ptr, &buf_size, "</span>");	}	else	{		str_printf(&buf_ptr, &buf_size, "<span color=/"%s/">%s</span>",			uop_color[uop->engine], uop->name);	}}
开发者ID:abhaykadam,项目名称:vm,代码行数:25,


示例4: playback_get_title

char * playback_get_title (void){    g_return_val_if_fail (playing, NULL);    wait_until_ready ();    char s[32];    if (current_length)    {        int len = current_length / 1000;        if (len < 3600)            snprintf (s, sizeof s, get_bool (NULL, "leading_zero") ?             " (%02d:%02d)" : " (%d:%02d)", len / 60, len % 60);        else            snprintf (s, sizeof s, " (%d:%02d:%02d)", len / 3600, (len / 60) %             60, len % 60);    }    else        s[0] = 0;    if (get_bool (NULL, "show_numbers_in_pl"))        return str_printf ("%d. %s%s", 1 + playlist_get_position         (playlist_get_playing ()), current_title, s);    return str_printf ("%s%s", current_title, s);}
开发者ID:i-tek,项目名称:audacious,代码行数:27,


示例5: mips_inst_dump_RD

void mips_inst_dump_RD(char **inst_str_ptr, int *inst_str_size,	struct mips_inst_t *inst){	unsigned int rd;	int token_len;	rd = inst->dword.standard.rd;	if (mips_token_comp(inst->info->name, "RDHWR", &token_len))		str_printf(inst_str_ptr, inst_str_size, "$%d", rd);	else if (mips_token_comp(inst->info->name, "JALR", &token_len))	{		if (rd == (int) 31)		{		}		else		{			str_printf(inst_str_ptr, inst_str_size, ",");			str_printf(inst_str_ptr, inst_str_size, "%s",				mips_reg_name[rd]);		}	}	else		str_printf(inst_str_ptr, inst_str_size, "%s",			mips_reg_name[rd]);}
开发者ID:HackLinux,项目名称:Coherence_Structures,代码行数:26,


示例6: defined

    /* log the line to the UI (GUI, stderr, etc.) */    if(log_mode==LOG_MODE_ERROR ||            (log_mode==LOG_MODE_INFO && level<LOG_DEBUG) ||#if defined(USE_WIN32) || defined(USE_JNI)            level<=opt->log_level#else            (level<=opt->log_level &&            global_options.option.log_stderr)#endif            )        ui_new_log(line);    str_free(line);}#ifdef __GNUC__#pragma GCC diagnostic push#pragma GCC diagnostic ignored "-Wformat"#pragma GCC diagnostic ignored "-Wformat-extra-args"#endif /* __GNUC__ */char *log_id(CLI *c) {    const char table[62]=        "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";    unsigned char rnd[22];    char *uniq;    size_t i;    unsigned long tid;    switch(c->opt->log_id) {    case LOG_ID_SEQUENTIAL:        return str_printf("%llu", c->seq);    case LOG_ID_UNIQUE:        if(RAND_bytes(rnd, sizeof rnd)<=0) /* log2(62^22)=130.99 */            return str_dup("error");        for(i=0; i<sizeof rnd; ++i) {            rnd[i]&=63;            while(rnd[i]>=62) {                if(RAND_bytes(rnd+i, 1)<=0)                    return str_dup("error");                rnd[i]&=63;            }        }        uniq=str_alloc(sizeof rnd+1);        for(i=0; i<sizeof rnd; ++i)            uniq[i]=table[rnd[i]];        uniq[sizeof rnd]='/0';        return uniq;    case LOG_ID_THREAD:        tid=stunnel_thread_id();        if(!tid) /* currently USE_FORK */            tid=stunnel_process_id();        return str_printf("%lu", tid);    }    return str_dup("error");}
开发者ID:mtrojnar,项目名称:stunnel,代码行数:55,


示例7: get_symbol_str

static void get_symbol_str(struct gstr *r, struct symbol *sym){	bool hit;	struct property *prop;	if (sym && sym->name)		str_printf(r, "Symbol: %s [=%s]/n", sym->name,		                                    sym_get_string_value(sym));	for_all_prompts(sym, prop)		get_prompt_str(r, prop);	hit = false;	for_all_properties(sym, prop, P_SELECT) {		if (!hit) {			str_append(r, "  Selects: ");			hit = true;		} else			str_printf(r, " && ");		expr_gstr_print(prop->expr, r);	}	if (hit)		str_append(r, "/n");	if (sym->rev_dep.expr) {		str_append(r, _("  Selected by: "));		expr_gstr_print(sym->rev_dep.expr, r);		str_append(r, "/n");	}	str_append(r, "/n/n");}
开发者ID:16rd,项目名称:rt-n56u,代码行数:28,


示例8: os_dirdeletefull

uint     STDCALL os_dirdeletefull( pstr name ){ #ifdef WINDOWS   str  stemp;   WIN32_FIND_DATA  data;   pvoid            find;   str_init( &stemp );   str_printf( &stemp, "%s%c*.*", str_ptr( name ), SLASH );   find = FindFirstFile( str_ptr( &stemp ), &data );   if ( find != INVALID_HANDLE_VALUE )   {      do {         if ( data.cFileName[0] == '.' && ( !data.cFileName[1] ||            ( data.cFileName[1] == '.' && !data.cFileName[2] )))            continue;         str_printf( &stemp, "%s%c%s", str_ptr( name ), SLASH, data.cFileName );         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )            os_dirdeletefull( &stemp );         else            os_filedelete( &stemp );      } while ( FindNextFile( find, &data ));      FindClose( find );   }   str_delete( &stemp ); #endif   return os_dirdelete( name );}
开发者ID:Refandler,项目名称:gentee,代码行数:32,


示例9: work_group_info_popup

void work_group_info_popup(void *item){	char buf[10000];	char *buf_ptr = buf;	int buf_size = sizeof buf;	struct vgpu_work_group_t *work_group = item;	if (!work_group)		return;		/* Text */	str_printf(&buf_ptr, &buf_size, "<b>Work-Group %d</b>/n"		"/n", work_group->id);		/* Work-items and wavefronts */	str_printf(&buf_ptr, &buf_size,		"Name:         <b>WG-%d</b>/n"		"Work-items:   [ <b>WI-%d</b> ... <b>WI-%d</b> ]  (%d work-items)/n"		"Wavefronts:   [ <b>WF-%d</b> ... <b>WF-%d</b> ]  (%d wavefronts)/n"		"/n",		work_group->id,		work_group->work_item_id_first, work_group->work_item_id_last, work_group->work_item_count,		work_group->wavefront_id_first, work_group->wavefront_id_last, work_group->wavefront_count);		/* Show */	info_popup_show(buf);}
开发者ID:abhaykadam,项目名称:vm,代码行数:28,


示例10: PSLIST_FOREACH

	PSLIST_FOREACH(info, sl) {		cq_info_t *cqi = sl->data;		cq_info_check(cqi);		if (THREAD_INVALID_ID == cqi->stid)			str_printf(s, "%-2s ", "-");		else			str_printf(s, "%-2d ", cqi->stid);		str_catf(s, "%-6zu ", cqi->event_count);		str_catf(s, "%-4zu ", cqi->periodic_count);		str_catf(s, "%-4zu ", cqi->idle_count);		str_catf(s, "%-5s ",			0 == cqi->last_idle ?				"-" : compact_time(delta_time(tm_time(), cqi->last_idle)));		str_catf(s, "%'6d ", cqi->period);		str_catf(s, "%10zu ", cqi->heartbeat_count);		str_catf(s, "%10zu ", cqi->triggered_count);		str_catf(s, "/"%s/"%*s", cqi->name,			(int) (maxlen - vstrlen(cqi->name)), "");		if (cqi->parent != NULL)			str_catf(s, " (%s)", cqi->parent);		str_putc(s, '/n');		shell_write(sh, str_2c(s));	}
开发者ID:gtk-gnutella,项目名称:gtk-gnutella,代码行数:25,


示例11: mips_inst_dump_SA

/********************************************************************************* *                           Dump functions ********************************************************************************/void mips_inst_dump_SA(char **inst_str_ptr, int *inst_str_size,                       struct mips_inst_t *inst) {  unsigned int sa;  sa = inst->dword.standard.sa;  if (sa != 0)    str_printf(inst_str_ptr, inst_str_size, "0x%x", sa);  else    str_printf(inst_str_ptr, inst_str_size, "%d", sa);}
开发者ID:xianggong,项目名称:multi2sim42,代码行数:13,


示例12: arch_get_names

/* Get a list of all possible names for architectures. This function is usefull * to print an error message with the valid values for architectures when * processing user input. */void arch_get_names(char *str, int size) {  char *comma = "";  int i;  str_printf(&str, &size, "{");  for (i = 0; i < arch_list_count; i++) {    str_printf(&str, &size, "%s%s", comma, arch_list[i]->name);    comma = "|";  }  str_printf(&str, &size, "}");}
开发者ID:xianggong,项目名称:multi2sim42,代码行数:14,


示例13: nodeapp_compute_paths

void nodeapp_compute_paths() {    nodeapp_compute_paths_osdep();    nodeapp_bundled_node_path = getenv(NODEAPP_NODE_BINARY_OVERRIDE_ENVVAR);    if (!nodeapp_bundled_node_path || !*nodeapp_bundled_node_path)        nodeapp_bundled_node_path = str_printf("%s/%s", nodeapp_bundled_resources_dir, NODEAPP_NODE_BINARY);    nodeapp_bundled_backend_js = getenv(NODEAPP_BACKEND_JS_OVERRIDE_ENVVAR);    if (!nodeapp_bundled_backend_js || !*nodeapp_bundled_backend_js)        nodeapp_bundled_backend_js = str_printf("%s/%s", nodeapp_bundled_resources_dir, NODEAPP_BACKEND_JS);}
开发者ID:rlugojr,项目名称:nodeapp,代码行数:11,


示例14: mips_inst_dump_FS

void mips_inst_dump_FS(char **inst_str_ptr, int *inst_str_size,                       struct mips_inst_t *inst) {  unsigned int fs;  int token_len;  fs = inst->dword.standard.rd;  if ((mips_token_comp(inst->info->name, "CFC1", &token_len)) ||      (mips_token_comp(inst->info->name, "CTC1", &token_len)))    str_printf(inst_str_ptr, inst_str_size, "$%d", fs);  else    str_printf(inst_str_ptr, inst_str_size, "$f%d", fs);}
开发者ID:xianggong,项目名称:multi2sim42,代码行数:12,


示例15: switch

void Timed::unix_signal(int signo){  switch(signo)  {    default:      log_info("unix signal %d [%s] detected", signo, strsignal(signo)) ;      break ;    case SIGCHLD:      int status ;      while(pid_t pid = waitpid(-1, &status, WNOHANG))      {        if(pid==-1 && errno==EINTR)        {          log_info("waitpid() interrupted, retrying...") ;          continue ;        }        else if(pid==-1)        {          if(errno!=ECHILD)            log_error("waitpid() failed: %m") ;          break ;        }        unsigned cookie = children.count(pid) ? children[pid] : 0 ;        string name = str_printf("the child pid=%d", pid) ;        if(cookie)          name += str_printf(" [cookie=%d]", cookie) ;        else          name += " (unknown cookie)" ;        if(WIFEXITED(status))          log_info("%s exited with status %d", name.c_str(), WEXITSTATUS(status)) ;        else if(WIFSIGNALED(status))          log_info("%s killed by signal %d", name.c_str(), WTERMSIG(status)) ;        else        {          log_info("%s changed status", name.c_str()) ;          continue ;        }        children.erase(pid) ;      }      break ;    case SIGINT:      log_info("Keyboard interrupt, oh weh... bye") ;      quit() ;      break ;    case SIGTERM:      log_info("Termination signal... bye") ;      quit() ;      break ;  }}
开发者ID:special,项目名称:timed,代码行数:50,


示例16: metronom_get_cp

static bool_t metronom_get_cp(const char *filename, metronom_t *pmetronom, char **str){    int count;    count = sscanf(filename, "tact://%d*%d/%d",        &pmetronom->bpm, &pmetronom->num, &pmetronom->den);    if (count != 1 && count != 3)        return FALSE;    if (pmetronom->bpm < MIN_BPM || pmetronom->bpm > MAX_BPM)        return FALSE;    if (count == 1)    {        pmetronom->num = 1;        pmetronom->den = 1;        pmetronom->id = 0;    }    else    {        bool_t flag;        int id;        if (pmetronom->num == 0 || pmetronom->den == 0)            return FALSE;        flag = FALSE;        for (id = 0; id < TACT_ID_MAX && !flag; id++)        {            if (pmetronom->num == tact_id[id][0] && pmetronom->den == tact_id[id][1])                flag = TRUE;        }        if (!flag)            return FALSE;        else            pmetronom->id = id;    }    if (str == NULL)        return TRUE;    if (pmetronom->num == 1 && pmetronom->den == 1)        *str = str_printf (_("Tact generator: %d bpm"), pmetronom->bpm);    else        *str = str_printf (_("Tact generator: %d bpm %d/%d"), pmetronom->bpm, pmetronom->num, pmetronom->den);    return TRUE;}
开发者ID:rapidrabbit,项目名称:audacious-plugins,代码行数:50,


示例17: test_printf

void test_printf(void) {    str test;    str_create(&test);    str_printf(&test, "%s, %d/n", "this is a test", 100);    CU_ASSERT(test.len == 20);    CU_ASSERT_PTR_NOT_NULL(test.data);    CU_ASSERT(test.data[20] == 0);    str_printf(&test, "over %d thousaaand!/n", 9);    CU_ASSERT(test.len == 39);    CU_ASSERT_PTR_NOT_NULL(test.data);    CU_ASSERT(test.data[39] == 0);}
开发者ID:omf2097,项目名称:openomf,代码行数:15,


示例18: _findMetaXMLfiles

static void _findMetaXMLfiles(META_ROOT *meta, const char *device_path){    BD_DIR_H *dir;    BD_DIRENT ent;    char *path = NULL;    path = str_printf("%s" DIR_SEP "BDMV" DIR_SEP "META" DIR_SEP "DL", device_path);    dir = dir_open(path);    if (dir == NULL) {        BD_DEBUG(DBG_DIR, "Failed to open meta dir %s/n", path);        X_FREE(path);        return;    }    int res;    for (res = dir_read(dir, &ent); !res; res = dir_read(dir, &ent)) {        if (ent.d_name[0] == '.')            continue;        else if (ent.d_name != NULL && strncasecmp(ent.d_name, "bdmt_", 5) == 0) {            uint8_t i = meta->dl_count;            meta->dl_count++;            meta->dl_entries = realloc(meta->dl_entries, (meta->dl_count*sizeof(META_DL)));            meta->dl_entries[i].filename = str_dup(ent.d_name);            strncpy(meta->dl_entries[i].language_code, ent.d_name+5,3);            meta->dl_entries[i].language_code[3] = '/0';            str_tolower(meta->dl_entries[i].language_code);        }    }    dir_close(dir);    X_FREE(path);}
开发者ID:hongxchen,项目名称:RTPServer,代码行数:29,


示例19: mips_inst_dump_RT

void mips_inst_dump_RT(char **inst_str_ptr, int *inst_str_size,                       struct mips_inst_t *inst) {  unsigned int rt;  rt = inst->dword.standard.rt;  str_printf(inst_str_ptr, inst_str_size, "%s", mips_reg_name[rt]);}
开发者ID:xianggong,项目名称:multi2sim42,代码行数:7,


示例20: create_pid

NOEXPORT int create_pid(void) {    int pf;    char *pid;    if(!global_options.pidfile) {        s_log(LOG_DEBUG, "No pid file being created");        return 0;    }    if(global_options.pidfile[0]!='/') {        /* to prevent creating pid file relative to '/' after daemonize() */        s_log(LOG_ERR, "Pid file (%s) must be full path name", global_options.pidfile);        return 1;    }    global_options.dpid=(unsigned long)getpid();    /* silently remove old pid file */    unlink(global_options.pidfile);    pf=open(global_options.pidfile, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644);    if(pf==-1) {        s_log(LOG_ERR, "Cannot create pid file %s", global_options.pidfile);        ioerror("create");        return 1;    }    pid=str_printf("%lu/n", global_options.dpid);    if(write(pf, pid, strlen(pid))<(int)strlen(pid)) {        s_log(LOG_ERR, "Cannot write pid file %s", global_options.pidfile);        ioerror("write");        return 1;    }    str_free(pid);    close(pf);    s_log(LOG_DEBUG, "Created pid file %s", global_options.pidfile);    atexit(delete_pid);    return 0;}
开发者ID:NickolasLapp,项目名称:stunnel,代码行数:35,


示例21: _load_aes_keys

static int _load_aes_keys(bdplus_aes_key_t *aes_keys, const char *base){    char *path = str_printf("%s/" AES_KEYS_FILE, base);    uint8_t *keys;    uint32_t size = 0;    uint32_t num_keys, ii;    if (!path) {        return -1;    }    keys = (uint8_t *)file_load(path, &size);    X_FREE(path);    num_keys = size / 16;    if (num_keys > MAX_AES_KEYS) {        num_keys = MAX_AES_KEYS;    }    if (num_keys * 16 != size) {        BD_DEBUG(DBG_FILE | DBG_CRIT, "Invalid AES key file size/n");    }    for (ii = 0; ii < num_keys; ii++) {        memcpy(aes_keys[ii].key, keys + 16*ii, 16);    }    X_FREE(keys);    return num_keys > 6 ? (int)num_keys : -1;}
开发者ID:mwgoldsmith,项目名称:bdplus,代码行数:29,


示例22: output_invocation

void output_invocation(long syscall_id, syscall_arg *args){    char str[MAX_LINE_SIZE];    const syscall_info *info;    int written;    unsigned i;    info = get_syscall_info(syscall_id);    if (info) {        written = snprintf(str, MAX_LINE_SIZE, "%s(", info->name);        if (info->arg_count) {            write_arg(args[0], info->args_type[0], str, &written);            for (i = 1; i < info->arg_count; ++i) {                str_printf(str, &written, ", ");                write_arg(args[i], info->args_type[i], str, &written);            }        }        written = written > MAX_LINE_SIZE ? MAX_LINE_SIZE : written;        snprintf(str + written, MAX_LINE_SIZE - written, ")");    }    else        snprintf(str, MAX_LINE_SIZE, PLACEHOLDER_TEXT" (%ld)", syscall_id);    fprintf(stderr, "%-*s", MIN_PADDING - 1, str);}
开发者ID:Globidev,项目名称:strace,代码行数:25,


示例23: _bdj_init

static int _bdj_init(BDJAVA *bdjava, JNIEnv *env){    // initialize class org.videolan.Libbluray    jclass init_class;    jmethodID init_id;    if (!bdj_get_method(env, &init_class, &init_id,                        "org/videolan/Libbluray", "init", "(JLjava/lang/String;)V")) {        return 0;    }    char* id_path = str_printf("%s/CERTIFICATE/id.bdmv", bdjava->path);    BDID_DATA *id  = bdid_parse(id_path);    jlong param_bdjava_ptr = (jlong)(intptr_t) bdjava;    jstring param_disc_id = (*env)->NewStringUTF(env,                                                 id ? id->disc_id : "00000000000000000000000000000000");    (*env)->CallStaticVoidMethod(env, init_class, init_id,                                 param_bdjava_ptr, param_disc_id);    (*env)->DeleteLocalRef(env, init_class);    (*env)->DeleteLocalRef(env, param_disc_id);    free(id_path);    bdid_free(&id);    return 1;}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:25,


示例24: x86_inst_moffs_addr_dump_buf

static void x86_inst_moffs_addr_dump_buf(struct x86_inst_t *inst, char **pbuf, int *psize){	enum x86_inst_reg_t reg;	reg = inst->segment ? inst->segment : x86_inst_reg_ds;	str_printf(pbuf, psize, "%s:0x%x", str_map_value(&x86_inst_reg_map, reg), inst->imm.d);}
开发者ID:HackLinux,项目名称:Coherence_Structures,代码行数:7,


示例25: str_printf

BDPLUS_FILE_H *file_open_default(void *handle, const char* file_name){    const char    *device_root = handle;    char          *file_path;    BDPLUS_FILE_H *file;    FILE          *fp;    file_path = str_printf("%s"DIR_SEP"%s", device_root, file_name);    if (!file_path) {        BD_DEBUG(DBG_CRIT, "out of memory/n");        return NULL;    }    fp = fopen(file_path, "rb");    X_FREE(file_path);    if (!fp) {        return NULL;    }    file = calloc(1, sizeof(BDPLUS_FILE_H));    file->internal = fp;    file->close    = _file_close;    file->seek     = _file_seek;    file->read     = _file_read;    return file;}
开发者ID:vlc-mirror,项目名称:libbdplus,代码行数:28,


示例26: X86InstMoffsAddrDumpBuf

static void X86InstMoffsAddrDumpBuf(X86Inst *self, char **pbuf, int *psize){	X86InstReg reg;	reg = self->segment ? self->segment : X86InstRegDs;	str_printf(pbuf, psize, "%s:0x%x", str_map_value(&x86_inst_reg_map, reg), self->imm.d);}
开发者ID:3upperm2n,项目名称:gpuSimulators,代码行数:7,


示例27: ExcDump

static void ExcDump(const string& ModuleName,LPCWSTR Exception,LPVOID Adress){	string strAddr = str_printf(L"0x%p",Adress);	string Msg[4];	if (LanguageLoaded())	{		Msg[0] = MSG(MExcException);		Msg[1] = MSG(MExcAddress);		Msg[2] = MSG(MExcFunction);		Msg[3] = MSG(MExcModule);	}	else	{		Msg[0] = L"Exception:";		Msg[1] = L"Address:  ";		Msg[2] = L"Function: ";		Msg[3] = L"Module:   ";	}	string Dump =		Msg[0] + L" " + Exception + L"/n" +		Msg[1] + L" " + strAddr + L"/n" +		Msg[2] + L" " + From + L"/n" +		Msg[3] + L" " + ModuleName + L"/n";	std::wcerr << Dump << std::endl;}
开发者ID:chapgaga,项目名称:farmanager,代码行数:28,



注:本文中的str_printf函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ str_printfa函数代码示例
C++ str_prefix函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。