美文网首页
第十八章 终端IO

第十八章 终端IO

作者: laidian | 来源:发表于2018-10-07 13:50 被阅读11次

    终端 I/O 处理分立为两种不同的风格:一种是系统Ⅲ的风格,由 System V 沿续下来,另一种是 V7 的风格,它成为 BSD 派生的系统终端 I/O 处理的标准

    终端 I/O 有两种不同的工作模式:规范模式输入处理;非规范模式输入处理

    比如通常的shell就是规范模式,而vim编辑器就是非规范模式

    获得和设置终端属性

    #include <termios.h>
    int tcgetattr(int fd,struct *termptr);
    int tcseetattr(int fd,int opt,const struct termios *termptr);
    

    stty命令

    波特率函数

    #include <termios.h>
    speed_t cfgetispeed
    speed_t cfsetispeed
    speed_t cfgetospeed
    speed_t cfsetospeed
    
    

    行为控制函数

    相关文章

      网友评论

          本文标题:第十八章 终端IO

          本文链接:https://www.haomeiwen.com/subject/xejlaftx.html