📄 setxon.c
字号:
/* A module of ASYNCx.LIB version 1.20 */
#include "asyncdef.h"
/*
** Set the levels at which XON and XOFF characters will be sent. If there
** are more than xoff characters in the buffer, an XOFF will be sent. If
** an XOFF character has already been sent and the number of characters
** drops below xon, an XON will be sent. To turn off XON/XOFF, set xon to
** 0 and xoff to -1. If XON/XOFF is being turned off and an XOFF charactr
** has been sent, an XON character is sent so that communications will not
** be frozen. This function returns 0 on success or -1 on failure.
*/
int a_setxonoff(register ASYNC *p,word xon,word xoff)
{if (p)
{p->xon=xon;
p->xoff=xoff;
if (xon==0 && xoff==0xffff && p->sentxoff)
{p->lookx=0; /* turn off XON/XOFF checking */
a_putc(XON,p);
}
else
p->lookx=1; /* turn on XON/XOFF checking */
return 0;
}
return -1;
} /* end of a_setxonoff(p,xon,xoff) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -