本文介绍了如果_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.

推荐答案

如果您查看定义特殊字符,应表示(所有"-1"值)所有这些特殊字符均处于活动状态:

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

您有很多特殊字符:

  • 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-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 建议.

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

10-24 09:13