如果_POSIX_VDISABLE值为-1怎么办? [英] what if _POSIX_VDISABLE value is -1?

查看:143
本文介绍了如果_POSIX_VDISABLE值为-1怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在POSIX _POSIX_VDISABLE值(如果为-1)中,对于所有终端设备文件,都没有针对特殊字符的禁用字符;否则,该值为禁用字符值.

In POSIX _POSIX_VDISABLE value if -1, there is no disabling character for special character for all the terminal device files; otherwise the value is the disabling character value..

请任何人帮助我理解这一点.我无法获得确切的含义.

Can please anyone help me understand this. I m not able to get the exact meaning of this.

推荐答案

如果您查看

If you look at the definition of special characters, that should mean (thre '-1' value), that all those special characters are active:

在规范输入中,终端驱动程序会识别许多执行各种控制功能的特殊字符.
其中包括用于编辑输入的ERASE字符(通常为 DEL )和其他编辑字符.
用于发送SIGINT信号的INTR字符(通常为 Ctrl - c )以及其他发出信号的字符,在规范或非规范输入模式下都可用. /p>

In canonical input, the terminal driver recognizes a number of special characters which perform various control functions.
These include the ERASE character (usually DEL) for editing input, and other editing characters.
The INTR character (normally Ctrl-c) for sending a SIGINT signal, and other signal-raising characters, may be available in either canonical or noncanonical input mode.

您有很多特殊字符:

  • Characters for Input Editing
  • BSD Extensions to Editing Characters
  • Characters that Cause Signals
  • Special Characters for Flow Control
  • Other Special Characters

提出了一个问题,以查看是否这样的值在1997年是可移植的(总是编译):

The question has been raised to see if such a value was portable (did always compiled) in 1997:

第2.9.4节中的措辞:

The wording in section 2.9.4:

如果表2-11中的任何常量被定义为在标头中具有值-1.

If any of the constants in Table 2-11 are defined to have value -1 in the header ....

在随意阅读时可以建议如下代码以最大程度地减小大小 并优化每种实施的效率:

can suggest, on casual reading, code like the following to minimize size and optimize efficiency for each implementation:

#ifdef _POSIX_VDISABLE
#if    _POSIX_VDISABLE == -1
    /* code that assumes no vdisable capability */
#else
    /* code that assumes vdisable capability */
#endif
#else
    /* code that uses pathconf() to determine vdisable capability */
#endif

解释#34 建议.

通过在COMPILE-TIME时使用这些值,便携式POSIX.1应用程序可以在定义符号时避免加载与表2-11中的符号关联的所有与pathconf()相关的代码.

By using these values at COMPILE-TIME, a portable POSIX.1 application can avoid loading all pathconf() related code associated with a symbol in Table 2-11 when the symbol is defined.

这篇关于如果_POSIX_VDISABLE值为-1怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆