⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 popen.c

📁 早期freebsd实现
💻 C
字号:
#include "stdioprivate.h"#include <errno.h>#include <procbuf.h>extern "C" FILE * popen(const char *command, const char *mode){    return (FILE*)(new procbuf(command, mode[0] == 'r' ? ios::in : ios::out));}extern "C" int pclose(FILE *stream){#if 0    if (stream is not a (procbuf*))	return -1;#endif    // Does not actually test that stream was created by popen(). Instead,    // it depends on the filebuf::sys_close() virtual to Do The Right Thing.    return fclose(stream);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -