Sun Studio 12:C 用户指南

E.1.14.1 (7.1.6) The null pointer constant to which the macro NULL expands(宏 NULL 扩展为的空指针常量):

NULL 等于 0。

(7.2) The diagnostic printed by and the termination behavior of the assert function(assert 函数打印的诊断及该函数的终止行为):

诊断为:

Assertion failed: statement . file filename, line number

其中:

(7.3.1) The sets of characters tested for by the isalnum, isalpha, iscntrl, islower, isprint, and isupper functions(isalnum、isalpha、iscntrl、islower、isprint 和 supper 函数测试的字符集):

表 E–6 isalphaislower 等测试的字符集

isalnum

ASCII 字符 A-Z、a-z 和 0-9 

isalpha

ASCII 字符 A-Z 和 a-z,以及特定于语言环境的单字节字母 

iscntrl

值为 0-31 和 127 的 ASCII 字符 

islower

ASCII 字符 a-z 

isprint

特定于语言环境的单字节可打印字符 

isupper

ASCII 字符 A-Z 

(7.5.1) The values returned by the mathematics functions on domain errors(发生域错误时数学函数返回的值):

表 E–7 发生域错误时返回的值

错误 

数学函数 

编译器模式 

 

 

 

-Xs-Xt

-Xa-Xc

DOMAIN 

acos(|x|>1) 

0.0 

0.0 

DOMAIN 

asin(|x|>1) 

0.0 

0.0 

DOMAIN 

atan2(+-0,+-0) 

0.0 

0.0 

DOMAIN 

y0(0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y0(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y1(0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y1(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

yn(n,0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

yn(n,x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

log(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

log10(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

pow(0,0) 

0.0 

1.0 

DOMAIN 

pow(0,neg) 

0.0 

-HUGE_VAL 

DOMAIN 

pow(neg,non-integal) 

0.0 

NaN 

DOMAIN 

sqrt(x<0) 

0.0 

NaN 

DOMAIN 

fmod(x,0) 

NaN 

DOMAIN 

remainder(x,0) 

NaN 

NaN 

DOMAIN 

acosh(x<1) 

NaN 

NaN 

DOMAIN 

atanh(|x|>1) 

NaN 

NaN 

(7.5.1) Whether the mathematics functions set the integer expression errno to the value of the macro ERANGE on underflow range errors(在出现下溢范围错误时,数学函数是否将整数表达式 errno 设置为宏 ERANGE 的值):

检测到下溢时,除 scalbn 之外的数学函数将 errno 设置为 ERANGE

(7.5.6.4) Whether a domain error occurs or zero is returned when the fmod function has a second argument of zero(fmod 函数的第二个参数为零时,发生域错误还是返回零):

在此情况下,它返回第一个参数并发生域错误。

(7.7.1.1) The set of signals for the signal function(用于 signal 函数的信号集):

下表列出了 signal 函数可识别的每个信号的语义:

表 E–8 signal 信号的语义

信号 

编号 

缺省 

事件 

SIGHUP 

退出 

挂起

SIGINT 

退出 

中断

SIGQUIT 

信息转储 

退出

SIGILL 

信息转储 

非法指令(找到时不重置) 

SIGTRAP 

信息转储 

跟踪陷阱(捕获时不重置)

SIGIOT 

信息转储 

IOT 指令

SIGABRT 

信息转储 

由中止使用

SIGEMT 

信息转储 

EMT 指令

SIGFPE 

信息转储 

浮点异常

SIGKILL 

退出 

中止(找不到,也无法忽略)

SIGBUS 

10 

信息转储 

总线错误

SIGSEGV 

11 

信息转储 

段违规

SIGSYS 

12 

信息转储 

系统调用参数错误

SIGPIPE 

13 

退出 

写在管道上,但无读取者

SIGALRM 

14 

退出 

报警时钟

SIGTERM 

15 

退出 

来自中止的软件终止信号

SIGUSR1 

16 

退出 

用户定义的信号 1

SIGUSR2 

17 

退出 

用户定义的信号 2

SIGCLD 

18 

忽略 

子项状态更改

SIGCHLD 

18 

忽略 

子项状态更改别名

SIGPWR 

19 

忽略 

电源故障,重新启动

SIGWINCH 

20 

忽略 

窗口大小更改

SIGURG 

21 

忽略 

紧急套接字条件

SIGPOLL 

22 

退出 

发生了可轮询事件

SIGIO 

22 

退出 

可能有套接字 I/O

SIGSTOP 

23 

停止 

停止(找不到,也无法忽略)

SIGTSTP 

24 

停止 

来自 tty 的用户停止请求

SIGCONT 

25 

忽略 

停止的进程已继续

SIGTTIN 

26 

停止 

已尝试后台 tty 读

SIGTTOU 

27 

停止 

已尝试后台 tty 写

SIGVTALRM 

28 

退出 

虚拟计时器已过期

SIGPROF 

29 

退出 

文件配置计时器已过期

SIGXCPU 

30 

信息转储 

已超出 cpu 限制

SIGXFSZ 

31 

信息转储 

已超出文件大小限制

SIGWAITINGT 

32 

忽略 

进程的 lwp 受阻

(7.7.1.1) The default handling and the handling at program startup for each signal recognized by the signal function(针对信号函数识别的每个 signal 的缺省处理和程序启动时的处理):

参见以上内容。

(7.7.1.1) If the equivalent of signal(sig, SIG_DFL); is not executed prior to the call of a signal handler, the blocking of the signal that is performed(如果在调用信号处理程序之前未执行 signal(sig, SIG_DFL) 的等效函数,则阻塞执行的信号):

总是执行 signal(sig,SIG_DFL) 的等效函数。

(7.7.1.1) Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function(为信号函数指定的处理程序接收到 SIGILL 信号时,是否重置缺省处理):

接收到 SIGILL 时不重置缺省处理。

(7.9.2) Whether the last line of a text stream requires a terminating new-line character(文本流的最后一行是否需要终止换行符):

最后一行不需要以换行符结束。

(7.9.2) Whether space characters that are written out to a text stream immediately before a new-line character appear when read in(写出到换行符紧前面的文本流中的空格字符在读入时是否出现):

读该流时,所有字符均出现。

(7.9.2) The number of null characters that may be appended to data written to a binary stream(可附加至写入二进制流的数据的空字符数):

空字符不附加至二进制流。

(7.9.3) Whether the file position indicator of an append mode stream is initially positioned at the beginning or end of the file(附加模式流的文件位置指示器最初位于文件开头还是结尾):

文件位置指示符最初位于文件结尾。

(7.9.3) Whether a write on a text stream causes the associated file to be truncated beyond that point(文本流中的写是否导致联合文件在该点之后被截断):

文本流中的写不会导致文件在该点之后被截断,除非硬件设备强制这种情况发生。

(7.9.3) The characteristics of file buffering(文件缓冲的特性):

除标准错误流 (stderr) 之外,输出流在输出至文件时采用缺省缓冲,在输出至终端时采用行缓冲。标准错误输出流 (stderr) 在缺省情况下不缓冲。

缓冲的输出流保存多个字符,然后将这些字符作为块进行写。未缓冲的输出流将信息排队,以便立即在目标文件或终端上写。行缓冲的输出将输出的每行排队,直至行完成(请求换行符)时为止。

(7.9.3) Whether a zero-length file actually exists(零长度文件是否实际存在):

由于零长度文件有目录项,因此它确实存在。

(7.9.3) The rules for composing valid file names(书写有效文件名的规则):

有效文件名的长度可以为 1 到 1,023 个字符,可以使用除字符 null 和 /(斜杠)之外的所有字符。

(7.9.3) Whether the same file can be open multiple times(同一文件是否可以多次打开):

同一文件可以多次打开。

(7.9.4.1) The effect of the remove function on an open file(remove 函数对打开的文件的影响):

在执行关闭文件的最后一个调用时删除文件。程序不能打开已删除的文件。

(7.9.4.2) The effect if a file with the new name exists prior to a call to the rename function(在调用 rename 函数之前已存在具有新名称的文件时的影响):

如果文件存在,将删除文件,并且新文件改写先前存在的文件。

(7.9.6.1) The output for %p conversion in the fprintf function(fprintf 函数中 %p 转换的输出):

%p 的输出与 %x 的相同。

(7.9.6.2) The input for %p conversion in the fscanf function(fscanf 函数中 %p 转换的输入):

%p 的输入与 %x 的相同。

(7.9.6.2) The interpretation of a- character that is neither the first nor the last character in the scan list for %[ conversion in the fscanf function(对既不是 fscanf 函数中 %[ 转换的扫描列表中的第一个字符也不是最后一个字符的 - 字符的解释):

- 字符表示包括边界的范围,因此 [0-9][0123456789] 等效。