soputc.c

来自「&#61599 Douglas Comer」· C语言 代码 · 共 40 行

C
40
字号
/* soputc.c - soputc */#include <sys/types.h>#include <stdio.h>#include "telnet.h"#include "local.h"/*------------------------------------------------------------------------ * soputc - move a character from the keyboard to the socket *------------------------------------------------------------------------ */intsoputc(FILE *sfp, FILE *tfp, int c){	if (sndbinary) {		if (c == TCIAC)			(void) putc(TCIAC, sfp); /* byte-stuff IAC	*/		(void) putc(c, sfp);		return 0;	}	c &= 0x7f;	/* 7-bit ASCII only */	if (c == t_intrc || c == t_quitc) {	/* Interrupt		*/		(void) putc(TCIAC, sfp);		(void) putc(TCIP, sfp);	} else if (c == sg_erase) {		/* Erase Char		*/		(void) putc(TCIAC, sfp);		(void) putc(TCEC, sfp);	} else if (c == sg_kill) {		/* Erase Line		*/		(void) putc(TCIAC, sfp);		(void) putc(TCEL, sfp);	} else if (c == t_flushc) {		/* Abort Output		*/		(void) putc(TCIAC, sfp);		(void) putc(TCAO, sfp);	} else		(void) putc(c, sfp);	return 0;}

⌨️ 快捷键说明

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