fputstr.c
来自「一个c语言写做的编译器的源码」· C语言 代码 · 共 23 行
C
23 行
/*@A (C) 1992 Allen I. Holub */
#include <stdio.h>
#include <tools/debug.h>
#include <tools/compiler.h>
/* FPUTSTR.C: Print a string with control characters mapped to readable strings.
*/
void fputstr( str, maxlen, stream )
char *str;
int maxlen;
FILE *stream;
{
char *s;
while( *str && maxlen >= 0 )
{
s = bin_to_ascii( *str++, 1 );
while( *s && --maxlen >= 0 )
putc( *s++ , stream );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?