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

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

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

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

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

示例1: en_print

void en_print(const char *level, const struct mlx4_en_priv *priv,	      const char *format, ...){#if 0 // AKAROS_PORT	va_list args;	struct va_format vaf;	va_start(args, format);	vaf.fmt = format;	vaf.va = &args;	if (priv->registered)		printk("%s%s: %s: %pV",		       level, DRV_NAME, priv->dev->name, &vaf);	else		printk("%s%s: %s: Port %d: %pV",		       level, DRV_NAME, dev_name(&priv->mdev->pdev->dev),		       priv->port, &vaf);	va_end(args);#else	va_list args;	va_start(args, format);	if (priv->registered)		printk("%s%s: %s: ", level, DRV_NAME, priv->dev->name);	else		printk("%s%s: %s: Port %d: ", level, DRV_NAME,		       dev_name(&priv->mdev->pdev->dev), priv->port);	vcprintf(format, args);	va_end(args);#endif}
开发者ID:anandab,项目名称:akaros,代码行数:32,


示例2: cprintf

voidcprintf(const char *fmt, ...){    va_list ap;    va_start(ap, fmt);    vcprintf(fmt, ap);    va_end(ap);}
开发者ID:BillTheBest,项目名称:k42,代码行数:8,


示例3: cprintf

/* * * cprintf - formats a string and writes it to stdout * * The return value is the number of characters which would be * written to stdout. * */intcprintf(const char *fmt, ...) {    va_list ap;    int cnt;    va_start(ap, fmt);    cnt = vcprintf(fmt, ap);    va_end(ap);    return cnt;}
开发者ID:lhh520,项目名称:os-4-risc-v,代码行数:15,


示例4: cprintf

int cprintf(const char *fmt, ...){    int n;    va_list ap;    va_start(ap, fmt);    n = vcprintf(fmt, ap);    va_end(ap);    return n;}
开发者ID:ragnar76,项目名称:emutos,代码行数:9,


示例5: __warn

/* __warn - like panic, but don't */void__warn(const char *file, int line, const char *fmt, ...) {    va_list ap;    va_start(ap, fmt);    cprintf("kernel warning at %s:%d:/n    ", file, line);    vcprintf(fmt, ap);    cprintf("/n");    va_end(ap);}
开发者ID:lhh520,项目名称:os-4-risc-v,代码行数:10,


示例6: emit_text_ni

/* Emit a NUL-terminated string of text, returning the number of * characters emitted. */static intemit_text_ni (const char * s,              hBSP430halSERIAL uart){  int rv = 0;  if (uart) {    while (s[rv]) {      emit_char2_ni(s[rv++], uart);      BSP430_CORE_WATCHDOG_CLEAR();    }  }  return rv;}intcputs (const char * s){  int rv = 0;  hBSP430halSERIAL uart = console_hal_;  BSP430_CORE_INTERRUPT_STATE_T istate;  if (! uart) {    return 0;  }  BSP430_CORE_SAVE_INTERRUPT_STATE(istate);  BSP430_CORE_DISABLE_INTERRUPT();  rv = emit_text_ni(s, uart);  emit_char2_ni('/n', uart);  BSP430_CORE_RESTORE_INTERRUPT_STATE(istate);  return 1+rv;}intcputtext_ni (const char * s){  return emit_text_ni(s, console_hal_);}#if configBSP430_CONSOLE_LIBC_HAS_ITOA - 0intcputi_ni (int n, int radix){  char buffer[sizeof("-32767")];  return emit_text_ni(itoa(n, buffer, radix), console_hal_);}#endif /* configBSP430_CONSOLE_LIBC_HAS_ITOA */#if configBSP430_CONSOLE_LIBC_HAS_UTOA - 0intcputu_ni (unsigned int n, int radix){  char buffer[sizeof("65535")];  return emit_text_ni(utoa(n, buffer, radix), console_hal_);}#endif /* configBSP430_CONSOLE_LIBC_HAS_UTOA */#if configBSP430_CONSOLE_LIBC_HAS_LTOA - 0intcputl_ni (long n, int radix){  char buffer[sizeof("-2147483647")];  return emit_text_ni(ltoa(n, buffer, radix), console_hal_);}#endif /* configBSP430_CONSOLE_LIBC_HAS_LTOA */#if configBSP430_CONSOLE_LIBC_HAS_ULTOA - 0intcputul_ni (unsigned long n, int radix){  char buffer[sizeof("4294967295")];  return emit_text_ni(ultoa(n, buffer, radix), console_hal_);}#endif /* configBSP430_CONSOLE_LIBC_HAS_ULTOA */#if configBSP430_CONSOLE_LIBC_HAS_VUPRINTF - 0int#if __GNUC__ - 0__attribute__((__format__(printf, 1, 2)))#endif /* __GNUC__ */cprintf (const char *fmt, ...){  int rv;  va_list argp;  va_start(argp, fmt);  rv = vcprintf(fmt, argp);  va_end(argp);  return rv;}
开发者ID:hodiapa,项目名称:bsp430,代码行数:90,


示例7: atomic_cprintf

int atomic_cprintf(const char *fmt, ...) {	sys_disable_interrupt();	va_list ap;	int cnt;	va_start(ap, fmt);	cnt = vcprintf(fmt, ap);	va_end(ap);	sys_enable_interrupt();	return cnt;}
开发者ID:MahmoudMohamedIsmail,项目名称:FOS-OS-Memory-Management,代码行数:12,


示例8: panic

static voidpanic(const char *fmt, ...){    va_list ap;        cprintf("SYSTEM: ");    va_start(ap, fmt);    vcprintf(fmt, ap);    va_end(ap);    cprintf("/n");    for (;;)        ;}
开发者ID:andre-werner,项目名称:argentum,代码行数:14,


示例9: _panic

/* * Panic is called on unresolvable fatal errors. * It prints "panic: <message>", then causes a breakpoint exception, * which causes JOS to enter the JOS kernel monitor. */void_panic(const char *file, int line, const char *fmt,...){	va_list ap;	va_start(ap, fmt);	// Print the panic message	cprintf("%s: user panic at %s:%d: ", binaryname, file, line);	vcprintf(fmt, ap);	cprintf("/n");	// Cause a breakpoint exception	while (1)		asm volatile("int3");}
开发者ID:donguoxing,项目名称:Lab3,代码行数:21,


示例10: verr_printf

voidverr_printf(const char *fmt, va_list ap){    uval isDisabled;    isDisabled = Scheduler::IsDisabled();    if (!isDisabled) {        Scheduler::Disable();    }    ALLOW_PRIMITIVE_PPC();    vcprintf(fmt, ap);    UN_ALLOW_PRIMITIVE_PPC();    if (!isDisabled) {        Scheduler::Enable();    }}
开发者ID:npe9,项目名称:k42,代码行数:17,


示例11: readline

int readline(char *buf, size_t buf_l, const char *prompt, ...){	static spinlock_t readline_lock = SPINLOCK_INITIALIZER_IRQSAVE;	int i, c, echoing, retval;	va_list ap;	spin_lock_irqsave(&readline_lock);	va_start(ap, prompt);	if (prompt != NULL)		vcprintf(prompt, ap);	va_end(ap);	i = 0;	echoing = iscons(0);	while (1) {		c = getchar();		if (c < 0) {			printk("read error: %e/n", c);	/* %e! */			retval = i;			break;		} else if (c == '/b' || c == 0x7f) {			if (i > 0) {				if (echoing)					cputchar(c);				i--;			}			continue;		} else if (c == '/n' || c == '/r') {			/* sending a /n regardless, since the serial port gives us a /r for			 * carriage returns. */			if (echoing)				cputchar('/n');			assert(i <= buf_l - 1);	/* never write to buf_l - 1 til the end */			buf[i++] = c;			retval =  i;			break;		} else if (c >= ' ' && i < buf_l - 1) {			if (echoing)				cputchar(c);			buf[i++] = c;		}	}	spin_unlock_irqsave(&readline_lock);	return retval;}
开发者ID:ajbetteridge,项目名称:akaros,代码行数:45,


示例12: _panic

/* * Panic is called on unresolvable fatal errors. * It prints "panic: mesg", and then enters the kernel monitor. */void _panic(const char *file, int line, const char *fmt,...){	va_list ap;	if (panicstr)		goto dead;	panicstr = fmt;	va_start(ap, fmt);	cprintf("kernel panic at %s:%d: ", file, line);	vcprintf(fmt, ap);	cprintf("/n");	va_end(ap);dead:	/* break into the kernel monitor */	while (1)		monitor(NULL);}
开发者ID:zhuyunchuan,项目名称:mit6.828,代码行数:23,


示例13: _panic

/* * Panic is called on unresolvable fatal errors. * It prints "panic: <message>", then causes a breakpoint exception, * which causes JOS to enter the JOS kernel monitor. */void_panic (const char *file, int line, const char *fmt, ...){    va_list ap;    va_start (ap, fmt);    // Print the panic message    if (argv0)        cprintf ("%s: ", argv0);    cprintf ("[%08x] user panic in %s at %s:%d: ",             sys_getenvid (), binaryname, file, line);    vcprintf (fmt, ap);    cprintf ("/n");    // Cause a breakpoint exception    while (1)        asm volatile ("int3");}
开发者ID:HawxChen,项目名称:MIT-6.828-Adventure,代码行数:24,


示例14: __panic

/* * * __panic - __panic is called on unresolvable fatal errors. it prints * "panic: 'message'", and then enters the kernel monitor. * */void__panic(const char *file, int line, const char *fmt, ...) {    if (is_panic) {        goto panic_dead;    }    is_panic = 1;    // print the 'message'    va_list ap;    va_start(ap, fmt);    cprintf("kernel panic at %s:%d:/n    ", file, line);    vcprintf(fmt, ap);    cprintf("/n");    va_end(ap);panic_dead:    intr_disable();    while (1) {        kmonitor(NULL);    }}
开发者ID:lhh520,项目名称:os-4-risc-v,代码行数:25,


示例15: _panic

/* * Panic is called on unresolvable fatal errors. * It prints "panic: mesg", and then enters the kernel monitor. */void_panic(const char *file, int line, const char *fmt,...){	va_list ap;	if (panicstr)		goto dead;	panicstr = fmt;	// Be extra sure that the machine is in as reasonable state	__asm __volatile("cli; cld");	va_start(ap, fmt);	cprintf("kernel panic on CPU %d at %s:%d: ", cpunum(), file, line);	vcprintf(fmt, ap);	cprintf("/n");	va_end(ap);dead:	/* break into the kernel monitor */	while (1)		monitor(NULL);}
开发者ID:rishabhagrawal1,项目名称:JOS-operating-system,代码行数:27,


示例16: va_start

void Console::cprintf(const char *format, ...){	va_list argptr;	va_start(argptr, format);	vcprintf(format, argptr);}
开发者ID:bkuker,项目名称:DaemonDice,代码行数:5,


示例17: vkcprintf

static int vkcprintf(const char *fmt, va_list ap){  vkprintf(fmt, ap);  return vcprintf(fmt, ap);}
开发者ID:ragnar76,项目名称:emutos,代码行数:5,


示例18: error_proc

int error_proc(FMSG *errmsg, ...){    char *tmp_errmsg;    va_list marker;#if SFX_LEVEL>=ARJ    /* Check if the message could have a standard error code */    if(errno!=0&&is_std_error(errmsg))    {        msg_cprintf(0, lf);        error_report();    }#endif#if SFX_LEVEL>=ARJSFXV    if(quiet_mode==ARJ_SILENT)        freopen(dev_con, m_w, stdout);#endif#if SFX_LEVEL>=ARJ    file_settype(stdout, ARJT_TEXT);#endif    /* For SFX archives, don't forget to display our logo */#if SFX_LEVEL==ARJSFXV    show_sfx_logo();#elif SFX_LEVEL==ARJSFX    if(!logo_shown)    {        msg_cprintf(0, M_ARJSFX_BANNER, exe_name);        msg_cprintf(0, M_PROCESSING_ARCHIVE, archive_name);    }#endif#if SFX_LEVEL>=ARJ    nputlf();#elif SFX_LEVEL>=ARJSFXV    fputc(LF, new_stdout);#else    fputc(LF, stdout);#endif    /* Format and print the error message */    va_start(marker, errmsg);#ifdef CUSTOM_PRINTF    vcprintf(H_ERR, errmsg, marker);#else    tmp_errmsg=malloc_fmsg(errmsg);#if SFX_LEVEL>=ARJSFXV    vfprintf(new_stdout, (FMSG *)tmp_errmsg, marker);#else    vprintf(tmp_errmsg, marker);#endif    free_fmsg(tmp_errmsg);#endif    va_end(marker);#if SFX_LEVEL>=ARJ    nputlf();#elif SFX_LEVEL>=ARJSFXV    fputc(LF, new_stdout);#else    fputc(LF, stdout);#endif    /* Terminate the execution with a specific errorlevel */#if SFX_LEVEL>=ARJSFXV    /* If there's no errorlevel yet, select errorlevel by message class */    if(errorlevel==0)        errorlevel=subclass_errors(errmsg);    /* If the error was the lack of memory, display final memory statistics to       find memory leaks */#if SFX_LEVEL>=ARJ    if(errorlevel==ARJ_ERL_NO_MEMORY)        mem_stats();#endif    error_occured=1;    exit(errorlevel);#elif defined(REARJ)    exit(REARJ_ERL_WARNING);#elif defined(REGISTER)    exit(REGISTER_ERL_ERROR);#elif SFX_LEVEL>=ARJSFX    exit(ARJSFX_ERL_ERROR);#else    exit(1);#endif    return(0);}
开发者ID:OPSF,项目名称:uClinux,代码行数:82,



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


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