📄 printf.c
字号:
/* A module of ASYNCx.LIB version 1.02 */
#include <stdarg.h>
#include <stdio.h>
#include "asyncdef.h"
/*********************************************************************
Format the variable argument list according to the format string and
send the resulting text to port p. Return the number of characters
sent to the port, or -1 if there is an error.
*********************************************************************/
int a_printf(register ASYNC *p,char *format,...)
{register char s[1024]; /* a large string */
int i;
va_list ap;
if (p)
{va_start(ap,format);
vsprintf(s,format,ap);
for(i=0;i<1024 && s[i];i++)
a_putc((unsigned char)s[i],p);
return i;
}
return -1;
} /* end of a_printf(p,format,...) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -