OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / strverscmp.3
index 8ed6c87..a1ebecb 100644 (file)
 .\"
 .TH STRVERSCMP 3  2001-12-19 "GNU" "Linux Programmer's Manual"
 .\"O .SH NAME
-.SH Ì¾Á°
+.SH 名前
 .\"O strverscmp \- compare two version strings
-strverscmp \- 2¤Ä¤Î¥Ð¡¼¥¸¥ç¥óʸ»úÎó¤òÈæ³Ó¤¹¤ë
+strverscmp \- 2つのバージョン文字列を比較する
 .\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
 .nf
 .\"O .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
-.BR "#define _GNU_SOURCE" "         /* feature_test_macros(7) »²¾È */"
+.BR "#define _GNU_SOURCE" "         /* feature_test_macros(7) 参照 */"
 .br
 .B #include <string.h>
 .sp
 .BI "int strverscmp(const char *" s1 ", const char *" s2 );
 .fi
 .\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O Often one has files
 .\"O .IR jan1 ", " jan2 ", ..., " jan9 ", " jan10 ", ..."
 .\"O and it feels wrong when
@@ -49,13 +49,13 @@ strverscmp \- 2
 .\"O orders them
 .\"O .IR jan1 ", " jan10 ", ..., " jan2 ", ..., " jan9 .
 .IR jan1 ", " jan2 ", ..., " jan9 ", " jan10 ", ..."
-¤È¤¤¤Ã¤¿Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¾õ¶·¤Ï¤è¤¯¤¢¤ë¤¬¡¢
+といった名前のファイルがある状況はよくあるが、
 .BR ls (1)
-¤ò¼Â¹Ô¤·¤¿¤È¤­¤Ë
+を実行したときに
 .IR jan1 ", " jan10 ", ..., " jan2 ", ..., " jan9
-¤Î½çÈÖ¤Çɽ¼¨¤µ¤ì¤ë¤Î¤Ë¤Ï°ãÏ´¶¤¬¤¢¤ë¡£
+の順番で表示されるのには違和感がある。
 .\"O .\" classical solution: "rename jan jan0 jan?"
-.\" ¤³¤ì¤Þ¤Ç¤Î²ò·èÊýË¡: "rename jan jan0 jan?"
+.\" これまでの解決方法: "rename jan jan0 jan?"
 .\"O In order to rectify this, GNU introduced the
 .\"O .I \-v
 .\"O option to
@@ -64,16 +64,16 @@ strverscmp \- 2
 .\"O .BR versionsort (3),
 .\"O which again uses
 .\"O .BR strverscmp ().
-¤³¤ì¤ò½¤Àµ¤¹¤ë¤¿¤á¤Ë¡¢GNU ¤Ï
+これを修正するために、GNU は
 .BR ls (1)
-¤Ë
+に
 .I \-v
-¥ª¥×¥·¥ç¥ó¤òƳÆþ¤·¤¿¡£
-¤³¤Îµ¡Ç½¤Ï
+オプションを導入した。
+この機能は
 .BR versionsort (3)
-¤ò»È¤Ã¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤¬¡¢¤³¤ÎÃæ¤Ç
+を使って実装されているが、この中で
 .BR strverscmp ()
-¤¬»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
+が使用されている。
 
 .\"O Thus, the task of
 .\"O .BR strverscmp ()
@@ -85,72 +85,72 @@ strverscmp \- 2
 .\"O .BR LC_COLLATE ,
 .\"O so is meant mostly for situations
 .\"O where the strings are expected to be in ASCII.
-¤³¤Î¤è¤¦¤Ë
+このように
 .BR strverscmp ()
-¤ÎÌòÌܤÏ2¤Ä¤Îʸ»úÎó¤òÈæ³Ó¤·¤Æ¡ÖÀµ¤·¤¤¡×½ç½ø¤òõ¤¹¤³¤È¤Ç¤¢¤ë¡£
-¤³¤ì¤ËÂФ·¤Æ
+の役目は2つの文字列を比較して「正しい」順序を探すことである。
+これに対して
 .BR strcmp (3)
-¤Ï¼­½ñ½ç¤ÇÈæ³Ó¤·¤¿·ë²Ì¤òÊÖ¤¹¤À¤±¤Ç¤¢¤ë¡£
-´Ø¿ô
+は辞書順で比較した結果を返すだけである。
+関数
 .BR strverscmp ()
-¤Ï¥í¥±¡¼¥ë¤Î¥«¥Æ¥´¥ê¤Ç¤¢¤ë
+はロケールのカテゴリである
 .B LC_COLLATE
-¤ò»ÈÍѤ·¤Ê¤¤¡£
-¤³¤Î¤³¤È¤«¤é¡¢¤³¤Î´Ø¿ô¤¬¼ç¤Ë¥¢¥¹¥­¡¼Ê¸»ú¤«¤éÀ®¤ëʸ»úÎó¤ò
-ÁÛÄꤷ¤Æ¤¤¤ë¤³¤È¤¬Ê¬¤«¤ë¡£
+を使用しない。
+このことから、この関数が主にアスキー文字から成る文字列を
+想定していることが分かる。
 
 .\"O What this function does is the following.
-¤³¤Î´Ø¿ô¤ÎÆ°ºî¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
+この関数の動作は以下の通りである。
 .\"O If both strings are equal, return 0.
 .\"O Otherwise find the position
 .\"O between two bytes with the property that before it both strings are equal,
 .\"O while directly after it there is a difference.
-ξÊý¤Îʸ»úÎó¤¬Åù¤·¤¤¾ì¹ç¡¢0 ¤òÊÖ¤¹¡£
-¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¤½¤ÎľÁ°¤Þ¤Ç¤ÏξÊý¤Îʸ»úÎó¤¬Åù¤·¤¯¡¢
-¤½¤Îľ¸å¤Î¥Ð¥¤¥È¤Çξ¼Ô¤Ë°ã¤¤¤¬¤¢¤ë¤è¤¦¤Ê¡¢¥Ð¥¤¥È¤Î¶­³¦¤òõ¤¹¡£
+両方の文字列が等しい場合、0 を返す。
+それ以外の場合、その直前までは両方の文字列が等しく、
+その直後のバイトで両者に違いがあるような、バイトの境界を探す。
 .\"O Find the largest consecutive digit strings containing (or starting at,
 .\"O or ending at) this position.
 .\"O If one or both of these is empty,
-¸«¤Ä¤«¤Ã¤¿¥Ð¥¤¥È¶­³¦¤ò´Þ¤à¿ô»úÎó(¿ô»ú¤À¤±¤Îʸ»úÎó)¤ÎºÇĹ°ìÃ׸¡º÷¤ò¹Ô¤¦¡£
-(¿ô»úÎó¤Ï¶­³¦¤«¤é»Ï¤Þ¤Ã¤Æ¤¤¤Æ¤â¡¢¶­³¦¤Ç½ª¤ï¤Ã¤Æ¤¤¤Æ¤â¤è¤¤)¡£
+見つかったバイト境界を含む数字列(数字だけの文字列)の最長一致検索を行う。
+(数字列は境界から始まっていても、境界で終わっていてもよい)。
 .\"O then return what
 .\"O .BR strcmp (3)
 .\"O would have returned (numerical ordering of byte values).
-2¤Ä¤Îʸ»úÎ󤫤éÆÀ¤é¤ì¤¿¿ô»úÎó¤Î°ìÊý¤Þ¤¿¤ÏξÊý¤¬¶õ¤Ç¤¢¤ì¤Ð¡¢
+2つの文字列から得られた数字列の一方または両方が空であれば、
 .BR strcmp (3)
-¤¬ÊÖ¤·¤¿·ë²Ì¤ò´Ø¿ô¤ÎÊÖ¤êÃͤȤ·¤ÆÊÖ¤¹¡£
-¤¹¤Ê¤ï¤Á¡¢¥Ð¥¤¥ÈÃͤòÈæ³Ó¤·¤¿·ë²Ì¤òÊÖ¤¹¡£
+が返した結果を関数の返り値として返す。
+すなわち、バイト値を比較した結果を返す。
 .\"O Otherwise, compare both digit strings numerically, where digit strings with
 .\"O one or more leading zeros are interpreted as if they have a decimal point
 .\"O in front (so that in particular digit strings with more leading zeros
 .\"O come before digit strings with fewer leading zeros).
-¤½¤ì°Ê³°¤Î(¿ô»úÎó¤¬Î¾Êý¤È¤â¶õ¤Ç¤Ê¤¤)¾ì¹ç¡¢Î¾Êý¤Î¿ô»úÎó¤ò¿ô»ú½ç¤ÇÈæ³Ó¤¹¤ë¡£
-¤³¤Î¤È¤­¡¢1¤Ä°Ê¾å¤Î 0 ¤¬ÀèƬ¤Ë¤¢¤ë¿ô»úÎó¤Ï¡¢Á°¤Ë¾®¿ôÅÀ¤¬¤Ä¤¤¤Æ¤¤¤ë¤â¤Î¤È
-²ò¼á¤µ¤ì¤ë¡£(ÀèƬ¤Ë 0 ¤¬Â¿¤¯¤¢¤ë¿ô»úÎó¤Û¤ÉÁ°¤ËÍè¤ë¤³¤È¤Ë¤Ê¤ë)
+それ以外の(数字列が両方とも空でない)場合、両方の数字列を数字順で比較する。
+このとき、1つ以上の 0 が先頭にある数字列は、前に小数点がついているものと
+解釈される。(先頭に 0 が多くある数字列ほど前に来ることになる)
 .\"O Thus, the ordering is
 .\"O .IR 000 ", " 00 ", " 01 ", " 010 ", " 09 ", " 0 ", " 1 ", " 9 ", " 10 .
-¤³¤Î·ë²Ì¡¢½ç½ø¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ë:
+この結果、順序は次のようになる:
 .IR 000 ", " 00 ", " 01 ", " 010 ", " 09 ", " 0 ", " 1 ", " 9 ", " 10
 .\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
 .\"O The
 .\"O .BR strverscmp ()
 .\"O function returns an integer
 .\"O less than, equal to, or greater than zero if \fIs1\fP
 .\"O is found, respectively, to be earlier than, equal to,
 .\"O or later than \fIs2\fP.
-´Ø¿ô
+関数
 .BR strverscmp ()
-¤Ï¡¢¥¼¥í¤è¤ê¤â
-1)¾®¤µ¤¤¡¢2)Åù¤·¤¤¡¢3)Â礭¤¤¤Î¤¤¤º¤ì¤«¤ÎÀ°¿ô¤òÊÖ¤¹¡£
-¤½¤ì¤¾¤ì¤Ï¡¢\fIs1\fP ¤¬ \fIs2\fP ¤è¤ê¤â¡¢
-1)¾®¤µ¤¤¡¢2)Åù¤·¤¤¡¢3)Â礭¤¤ ¤³¤È¤ò¼¨¤¹¡£
+は、ゼロよりも
+1)小さい、2)等しい、3)大きいのいずれかの整数を返す。
+それぞれは、\fIs1\fP が \fIs2\fP よりも、
+1)小さい、2)等しい、3)大きい ことを示す。
 .\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
 .\"O This function is a GNU extension.
-¤³¤Î´Ø¿ô¤Ï GNU ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ë¡£
+この関数は GNU による拡張である。
 .\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
 .BR rename (1),
 .BR strcasecmp (3),
 .BR strcmp (3),