1 .\" Copyright (c) 1988 Massachusetts Institute of Technology,
2 .\" Student Information Processing Board. All rights reserved.
4 .\" Japanese Version Copyright (c) 2000 NAKANO Takeo all rights reserved.
5 .\" Translated Thu 13 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
9 .TH COMPILE_ET 1 "30 Mar 1998" SIPB
11 .\"O compile_et \- error table compiler
13 compile_et \- ¥¨¥é¡¼É½¤Î¥³¥ó¥Ñ¥¤¥é¡¼
21 .\"O converts a table listing error-code names and associated messages into
22 .\"O a C source file suitable for use with the
26 ¤Ï¡¢¥¨¥é¡¼¥³¡¼¥É¤Î̾Á°¤ÈÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¤ò¥ê¥¹¥È¤·¤¿É½¤ò¡¢
28 ¥é¥¤¥Ö¥é¥ê¤Ç°·¤¤¤ä¤¹¤¤ C ¥½¡¼¥¹·Á¼°¤ËÊÑ´¹¤¹¤ë¡£
30 .\"O The source file name must end with a suffix of ``.et''; the file
31 .\"O consists of a declaration supplying the name (up to four characters
32 .\"O long) of the error-code table:
33 ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ï ``.et'' ¤È¤¤¤¦³ÈÄ¥»Ò¤Ç½ª¤ï¤Ã¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
34 ¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Ç¡¢¤Þ¤º¥¨¥é¡¼¥³¡¼¥Éɽ¤Î̾Á°
43 .\"O followed by up to 256 entries of the form:
44 ³¤¤¤Æ¡¢¥¨¥ó¥È¥ê¤ò¼¡¤Î·Á¼°¤ÇÍ¿¤¨¤ë (256 ¥¨¥ó¥È¥ê¤Þ¤Ç)¡£
57 ¤½¤·¤ÆºÇ¸å¤Ëɽ¤ÎËöÈø¤ò
63 .\"O to indicate the end of the table.
66 .\"O The name of the table is used to construct the name of a subroutine
67 .\"O .I initialize_XXXX_error_table
68 .\"O which must be called in order for the
70 .\"O library to recognize the error table.
71 ɽ¤Î̾Á°¤Ï¡¢¥µ¥Ö¥ë¡¼¥Á¥ó¤Î̾Á°¤ò¤Ä¤¯¤ë¤È¤¤Ë
72 .I initialize_XXXX_error_table
75 ¥é¥¤¥Ö¥é¥ê¤Ë¤³¤Î¥¨¥é¡¼É½¤òǧ¼±¤µ¤»¤ë¤Ë¤Ï¡¢
76 ¤³¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤ò¸Æ¤Ó½Ð¤¹É¬Íפ¬¤¢¤ë¡£
78 .\"O The various error codes defined are assigned sequentially increasing
79 .\"O numbers (starting with a large number computed as a hash function of
80 .\"O the name of the table); thus for compatibility it is suggested that
81 .\"O new codes be added only to the end of an existing table, and that no
82 .\"O codes be removed from tables.
83 ³Æ¼ï¥¨¥é¡¼¥³¡¼¥É¤ÎÄêµÁ¤Ï¡¢¤Ò¤È¤Ä¤º¤ÄÁý¤¨¤ë¿ôÃͤ˳ä¤êÅö¤Æ¤é¤ì¤ë
84 (ÀèƬ¤Î¿ôÃͤϡ¢É½¤Î̾Á°¤ò¥Ï¥Ã¥·¥å´Ø¿ô¤ËÍ¿¤¨¤Æ·×»»¤µ¤ì¤¿Ãͤˤʤë)¡£
85 ¤·¤¿¤¬¤Ã¤Æ¸ß´¹À¤òÊݤĤ¿¤á¤Ë¤Ï¡¢
86 ¿·¤·¤¤¥³¡¼¥É¤ÎÄɲäϴû¸¤Îɽ¤ÎËöÈø¤Ë¹Ô¤¤¡¢
87 ɽ¤«¤é¥³¡¼¥É¤Îºï½ü¤ò¹Ô¤ï¤Ê¤¤¤³¤È¤Ç¤¢¤ë¡£
89 .\"O The names defined in the table are placed into a C header file with
90 .\"O preprocessor directives defining them as integer constants of up to
91 .\"O 32 bits in magnitude.
92 ɽ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë̾Á°¤Ï¡¢ C ¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Ë¤ª¤¤¤Æ¡¢
93 ¤½¤ì¤é¤Î̾Á°¤ò 32 ¥Ó¥Ã¥È¤Þ¤Ç¤ÎÀ°¿ôÄê¿ô¤È¤·¤ÆÄêµÁ¤¹¤ë
94 ¥×¥ê¥×¥í¥»¥Ã¥µ»ØÄê¤Ë¤Ê¤ë¡£
96 .\"O A C source file is also generated which should be compiled and linked
97 .\"O with the object files which reference these error codes; it contains
98 .\"O the text of the messages and the initialization subroutine. Both C
99 .\"O files have names derived from that of the original source file, with
100 .\"O the ``.et'' suffix replaced by ``.c'' and ``.h''.
101 C ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤âÀ¸À®¤µ¤ì¤ë¤Î¤Ç¡¢¤³¤ì¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¡¢
102 ¥¨¥é¡¼¥³¡¼¥É¤ò»²¾È¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤Ë¥ê¥ó¥¯¤¹¤ë¡£
103 C ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤Î¥Æ¥¥¹¥È¤È½é´ü²½¥µ¥Ö¥ë¡¼¥Á¥ó¤È¤¬´Þ¤Þ¤ì¤ë¡£
104 C ¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¡¦¥½¡¼¥¹¥Õ¥¡¥¤¥ëξ¼Ô¤Î̾Á°¤Ï¡¢
105 ¥ª¥ê¥¸¥Ê¥ë¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î̾Á°¤Î ``.et'' ³ÈÄ¥»Ò¤ò¡¢
106 ¤½¤ì¤¾¤ì ``.h'', ``.c'' ¤ËÃÖ¤´¹¤¨¤¿¤â¤Î¤Ë¤Ê¤ë¡£
108 .\"O A ``#'' in the source file is treated as a comment character, and all
109 .\"O remaining text to the end of the source line will be ignored.
110 ¥½¡¼¥¹¥Õ¥¡¥¤¥ëÃæ¤Î ``#'' ¤Ï¥³¥á¥ó¥Èʸ»ú¤È¤·¤Æ°·¤ï¤ì¡¢
111 ¤½¤Î¹Ô¤ÎËöÈø¤Þ¤Ç¤Î»Ä¤ê¤Î¥Æ¥¥¹¥È¤Ï̵»ë¤µ¤ì¤ë¡£
116 .\"O Since the original
118 .\"O uses a very simple parser based on
120 .\"O and this current version of
122 .\"O uses an awk/sed combination of scripts,
123 .\"O its error recovery leaves much to be desired.
128 ¤òÍѤ¤¤¿Èó¾ï¤Ë´Êñ¤Ê¥Ñ¡¼¥µ¡¼¤ò»È¤Ã¤Æ¤¤¤¿¤·¡¢
131 ¤Ï awk ¤È sed ¥¹¥¯¥ê¥×¥È¤òÁȤ߹ç¤ï¤»¤ÆÍѤ¤¤Æ¤¤¤ë¤Î¤Ç¡¢
132 ¥¨¥é¡¼¥ê¥«¥Ð¥ê¤Ï˾¤Þ¤·¤¤¿å½à¤«¤é¤Ï¤Û¤É±ó¤¤¡£
134 .\" .IR for manual entries
135 .\" .PP for paragraph breaks
142 Ken Raeburn, "A Common Error Description Library for UNIX".