📄 iflush.c
字号:
/* A module of ASYNCx.LIB version 1.20 */
#include <dos.h>
#include "asyncdef.h"
/*
** Discard any data that may be in p's input buffer buffer. If an XOFF
** character has been sent, send an XON character to let the other party
** know that we can accept characters. If an XON character should be
** sent and the output buffer is full and we have received an XOFF
** character, return -1. If all goes well, return 0.
*/
int a_iflush(register ASYNC *p)
{byte *bp;
if (p)
{if (p->sentxoff) /* send an XON character */
{bp=p->obufhead;
*bp++=XON;
if (bp==p->obufend)
bp=p->obuf;
while(bp==p->obuftail)
if (p->recvxoff)
return -1;
p->obufhead=bp;
p->ocount++;
}
disable();
p->ibufhead=p->ibuftail=p->ibuf;
enable();
return 0;
}
else
return -1;
} /* end of a_iflush(p) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -