- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我们有一个包含字符流的字符缓冲区。我们一次读取每个字符并使用 isprint
检查它。在某些时候阅读 isprint
时,对于不可打印的字符返回 true。我们打印了该字符的十进制值 - -92
- 但 isprint
在 Solaris 上为此返回 TRUE。
for (int lix = 0; lix < l_len; ++lix) {
int lch = l_buf[lix];
if (isprint(lch) && !isspace(lch)) {
fputc(lch, l_fp);
}
else {
fprintf(l_fp, "\\%03o", lch);
}
}
l_buf
是 const char*
类型,包含字符流。isprint
在 AIX 上返回 false
,在 Solaris 上返回 true
。最佳答案
如果类型为 int
的函数 isprint()
的参数不能表示为 unsigned char
,则行为未定义> 或等于 EOF。
7.4 Character handling
- The header declares several functions useful for classifying and mapping characters. In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined.
关于c++ - 'isprint' 在 solaris 上为不可打印的字符返回 true,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36279823/
Solaris 中的“\t”或“\r\t”是制表符吗?换行字符序列\n 或\r\n ? 谢谢 最佳答案 \t = 制表符 \r = 回车 \n =换行 Solaris 标准行分隔符是\n 关于sola
我需要找出 Solaris 盒子的硬盘驱动器名称,但我不清楚设备名称是什么。在 Linux 上,它类似于 /dev/hda 或 /dev/sda,但在 Solaris 上,我对分区和设备的名称有点迷失
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我使用 mmap(只是尝试了解 mmap 的工作原理)来分配 96k 匿名内存,但看起来它将 96k 分成了 64k 和 32k。但是当分配960k时,它只分配一个大小为960k的chunk。什么时候
可用于 OpenSolaris 的源代码对于了解 Solaris 的内部结构(以及 dtrace 和 mdb)非常有用。然而,据我所知,没有办法准确地找出 OpenSolaris 源代码与作为 Sol
我在configure.ac中声明了一个变量: MY_VERSION="0:0:0" AC_SUBST(MY_VERSION) AC_MSG_NOTICE([$MY_VERSION]) 变量的值在./
我试过使用 /string1\|string2 没用。 尝试过 /字符串1|字符串2 没用。 有什么帮助吗? 最佳答案 您必须将“交替”放在\(...\) 的“分组”中。这应该有效: /\(strin
Solaris 中的某些命令(如 iostat)使用磁盘名称(如 sd0 或 sdd2)报告磁盘相关信息。是否有一致的方法将这些名称映射回标准/dev/dsk/c?t?d?s? Solaris 中的磁
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭11 年前。 Improve th
如何在solaris 11中生成UUID? 在 Solaris 10 中,我使用 makeuuid 命令生成。 我在 solaris 11 中找不到它,而它根据 oracle 文档存在 https:/
我正在将 Solaris 10 应用程序迁移到 RHEL。该应用程序使用某些特定于 Solaris 的函数,我在 Linux 上找不到等效函数。 void double_to_decimal(doub
在 Solaris 上,我似乎需要单引号 'a match the beginning of line' 表达式: > sh $ echo offset 0.000000 2>&1 | grep
我正在尝试运行一个旧的 Solaris SPARC 应用程序。 我从this question中学到了x86 Solaris 不会削减它。我最近了解到 VM virtualbox 不能模拟 SPARC
我正在将我们的应用程序从solaris sparc 移植到solaris x86,并且我遇到了这两种体系结构之间的结构大小差异。例如;我有一个类似的结构 typedef struct mystruct
在 linx CShell 上工作时,您可以选择按向上/向下箭头来选择最后键入的命令或命令缓冲区。这甚至适用于 Windows。 但是,在我最近切换到的 Solaris 上工作时,这不起作用。我猜 s
在 Solaris 上,我似乎需要单引号 'a match the beginning of line' 表达式: > sh $ echo offset 0.000000 2>&1 | grep
我正在尝试运行一个旧的 Solaris SPARC 应用程序。 我从this question中学到了x86 Solaris 不会削减它。我最近了解到 VM virtualbox 不能模拟 SPARC
Qt 页面没有列出用于 Solaris 的预编译 Qt 5 包。四处搜索,它似乎也没有包含在流行的软件包存储库 OpenCSW 中。一些谷歌搜索表明在 Solaris 下构建 Qt 5 涉及在 Sol
全部, 我们正在 WebLogic 服务器 9.2 MP2 上运行 J2EE 应用程序,并在 Solaris 10 上使用 jrockit 64 位 JVM (27.3.1)。 我们调用userunt
我正在尝试从 http://ftp.gnu.org/gnu/binutils 构建 binutils 2.21.1a在 Solaris sun4u sparc SunOS 5.10 上。我正在使用 g
我是一名优秀的程序员,十分优秀!