error.c
来自「Outputs messages to a 2line LCD」· C语言 代码 · 共 60 行
C
60 行
/* File error.c: 2.1 (83/03/20,16:02:00) */
/*% cc -O -c %
*
*/
#include <stdio.h>
#include "defs.h"
#include "data.h"
#include "headers.h"
void error(char *ptr) {
FILE *tempfile;
tempfile = output;
output = stdout;
doerror(ptr);
output = tempfile;
doerror(ptr);
errcnt++;
}
void warning(char *ptr) {
FILE *tempfile;
tempfile = output;
output = stdout;
doerror(ptr);
output = tempfile;
doerror(ptr);
}
void doerror(char *ptr) {
int k;
comment();
outstr(line);
nl();
comment();
k = 0;
while (k < lptr) {
if (line[k] == 9)
tab();
else
outbyte(' ');
k++;
}
outbyte('^');
nl();
comment();
outstr(" Line ");
onum(LineNum);
outstr(": ");
outstr(ptr);
nl();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?