.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) .\" Distributed under GPL .\" adapted glibc info page .\" .\" polished a little, aeb .\" .\" Japanese Version Copyright (c) 2004 Yuichi SATO .\" all rights reserved. .\" Translated Thu Jul 1 01:12:35 JST 2004 .\" by Yuichi SATO .\" .\"WORD: severity class 重大度 .\" .TH ADDSEVERITY 3 2008-06-14 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O addseverity \- introduce new severity classes addseverity \- 新しい重大度 (severity class) を導入する .\"O .SH SYNOPSIS .SH 書式 .nf .sp .B #include .sp .BI "int addseverity(int " severity ", const char *" s ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR addseverity (): _SVID_SOURCE .\"O .SH DESCRIPTION .SH 説明 .\"O This function allows the introduction of new severity classes .\"O which can be addressed by the .\"O .I severity .\"O argument of the .\"O .BR fmtmsg (3) .\"O function. .\"O By default that latter function only knows how to .\"O print messages for severity 0-4 (with strings (none), HALT, .\"O ERROR, WARNING, INFO). .\"O This call attaches the given string .\"O .I s .\"O to the given value .\"O .IR severity . この関数により、新しい重大度を導入できる。 この重大度は、 .BR fmtmsg (3) 関数の .I severity 引き数に入れることができる。 デフォルトでは、後者の .BR fmtmsg (3) 関数は重大度 0-4 (文字列では (none), HALT, ERROR, WARNING, INFO) の メッセージを表示する方法しか知らない。 この .BR addseverity (3) の呼び出しにより、指定された文字列 .I s に指定された値 .I severity を付加する。 .\"O If .\"O .I s .\"O is NULL, the severity class with the numeric value .\"O .I severity .\"O is removed. .I s が NULL の場合、数値 .I severity の重大度が削除される。 .\"O It is not possible to overwrite or remove one of the default .\"O severity classes. .\"O The severity value must be nonnegative. デフォルトの重大度のどれかを上書きしたり削除したりすることはできない。 重大度の値は負でない数としなければならない。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O Upon success, the value .\"O .B MM_OK .\"O is returned. .\"O Upon error, the return value is .\"O .BR MM_NOTOK . 成功した場合、値 .B MM_OK が返される。 エラーの場合、返り値は .B MM_NOTOK である。 .\"O Possible errors include: out of memory, attempt to remove a .\"O nonexistent or default severity class. 起こる可能性があるエラーには、以下のものが含まれる: メモリを使い果たした。 存在しない重大度またはデフォルトの重大度を削除しようとした。 .\"O .SH VERSIONS .SH バージョン .\"O .BR addseverity () .\"O is provided in glibc since version 2.1. .BR addseverity () はバージョン 2.1 以降の glibc で提供されている。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O This function is not specified in the X/Open Portability Guide .\"O although the .\"O .BR fmtmsg (3) .\"O function is. .\"O It is available on System V .\"O systems. .BR fmtmsg (3) 関数は X/Open Portability Guide に指定されているが、 この関数は指定されていない。 この関数は System V システムで利用可能である。 .\"O .SH NOTES .SH 注意 .\"O New severity classes can also be added by setting the environment variable .\"O .BR SEV_LEVEL . 新しい重大度は、環境変数 .B SEV_LEVEL を設定することで追加することもできる。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR fmtmsg (3)