⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vsprintf.c

📁 德州仪器(TI) 的超低功耗16 位RISC 混合信号处理器的MSP430 平台为电池供电的测量应用提供了最终解决方案。应用包括便携式医疗设备、低功耗工业操作、无线、实用计量等
💻 C
字号:
/*                      - VSPRINTF.C -

   The ANSI "vsprintf" function.

   $Revision: 1.3 $

   Copyright 1986 - 1999 IAR Systems. All rights reserved.
*/

#include "stdarg.h"
#include "stdio.h"
#include "icclbutl.h"

static void put_c_in_string(char c, void *ptr)  /* Low-level output */
{
  *(*(char **) ptr)++ = c;
}

int vsprintf(char *s, const char *format, va_list ap)
{
  int nr_of_chars;

  nr_of_chars = _formatted_write(format, put_c_in_string, (void *) &s, ap);
  *s = '\0';                  /* String should be terminated with NUL */
  return nr_of_chars;       /* According to ANSI */
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -