fputc.c

来自「在x86平台上运行不可信任代码的sandbox。」· C语言 代码 · 共 31 行

C
31
字号
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <errno.h>#include "ioprivate.h"int fputc(int c, FILE *f){	c &= 0xff;	// Make sure we have output buffer space for one character.	if (f->opos >= f->omax) {		if (__getospace(f) < 0)			return EOF;	}	// Add the character to the buffer	f->obuf[f->opos++] = c;	// Flush the buffer if appropriate.	if ((f->bufmode == _IOLBF && c == '\n') || (f->bufmode == _IONBF)) {		if (fflush(f) < 0)			return EOF;	}	return c;}

⌨️ 快捷键说明

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