首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >IO之Formatted IO

IO之Formatted IO

作者头像
Taishan3721
发布2020-08-11 15:32:47
8670
发布2020-08-11 15:32:47
举报
文章被收录于专栏:这里只有VxWorks这里只有VxWorks

Formatted I/O


/* ANSI */

/* write a formatted string to the standard output stream */
int  printf(char *, ...);

/* write a formatted string to a buffer */
int  sprintf(char *, char *, ...);

/* write a formatted string to a buffer, not exceeding buffer size */
int  snprintf(char *, size_t, char *, ...);

/* write a formatted string to a stream */
int  fprintf(FILE *, char *, ...);

/* write a formatted string to a stream */
int  vfprintf(FILE *, char *, va_list);

/* write a string formatted with a variable argument list to standard output */
int  vprintf(char *, va_list);

/* write a string formatted with a variable argument list to a buffer */
int  vsprintf(char *, char *, va_list);

/* write a string formatted with a variable argument list to a buffer, not exceeding buffer size */
int  vsnprintf(char *, size_t, char *, va_list);

/* write a formatted string to an output function */
int  oprintf(OPRINTF_OUTPUT_FUNCPTR routine, _Vx_usr_arg_t arg, char *, ...);

/* write a formatted string to an output function */
int  voprintf(OPRINTF_OUTPUT_FUNCPTR routine , _Vx_usr_arg_t arg, char *, va_list);

/* read and convert characters from the standard input stream */
int  scanf(char *, ...);

/* read and convert characters from an ASCII string */
int  sscanf(char *, char *, ...);

/* read and convert characters from a stream */
int  fscanf(FILE *, char *, ...);

格式化的定义可以看这里

printf的格式化输出与转义字符

/* WRS functions declarations */

/* write a formatted string to a file descriptor */
int  fdprintf(int, char *, ...);

/* write a string formatted with a variable argument list to a file descriptor */
int  vfdprintf(int, char *, va_list);

/* write a formatted string to the standard error stream */
int  printErr(char *, ...);

/* print an exception-generated error message */
void printExc(char *, int, int, int, int, int);

当然了,还有kprintf

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2020-08-10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 这里只有VxWorks 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档