📄 bdoor.c
字号:
/* * Copyright (C) 1996-1998 by the Board of Trustees * of Leland Stanford Junior University. * * This file is part of the SimOS distribution. * See LICENSE file for terms of the license. * */#include <stdio.h>#ifdef __alpha#define BUFSIZE 8192 #else#define BUFSIZE 1024#endifint count = 0;int buf[BUFSIZE];int doRead = 0;int dummy = 0;#ifdef __alpha/* * The SimOS-AXP support is non-existent for now --> restructure * bdoor. Eventually, we should all use this version anyway */void mainEval(int argc, char **argv) {; }void mainEvalLoop(void) { ; } int main(int argc, char **argv){ int i,j=0; buf[0] = 0; buf[BUFSIZE-1] = 0; mainEval(argc,argv); if (doRead) { } else { while (1) { mainEvalLoop(); j++; /* Put the set count annotation here */ fprintf(stderr, "bdoor: count=%d buf=%p\n", count, buf); if (!count) break; fwrite((char *)buf, 1, count, stdout); } } return 0;}#else /* __alpha */intmain(int argc, char **argv){ int i,j=0; buf[0] = 0; buf[BUFSIZE-1] = 0; eval: dummy = 1; while (1) { loop: j++; /* Put the set count annotation here */ if (!count) break; fwrite((char *)buf, 1, count, stdout); } read: while (doRead) { count = fread((char *)buf, 1, 4096, stdin); read_loop: dummy = 1; } j = 0; return 0;}#endif /* __alpha */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -