Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 1 | # python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*- |
| 2 | # |
| 3 | # Heavily based on Guido van Rossum's myformat.perl (now obsolete). |
| 4 | # |
| 5 | # Extension to LaTeX2HTML for documents using myformat.sty. |
| 6 | # Subroutines of the form do_cmd_<name> here define translations |
| 7 | # for LaTeX commands \<name> defined in the corresponding .sty file. |
| 8 | |
| 9 | package main; |
| 10 | |
| 11 | |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 12 | sub next_argument{ |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 13 | my $param; |
| 14 | $param = missing_braces() |
| 15 | unless ((s/$next_pair_pr_rx/$param=$2;''/eo) |
| 16 | ||(s/$next_pair_rx/$param=$2;''/eo)); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 17 | return $param; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | sub next_optional_argument{ |
| 21 | my($param,$rx) = ('', "^\\s*(\\[([^]]*)\\])?"); |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 22 | s/$rx/$param=$2;''/eo; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 23 | return $param; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 24 | } |
| 25 | |
Fred Drake | e16f679 | 1998-05-15 04:28:37 +0000 | [diff] [blame] | 26 | |
| 27 | # This is a fairly simple hack; it supports \let when it is used to create |
| 28 | # (or redefine) a macro to exactly be some other macro: \let\newname=\oldname. |
Fred Drake | 5b73cdf | 1998-05-15 16:59:38 +0000 | [diff] [blame] | 29 | # Many possible uses of \let aren't supported or aren't supported correctly. |
Fred Drake | e16f679 | 1998-05-15 04:28:37 +0000 | [diff] [blame] | 30 | # |
| 31 | sub do_cmd_let{ |
| 32 | local($_) = @_; |
| 33 | my $matched = 0; |
Fred Drake | 7a4ad0f | 1998-05-15 13:45:54 +0000 | [diff] [blame] | 34 | s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e; |
Fred Drake | e16f679 | 1998-05-15 04:28:37 +0000 | [diff] [blame] | 35 | if ($matched) { |
| 36 | my($new, $old) = ($1, $3); |
| 37 | eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }'; |
| 38 | print "\ndefining handler for \\$new using \\$old\n"; |
| 39 | } |
Fred Drake | 7a4ad0f | 1998-05-15 13:45:54 +0000 | [diff] [blame] | 40 | else { |
| 41 | s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es; |
| 42 | if ($matched) { |
| 43 | my($new, $char) = ($1, $3); |
| 44 | eval "sub do_cmd_$new { \"\\$char\" . \@_[0]; }"; |
| 45 | print "\ndefining handler for \\$new to insert '$char'\n"; |
| 46 | } |
| 47 | else { |
| 48 | write_warnings("Could not interpret \\let construct..."); |
| 49 | } |
| 50 | } |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 51 | return $_; |
Fred Drake | e16f679 | 1998-05-15 04:28:37 +0000 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 55 | # words typeset in a special way (not in HTML though) |
| 56 | |
| 57 | sub do_cmd_ABC{ 'ABC' . @_[0]; } |
| 58 | sub do_cmd_UNIX{ 'Unix'. @_[0]; } |
| 59 | sub do_cmd_ASCII{ 'ASCII' . @_[0]; } |
| 60 | sub do_cmd_POSIX{ 'POSIX' . @_[0]; } |
| 61 | sub do_cmd_C{ 'C' . @_[0]; } |
| 62 | sub do_cmd_Cpp{ 'C++' . @_[0]; } |
| 63 | sub do_cmd_EOF{ 'EOF' . @_[0]; } |
| 64 | sub do_cmd_NULL{ '<tt>NULL</tt>' . @_[0]; } |
| 65 | |
| 66 | sub do_cmd_e{ '\' . @_[0]; } |
| 67 | |
Fred Drake | d07868a | 1998-05-14 21:00:28 +0000 | [diff] [blame] | 68 | $DEVELOPER_ADDRESS = ''; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 69 | $PYTHON_VERSION = ''; |
| 70 | |
| 71 | sub do_cmd_version{ $PYTHON_VERSION . @_[0]; } |
| 72 | sub do_cmd_release{ |
| 73 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 74 | $PYTHON_VERSION = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 75 | return $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | sub do_cmd_authoraddress{ |
| 79 | local($_) = @_; |
Fred Drake | d07868a | 1998-05-14 21:00:28 +0000 | [diff] [blame] | 80 | $DEVELOPER_ADDRESS = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 81 | return $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 82 | } |
| 83 | |
Fred Drake | e16f679 | 1998-05-15 04:28:37 +0000 | [diff] [blame] | 84 | #sub do_cmd_developer{ do_cmd_author(@_[0]); } |
| 85 | #sub do_cmd_developers{ do_cmd_author(@_[0]); } |
| 86 | #sub do_cmd_developersaddress{ do_cmd_authoraddress(@_[0]); } |
Fred Drake | d07868a | 1998-05-14 21:00:28 +0000 | [diff] [blame] | 87 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 88 | sub do_cmd_hackscore{ |
| 89 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 90 | next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 91 | return '_' . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 92 | } |
| 93 | |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 94 | sub use_wrappers{ |
| 95 | local($_,$before,$after) = @_; |
| 96 | my $stuff = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 97 | return $before . $stuff . $after . $_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 98 | } |
| 99 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 100 | sub use_sans_serif{ |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 101 | return use_wrappers(@_[0], '<font face="sans-serif">', '</font>'); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 102 | } |
| 103 | sub use_italics{ |
| 104 | return use_wrappers(@_[0], '<i>', '</i>'); |
| 105 | } |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 106 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 107 | sub do_cmd_optional{ |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 108 | return use_wrappers(@_[0], "</var><big>\[</big><var>", |
| 109 | "</var><big>\]</big><var>"); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 110 | } |
| 111 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 112 | # Logical formatting (some based on texinfo), needs to be converted to |
| 113 | # minimalist HTML. The "minimalist" is primarily to reduce the size of |
| 114 | # output files for users that read them over the network rather than |
| 115 | # from local repositories. |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 116 | |
Fred Drake | 2cafcbb | 1999-03-25 16:57:04 +0000 | [diff] [blame] | 117 | # \file and \samp are at the end of this file since they screw up fontlock. |
| 118 | |
Fred Drake | 2ff880e | 1999-02-05 18:31:29 +0000 | [diff] [blame] | 119 | sub do_cmd_pytype{ return @_[0]; } |
| 120 | sub do_cmd_makevar{ return @_[0]; } |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 121 | sub do_cmd_code{ |
| 122 | return use_wrappers(@_[0], '<tt>', '</tt>'); } |
| 123 | sub do_cmd_module{ |
| 124 | return use_wrappers(@_[0], '<tt class=module>', '</tt>'); } |
| 125 | sub do_cmd_keyword{ |
| 126 | return use_wrappers(@_[0], '<tt class=keyword>', '</tt>'); } |
| 127 | sub do_cmd_exception{ |
| 128 | return use_wrappers(@_[0], '<tt class=exception>', '</tt>'); } |
| 129 | sub do_cmd_class{ |
| 130 | return use_wrappers(@_[0], '<tt class=class>', '</tt>'); } |
| 131 | sub do_cmd_function{ |
| 132 | return use_wrappers(@_[0], '<tt class=function>', '</tt>'); } |
| 133 | sub do_cmd_constant{ |
| 134 | return use_wrappers(@_[0], '<tt class=constant>', '</tt>'); } |
| 135 | sub do_cmd_member{ |
| 136 | return use_wrappers(@_[0], '<tt class=member>', '</tt>'); } |
| 137 | sub do_cmd_method{ |
| 138 | return use_wrappers(@_[0], '<tt class=method>', '</tt>'); } |
| 139 | sub do_cmd_cfunction{ |
| 140 | return use_wrappers(@_[0], '<tt class=cfunction>', '</tt>'); } |
| 141 | sub do_cmd_cdata{ |
| 142 | return use_wrappers(@_[0], '<tt class=cdata>', '</tt>'); } |
| 143 | sub do_cmd_ctype{ |
| 144 | return use_wrappers(@_[0], '<tt class=ctype>', '</tt>'); } |
| 145 | sub do_cmd_regexp{ |
| 146 | return use_wrappers(@_[0], '<tt class=regexp>', '</tt>'); } |
| 147 | sub do_cmd_character{ |
| 148 | return use_wrappers(@_[0], '"<tt class=character>', '</tt>"'); } |
| 149 | sub do_cmd_program{ |
| 150 | return use_wrappers(@_[0], '<b class=program>', '</b>'); } |
| 151 | sub do_cmd_email{ |
| 152 | return use_wrappers(@_[0], '<span class=email>', '</span>'); } |
| 153 | sub do_cmd_mimetype{ |
| 154 | return use_wrappers(@_[0], '<span class=mimetype>', '</span>'); } |
| 155 | sub do_cmd_var{ |
| 156 | return use_wrappers(@_[0], "<var>", "</var>"); } |
| 157 | sub do_cmd_dfn{ |
| 158 | return use_wrappers(@_[0], '<i class=dfn>', '</i>'); } |
| 159 | sub do_cmd_emph{ |
| 160 | return use_italics(@_); } |
| 161 | sub do_cmd_file{ |
| 162 | return use_wrappers(@_[0], '"<tt class=file>', '</tt>"'); } |
| 163 | sub do_cmd_samp{ |
| 164 | return use_wrappers(@_[0], '"<tt class=samp>', '</tt>"'); } |
| 165 | sub do_cmd_kbd{ |
| 166 | return use_wrappers(@_[0], '<kbd>', '</kbd>'); } |
| 167 | sub do_cmd_strong{ |
| 168 | return use_wrappers(@_[0], '<b>', '</b>'); } |
Fred Drake | 2cafcbb | 1999-03-25 16:57:04 +0000 | [diff] [blame] | 169 | sub do_cmd_textbf{ |
| 170 | return use_wrappers(@_[0], '<b>', '</b>'); } |
| 171 | sub do_cmd_textit{ |
| 172 | return use_wrappers(@_[0], '<i>', '</i>'); } |
| 173 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 174 | |
Fred Drake | 2581704 | 1999-01-13 17:06:34 +0000 | [diff] [blame] | 175 | sub do_cmd_refmodule{ |
| 176 | # Insert the right magic to jump to the module definition. |
| 177 | local($_) = @_; |
| 178 | my $key = next_optional_argument(); |
| 179 | my $module = next_argument(); |
| 180 | $key = $module |
| 181 | unless $key; |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 182 | return "<tt class=module><a href=\"module-$key.html\">$module</a></tt>" . $_; |
Fred Drake | 2581704 | 1999-01-13 17:06:34 +0000 | [diff] [blame] | 183 | } |
| 184 | |
Fred Drake | 1a7af39 | 1998-04-01 22:44:56 +0000 | [diff] [blame] | 185 | sub do_cmd_newsgroup{ |
| 186 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 187 | my $newsgroup = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 188 | my $stuff = "<span class=newsgroup><a href=\"news:$newsgroup\">" |
| 189 | . "$newsgroup</a></span>"; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 190 | return $stuff . $_; |
Fred Drake | 1a7af39 | 1998-04-01 22:44:56 +0000 | [diff] [blame] | 191 | } |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 192 | |
| 193 | sub do_cmd_envvar{ |
| 194 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 195 | my $envvar = next_argument(); |
| 196 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 166abba | 1998-04-08 23:10:54 +0000 | [diff] [blame] | 197 | # The <tt> here is really to keep buildindex.py from making |
| 198 | # the variable name case-insensitive. |
| 199 | add_index_entry("environment variables!$envvar@<tt>\$$envvar</tt>", |
| 200 | $ahref); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 201 | add_index_entry("$envvar@\$$envvar", $ahref); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 202 | return "<span class=envvar>$aname\$$envvar</a></span>" . $_; |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 203 | } |
| 204 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 205 | sub do_cmd_url{ |
| 206 | # use the URL as both text and hyperlink |
| 207 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 208 | my $url = next_argument(); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 209 | $url =~ s/~/~/g; |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 210 | return "<span class=url><a href=\"$url\">$url</a></span>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | sub do_cmd_manpage{ |
| 214 | # two parameters: \manpage{name}{section} |
| 215 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 216 | my $page = next_argument(); |
| 217 | my $section = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 218 | return "<span class=manpage><i>$page</i>($section)</span>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | sub do_cmd_rfc{ |
| 222 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 223 | my $rfcnumber = next_argument(); |
| 224 | my $id = "rfcref-" . ++$global{'max_id'}; |
Fred Drake | 2eff3c5 | 1998-12-22 18:02:25 +0000 | [diff] [blame] | 225 | my $href = |
| 226 | "http://info.internet.isi.edu/in-notes/rfc/files/rfc$rfcnumber.txt"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 227 | # Save the reference |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 228 | my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 229 | $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 230 | return ("<span class=rfc><a name=\"$id\"\nhref=\"$href\">" |
| 231 | . "RFC $rfcnumber</a></span>" .$_); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 232 | } |
| 233 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 234 | sub do_cmd_deprecated{ |
| 235 | # two parameters: \deprecated{version}{whattodo} |
| 236 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 237 | my $release = next_argument(); |
| 238 | my $reason = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 239 | return "<b>Deprecated since release $release.</b>\n$reason<p>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 240 | } |
| 241 | |
Fred Drake | 897d12b | 1998-07-27 20:33:17 +0000 | [diff] [blame] | 242 | sub do_cmd_versionadded{ |
| 243 | # one parameter: \versionadded{version} |
| 244 | local($_) = @_; |
| 245 | my $release = next_argument(); |
Fred Drake | 2116d98 | 1999-02-02 18:02:48 +0000 | [diff] [blame] | 246 | return "\nNew in version $release.\n" . $_; |
Fred Drake | 897d12b | 1998-07-27 20:33:17 +0000 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | sub do_cmd_versionchanged{ |
| 250 | # one parameter: \versionchanged{version} |
| 251 | local($_) = @_; |
| 252 | my $release = next_argument(); |
Fred Drake | 2116d98 | 1999-02-02 18:02:48 +0000 | [diff] [blame] | 253 | return "\nChanged in version $release.\n" . $_; |
Fred Drake | 897d12b | 1998-07-27 20:33:17 +0000 | [diff] [blame] | 254 | } |
| 255 | |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 256 | # |
Fred Drake | 2cafcbb | 1999-03-25 16:57:04 +0000 | [diff] [blame] | 257 | # These function handle platform dependency tracking. |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 258 | # |
| 259 | sub do_cmd_platform{ |
| 260 | local($_) = @_; |
| 261 | my $platform = next_argument(); |
| 262 | $ModulePlatforms{$THIS_MODULE} = $platform; |
| 263 | $platform = "Macintosh" |
| 264 | if $platform eq "Mac"; |
| 265 | return "\n<p class=availability>Availability: <span" |
| 266 | . "\n class=platform>$platform</span>.</p>\n" . $_; |
| 267 | } |
| 268 | |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 269 | $IGNORE_PLATFORM_ANNOTATION = ''; |
| 270 | sub do_cmd_ignorePlatformAnnotation{ |
| 271 | local($_) = @_; |
| 272 | $IGNORE_PLATFORM_ANNOTATION = next_argument(); |
| 273 | return $_; |
| 274 | } |
| 275 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 276 | |
| 277 | # index commands |
| 278 | |
| 279 | $INDEX_SUBITEM = ""; |
| 280 | |
| 281 | sub get_indexsubitem{ |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 282 | return $INDEX_SUBITEM ? " $INDEX_SUBITEM" : ''; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 283 | } |
| 284 | |
| 285 | sub do_cmd_setindexsubitem{ |
| 286 | local($_) = @_; |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 287 | $INDEX_SUBITEM = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 288 | return $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 289 | } |
| 290 | |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 291 | sub do_cmd_withsubitem{ |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 292 | # We can't really do the right thing, because LaTeX2HTML doesn't |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 293 | # do things in the right order, but we need to at least strip this stuff |
| 294 | # out, and leave anything that the second argument expanded out to. |
| 295 | # |
| 296 | local($_) = @_; |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 297 | my $oldsubitem = $INDEX_SUBITEM; |
| 298 | $INDEX_SUBITEM = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 299 | my $stuff = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 300 | my $br_id = ++$globals{'max_id'}; |
| 301 | my $marker = "$O$br_id$C"; |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 302 | return |
| 303 | $stuff |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 304 | . "\\setindexsubitem$marker$oldsubitem$marker" |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 305 | . $_; |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 306 | } |
| 307 | |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 308 | # This is the prologue macro which is required to start writing the |
| 309 | # mod\jobname.idx file; we can just ignore it. |
| 310 | # |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 311 | sub do_cmd_makemodindex{ return @_[0]; } |
Fred Drake | fc16e78 | 1998-03-12 21:03:26 +0000 | [diff] [blame] | 312 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 313 | # We're in the document subdirectory when this happens! |
Fred Drake | 166abba | 1998-04-08 23:10:54 +0000 | [diff] [blame] | 314 | # |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 315 | open(IDXFILE, '>index.dat') || die "\n$!\n"; |
| 316 | open(INTLABELS, '>intlabels.pl') || die "\n$!\n"; |
Fred Drake | 166abba | 1998-04-08 23:10:54 +0000 | [diff] [blame] | 317 | print INTLABELS "%internal_labels = ();\n"; |
| 318 | print INTLABELS "1; # hack in case there are no entries\n\n"; |
| 319 | |
| 320 | # Using \0 for this is bad because we can't use common tools to work with the |
| 321 | # resulting files. Things like grep can be useful with this stuff! |
| 322 | # |
| 323 | $IDXFILE_FIELD_SEP = "\1"; |
| 324 | |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 325 | sub write_idxfile{ |
| 326 | my ($ahref, $str) = @_; |
| 327 | print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 328 | } |
| 329 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 330 | |
| 331 | sub gen_link{ |
| 332 | my($node,$target) = @_; |
| 333 | print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 334 | return "<a href=\"$node#$target\">"; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 335 | } |
| 336 | |
| 337 | sub make_index_entry{ |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 338 | my($str) = @_; |
| 339 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 340 | add_index_entry($str, $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 341 | return "$aname$anchor_invisible_mark</a>"; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 342 | } |
| 343 | |
| 344 | sub add_index_entry{ |
| 345 | # add an entry to the index structures; ignore the return value |
| 346 | my($str,$ahref) = @_; |
| 347 | $str = gen_index_id($str, ''); |
| 348 | $index{$str} .= $ahref; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 349 | write_idxfile($ahref, $str); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 350 | } |
| 351 | |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 352 | sub new_link_info{ |
| 353 | my $name = "l2h-" . ++$globals{'max_id'}; |
| 354 | my $aname = '<a name="' . $name . '">'; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 355 | my $ahref = gen_link($CURRENT_FILE, $name); |
| 356 | return ($name, $aname, $ahref); |
| 357 | } |
| 358 | |
| 359 | sub do_cmd_index{ |
| 360 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 361 | my $str = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 362 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 363 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 364 | add_index_entry("$str", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 365 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 366 | } |
| 367 | |
Fred Drake | 2e7edb8 | 1998-05-11 18:31:17 +0000 | [diff] [blame] | 368 | sub do_cmd_kwindex{ |
| 369 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 370 | my $str = next_argument(); |
Fred Drake | 2e7edb8 | 1998-05-11 18:31:17 +0000 | [diff] [blame] | 371 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 372 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 2e7edb8 | 1998-05-11 18:31:17 +0000 | [diff] [blame] | 373 | add_index_entry("<tt>$str</tt>!keyword", $ahref); |
| 374 | add_index_entry("keyword!<tt>$str</tt>", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 375 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 2e7edb8 | 1998-05-11 18:31:17 +0000 | [diff] [blame] | 376 | } |
| 377 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 378 | sub do_cmd_indexii{ |
| 379 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 380 | my $str1 = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 381 | my $str2 = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 382 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 383 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 384 | add_index_entry("$str1!$str2", $ahref); |
| 385 | add_index_entry("$str2!$str1", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 386 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | sub do_cmd_indexiii{ |
| 390 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 391 | my $str1 = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 392 | my $str2 = next_argument(); |
| 393 | my $str3 = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 394 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 395 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 396 | add_index_entry("$str1!$str2 $str3", $ahref); |
| 397 | add_index_entry("$str2!$str3, $str1", $ahref); |
| 398 | add_index_entry("$str3!$str1 $str2", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 399 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 400 | } |
| 401 | |
| 402 | sub do_cmd_indexiv{ |
| 403 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 404 | my $str1 = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 405 | my $str2 = next_argument(); |
| 406 | my $str3 = next_argument(); |
| 407 | my $str4 = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 408 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 409 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 410 | add_index_entry("$str1!$str2 $str3 $str4", $ahref); |
| 411 | add_index_entry("$str2!$str3 $str4, $str1", $ahref); |
| 412 | add_index_entry("$str3!$str4, $str1 $str2", $ahref); |
| 413 | add_index_entry("$str4!$$str1 $str2 $str3", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 414 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 415 | } |
| 416 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 417 | sub do_cmd_ttindex{ |
| 418 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 419 | my $str = next_argument(); |
| 420 | my $entry = $str . get_indexsubitem(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 421 | return make_index_entry($entry) . $_; |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 422 | } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 423 | |
| 424 | sub my_typed_index_helper{ |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 425 | local($word,$_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 426 | my $str = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 427 | # |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 428 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 429 | add_index_entry("$str $word", $ahref); |
| 430 | add_index_entry("$word!$str", $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 431 | return "$aname$anchor_invisible_mark</a>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 432 | } |
| 433 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 434 | sub do_cmd_stindex{ return my_typed_index_helper('statement', @_); } |
| 435 | sub do_cmd_opindex{ return my_typed_index_helper('operator', @_); } |
| 436 | sub do_cmd_exindex{ return my_typed_index_helper('exception', @_); } |
| 437 | sub do_cmd_obindex{ return my_typed_index_helper('object', @_); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 438 | |
| 439 | sub my_parword_index_helper{ |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 440 | local($word,$_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 441 | my $str = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 442 | return make_index_entry("$str ($word)") . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 446 | sub make_mod_index_entry{ |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 447 | my($str,$define) = @_; |
| 448 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 449 | # equivalent of add_index_entry() using $define instead of '' |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 450 | $ahref =~ s/\#[-_a-zA-Z0-9]*\"/\"/ |
| 451 | if ($define eq 'DEF'); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 452 | $str = gen_index_id($str, $define); |
| 453 | $index{$str} .= $ahref; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 454 | write_idxfile($ahref, $str); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 455 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 456 | if ($define eq 'DEF') { |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 457 | # add to the module index |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 458 | my($nstr,$garbage) = split / /, $str, 2; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 459 | $Modules{$nstr} .= $ahref; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 460 | } |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 461 | return "$aname$anchor_invisible_mark</a>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 462 | } |
| 463 | |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 464 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 465 | $THIS_MODULE = ''; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 466 | $THIS_CLASS = ''; |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 467 | |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 468 | sub define_module{ |
| 469 | my($word,$name) = @_; |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 470 | my $section_tag = join('', @curr_sec_id); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 471 | $word = "$word " if $word; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 472 | $THIS_MODULE = "$name"; |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 473 | $INDEX_SUBITEM = "(in $name)"; |
| 474 | print "[$name]"; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 475 | return make_mod_index_entry("<tt>$name</tt> (${word}module)", 'DEF'); |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | sub my_module_index_helper{ |
| 479 | local($word, $_) = @_; |
| 480 | my $name = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 481 | return define_module($word, $name) . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 482 | } |
| 483 | |
| 484 | sub ref_module_index_helper{ |
| 485 | local($word, $_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 486 | my $str = next_argument(); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 487 | $word = "$word " if $word; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 488 | return make_mod_index_entry("<tt>$str</tt> (${word}module)", 'REF') . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 489 | } |
| 490 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 491 | sub do_cmd_bifuncindex{ |
| 492 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 493 | my $str = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 494 | my $fname = "<tt>$str()</tt>"; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 495 | return make_index_entry("$fname (built-in function)") . $_; |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 496 | } |
| 497 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 498 | sub do_cmd_modindex{ return my_module_index_helper('', @_); } |
| 499 | sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); } |
| 500 | sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); } |
| 501 | sub do_cmd_stmodindex{ return my_module_index_helper('standard', @_); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 502 | |
| 503 | # these should be adjusted a bit.... |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 504 | sub do_cmd_refmodindex{ return ref_module_index_helper('', @_); } |
| 505 | sub do_cmd_refbimodindex{ return ref_module_index_helper('built-in', @_); } |
| 506 | sub do_cmd_refexmodindex{ return ref_module_index_helper('extension', @_); } |
| 507 | sub do_cmd_refstmodindex{ return ref_module_index_helper('standard', @_); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 508 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 509 | sub do_cmd_nodename{ return do_cmd_label(@_); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 510 | |
| 511 | sub init_myformat{ |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 512 | # $anchor_invisible_mark = ''; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 513 | $anchor_mark = ''; |
| 514 | $icons{'anchor_mark'} = ''; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 515 | } |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 516 | init_myformat(); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 517 | |
| 518 | # similar to make_index_entry(), but includes the string in the result |
| 519 | # instead of the dummy filler. |
| 520 | # |
| 521 | sub make_str_index_entry{ |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 522 | my($str) = @_; |
| 523 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 524 | add_index_entry($str, $ahref); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 525 | return "$aname$str</a>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 526 | } |
| 527 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 528 | sub do_env_cfuncdesc{ |
| 529 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 530 | my $return_type = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 531 | my $function_name = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 532 | my $arg_list = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 533 | my $idx = make_str_index_entry("<tt class=cfunction>$function_name()</tt>" |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 534 | . get_indexsubitem()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 535 | $idx =~ s/ \(.*\)//; |
| 536 | $idx =~ s/\(\)//; # ???? |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 537 | return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 538 | . $_ |
| 539 | . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 540 | } |
| 541 | |
| 542 | sub do_env_ctypedesc{ |
| 543 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 544 | my $type_name = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 545 | my $idx = make_str_index_entry("<tt class=ctype>$type_name</tt>" |
| 546 | . get_indexsubitem()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 547 | $idx =~ s/ \(.*\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 548 | return "<dl><dt><b>$idx</b>\n<dd>" |
| 549 | . $_ |
| 550 | . '</dl>' |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 551 | } |
| 552 | |
| 553 | sub do_env_cvardesc{ |
| 554 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 555 | my $var_type = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 556 | my $var_name = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 557 | my $idx = make_str_index_entry("<tt class=cdata>$var_name</tt>" |
| 558 | . get_indexsubitem()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 559 | $idx =~ s/ \(.*\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 560 | return "<dl><dt>$var_type <b>$idx</b>\n" |
| 561 | . '<dd>' |
| 562 | . $_ |
| 563 | . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 564 | } |
| 565 | |
| 566 | sub do_env_funcdesc{ |
| 567 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 568 | my $function_name = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 569 | my $arg_list = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 570 | my $idx = make_str_index_entry("<tt class=function>$function_name()</tt>" |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 571 | . get_indexsubitem()); |
| 572 | $idx =~ s/ \(.*\)//; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 573 | $idx =~ s/\(\)<\/tt>/<\/tt>/; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 574 | return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 575 | } |
| 576 | |
| 577 | sub do_env_funcdescni{ |
| 578 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 579 | my $function_name = next_argument(); |
| 580 | my $arg_list = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 581 | return "<dl><dt><b><tt class=function>$function_name</tt></b>" |
| 582 | . " (<var>$arg_list</var>)\n" |
| 583 | . '<dd>' |
| 584 | . $_ |
| 585 | . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 586 | } |
| 587 | |
| 588 | sub do_cmd_funcline{ |
| 589 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 590 | my $function_name = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 591 | my $arg_list = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 592 | my $idx = make_str_index_entry("<tt class=function>$function_name()</tt>" |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 593 | . get_indexsubitem()); |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 594 | $idx =~ s/\(\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 595 | return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 596 | } |
| 597 | |
| 598 | # Change this flag to index the opcode entries. I don't think it's very |
| 599 | # useful to index them, since they're only presented to describe the dis |
| 600 | # module. |
| 601 | # |
| 602 | $INDEX_OPCODES = 0; |
| 603 | |
| 604 | sub do_env_opcodedesc{ |
| 605 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 606 | my $opcode_name = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 607 | my $arg_list = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 608 | my $idx; |
| 609 | if ($INDEX_OPCODES) { |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 610 | $idx = make_str_index_entry( |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 611 | "<tt class=opcode>$opcode_name</tt> (byte code instruction)"); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 612 | $idx =~ s/ \(byte code instruction\)//; |
| 613 | } |
| 614 | else { |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 615 | $idx = "<tt class=opcode>$opcode_name</tt>"; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 616 | } |
| 617 | my $stuff = "<dl><dt><b>$idx</b>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 618 | if ($arg_list) { |
| 619 | $stuff .= " <var>$arg_list</var>"; |
| 620 | } |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 621 | return $stuff . "\n<dd>" . $_ . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 622 | } |
| 623 | |
| 624 | sub do_env_datadesc{ |
| 625 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 626 | my $dataname = next_argument(); |
| 627 | my $idx = make_str_index_entry("<tt>$dataname</tt>" . get_indexsubitem()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 628 | $idx =~ s/ \(.*\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 629 | return "<dl><dt><b>$idx</b>\n<dd>" |
| 630 | . $_ |
| 631 | . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 632 | } |
| 633 | |
| 634 | sub do_env_datadescni{ |
| 635 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 636 | my $idx = next_argument(); |
| 637 | if (! $STRING_INDEX_TT) { |
| 638 | $idx = "<tt>$idx</tt>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 639 | } |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 640 | return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 641 | } |
| 642 | |
| 643 | sub do_cmd_dataline{ |
| 644 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 645 | my $data_name = next_argument(); |
| 646 | my $idx = make_str_index_entry("<tt>$data_name</tt>" . get_indexsubitem()); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 647 | $idx =~ s/ \(.*\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 648 | return "<dt><b>$idx</b><dd>" . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 649 | } |
| 650 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 651 | sub do_env_excdesc{ |
| 652 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 653 | my $excname = next_argument(); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 654 | my $idx = make_str_index_entry("<tt class=exception>$excname</tt>"); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 655 | return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>' |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 656 | } |
| 657 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 658 | sub do_env_fulllineitems{ return do_env_itemize(@_); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 659 | |
| 660 | |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 661 | sub do_env_classdesc{ |
| 662 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 663 | $THIS_CLASS = next_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 664 | my $arg_list = next_argument(); |
| 665 | $idx = make_str_index_entry( |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 666 | "<tt class=class>$THIS_CLASS</tt> (class in $THIS_MODULE)" ); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 667 | $idx =~ s/ \(.*\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 668 | return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 669 | } |
| 670 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 671 | |
| 672 | sub do_env_methoddesc{ |
| 673 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 674 | my $class_name = next_optional_argument(); |
| 675 | $class_name = $THIS_CLASS |
| 676 | unless $class_name; |
Fred Drake | 5a0ca4e | 1999-01-12 04:16:51 +0000 | [diff] [blame] | 677 | my $method = next_argument(); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 678 | my $arg_list = next_argument(); |
| 679 | my $extra = ''; |
| 680 | if ($class_name) { |
| 681 | $extra = " ($class_name method)"; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 682 | } |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 683 | my $idx = make_str_index_entry("<tt class=method>$method()</tt>$extra"); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 684 | $idx =~ s/ \(.*\)//; |
| 685 | $idx =~ s/\(\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 686 | return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 687 | } |
| 688 | |
| 689 | |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 690 | sub do_cmd_methodline{ |
| 691 | local($_) = @_; |
| 692 | my $class_name = next_optional_argument(); |
| 693 | $class_name = $THIS_CLASS |
| 694 | unless $class_name; |
| 695 | my $method = next_argument(); |
| 696 | my $arg_list = next_argument(); |
| 697 | my $extra = ''; |
| 698 | if ($class_name) { |
| 699 | $extra = " ($class_name method)"; |
| 700 | } |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 701 | my $idx = make_str_index_entry("<tt class=method>$method()</tt>$extra"); |
Fred Drake | 7d45f6d | 1999-01-05 14:39:27 +0000 | [diff] [blame] | 702 | $idx =~ s/ \(.*\)//; |
| 703 | $idx =~ s/\(\)//; |
| 704 | return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" |
| 705 | . $_; |
| 706 | } |
| 707 | |
| 708 | |
Fred Drake | d64a40d | 1998-09-10 18:59:13 +0000 | [diff] [blame] | 709 | sub do_cmd_methodlineni{ |
| 710 | local($_) = @_; |
| 711 | next_optional_argument(); |
| 712 | my $method = next_argument(); |
| 713 | my $arg_list = next_argument(); |
| 714 | return "<dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" |
| 715 | . $_; |
| 716 | } |
| 717 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 718 | sub do_env_methoddescni{ |
| 719 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 720 | next_optional_argument(); |
| 721 | my $method = next_argument(); |
| 722 | my $arg_list = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 723 | return "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" |
| 724 | . $_ |
| 725 | . '</dl>'; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 726 | } |
| 727 | |
| 728 | |
| 729 | sub do_env_memberdesc{ |
| 730 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 731 | my $class = next_optional_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 732 | my $member = next_argument(); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 733 | $class = $THIS_CLASS |
| 734 | unless $class; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 735 | my $extra = ''; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 736 | $extra = " ($class_name attribute)" |
Fred Drake | a608feb | 1998-04-12 03:58:13 +0000 | [diff] [blame] | 737 | if (!($class eq '')); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 738 | my $idx = make_str_index_entry("<tt>$member</tt>$extra"); |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 739 | $idx =~ s/ \(.*\)//; |
| 740 | $idx =~ s/\(\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 741 | return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 742 | } |
| 743 | |
| 744 | |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 745 | sub do_cmd_memberline{ |
| 746 | local($_) = @_; |
| 747 | my $class = next_optional_argument(); |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 748 | my $member = next_argument(); |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 749 | $class = $THIS_CLASS |
| 750 | unless $class; |
| 751 | my $extra = ''; |
| 752 | $extra = " ($class_name attribute)" |
| 753 | if (!($class eq '')); |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 754 | my $idx = make_str_index_entry("<tt class=member>$member</tt>$extra"); |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 755 | $idx =~ s/ \(.*\)//; |
| 756 | $idx =~ s/\(\)//; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 757 | return "<dt><b>$idx</b><dd>" . $_; |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 758 | } |
| 759 | |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 760 | sub do_env_memberdescni{ |
| 761 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 762 | next_optional_argument(); |
| 763 | my $member = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 764 | return "<dl><dt><b>$member</b>\n<dd>" . $_ . '</dl>'; |
Fred Drake | 42b31a5 | 1998-03-27 05:16:10 +0000 | [diff] [blame] | 765 | } |
| 766 | |
| 767 | |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 768 | sub do_cmd_memberlineni{ |
| 769 | local($_) = @_; |
| 770 | next_optional_argument(); |
| 771 | my $member = next_argument(); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 772 | return "<dt><b>$member</b><dd>" . $_; |
Fred Drake | 5ccf330 | 1998-04-17 20:04:09 +0000 | [diff] [blame] | 773 | } |
| 774 | |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 775 | @col_aligns = ("<td>", "<td>", "<td>", "<td>"); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 776 | |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 777 | $TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR; |
| 778 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 779 | sub setup_column_alignments{ |
| 780 | local($_) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 781 | my($a1,$a2,$a3,$a4) = split(/[|]/,$_); |
| 782 | my($th1,$th2,$th3,$th4) = ('<th>', '<th>', '<th>', '<th>'); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 783 | $col_aligns[0] = (($a1 eq 'c') ? '<td align=center>' : '<td>'); |
| 784 | $col_aligns[1] = (($a2 eq 'c') ? '<td align=center>' : '<td>'); |
| 785 | $col_aligns[2] = (($a3 eq 'c') ? '<td align=center>' : '<td>'); |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 786 | $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>'); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 787 | # return the aligned header start tags; only used for \begin{tableiii?} |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 788 | $th1 = (($a1 eq 'l') ? '<th align=left>' |
| 789 | : ($a1 eq 'r' ? '<th align=right>' : '<th>')); |
| 790 | $th2 = (($a2 eq 'l') ? '<th align=left>' |
| 791 | : ($a2 eq 'r' ? '<th align=right>' : '<th>')); |
| 792 | $th3 = (($a3 eq 'l') ? '<th align=left>' |
| 793 | : ($a3 eq 'r' ? '<th align=right>' : '<th>')); |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 794 | $th4 = (($a4 eq 'l') ? '<th align=left>' |
| 795 | : ($a4 eq 'r' ? '<th align=right>' : '<th>')); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 796 | return ($th1, $th2, $th3, $th4); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 797 | } |
| 798 | |
| 799 | sub do_env_tableii{ |
| 800 | local($_) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 801 | my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 802 | my $font = next_argument(); |
| 803 | my $h1 = next_argument(); |
| 804 | my $h2 = next_argument(); |
| 805 | $font = '' |
| 806 | if ($font eq 'textrm'); |
| 807 | $globals{'lineifont'} = $font; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 808 | return '<table border align=center>' |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 809 | . "\n <tr$TABLE_HEADER_BGCOLOR>" |
| 810 | . "\n $th1<b>$h1</b></th>" |
| 811 | . "\n $th2<b>$h2</b></th>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 812 | . $_ |
| 813 | . "\n</table>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 814 | } |
| 815 | |
| 816 | sub do_cmd_lineii{ |
| 817 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 818 | my $c1 = next_argument(); |
| 819 | my $c2 = next_argument(); |
| 820 | my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
Fred Drake | 58b2bfd | 1998-04-02 20:14:04 +0000 | [diff] [blame] | 821 | if ($font) { |
Fred Drake | 5cca42e | 1998-04-09 17:59:11 +0000 | [diff] [blame] | 822 | $sfont = "<$font>"; |
Fred Drake | 58b2bfd | 1998-04-02 20:14:04 +0000 | [diff] [blame] | 823 | $efont = "</$font>"; |
| 824 | } |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 825 | my($c1align,$c2align) = @col_aligns[0,1]; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 826 | return "<tr>$c1align$sfont$c1$efont</td>\n" |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 827 | . " $c2align$c2\ </td>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 828 | . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 829 | } |
| 830 | |
| 831 | sub do_env_tableiii{ |
| 832 | local($_) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 833 | my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 834 | my $font = next_argument(); |
| 835 | my $h1 = next_argument(); |
| 836 | my $h2 = next_argument(); |
| 837 | my $h3 = next_argument(); |
| 838 | $font = '' |
| 839 | if ($font eq 'textrm'); |
| 840 | $globals{'lineifont'} = $font; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 841 | return '<table border align=center>' |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 842 | . "\n <tr$TABLE_HEADER_BGCOLOR>" |
| 843 | . "\n $th1<b>$h1</b></th>" |
| 844 | . "\n $th2<b>$h2</b></th>" |
| 845 | . "\n $th3<b>$h3</b></th>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 846 | . $_ |
| 847 | . "\n</table>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 848 | } |
| 849 | |
| 850 | sub do_cmd_lineiii{ |
| 851 | local($_) = @_; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 852 | my $c1 = next_argument(); |
| 853 | my $c2 = next_argument(); |
| 854 | my $c3 = next_argument(); |
| 855 | my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
Fred Drake | 58b2bfd | 1998-04-02 20:14:04 +0000 | [diff] [blame] | 856 | if ($font) { |
Fred Drake | 5cca42e | 1998-04-09 17:59:11 +0000 | [diff] [blame] | 857 | $sfont = "<$font>"; |
Fred Drake | 58b2bfd | 1998-04-02 20:14:04 +0000 | [diff] [blame] | 858 | $efont = "</$font>"; |
| 859 | } |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 860 | my($c1align,$c2align,$c3align) = @col_aligns[0,1,2]; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 861 | return "<tr>$c1align$sfont$c1$efont</td>\n" |
| 862 | . " $c2align$c2</td>\n" |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 863 | . " $c3align$c3\ </td>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 864 | . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 865 | } |
| 866 | |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 867 | sub do_env_tableiv{ |
| 868 | local($_) = @_; |
| 869 | my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
| 870 | my $font = next_argument(); |
| 871 | my $h1 = next_argument(); |
| 872 | my $h2 = next_argument(); |
| 873 | my $h3 = next_argument(); |
| 874 | my $h4 = next_argument(); |
| 875 | $font = '' |
| 876 | if ($font eq 'textrm'); |
| 877 | $globals{'lineifont'} = $font; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 878 | return '<table border align=center>' |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 879 | . "\n <tr$TABLE_HEADER_BGCOLOR>" |
| 880 | . "\n $th1<b>$h1</b></th>" |
| 881 | . "\n $th2<b>$h2</b></th>" |
| 882 | . "\n $th3<b>$h3</b></th>" |
| 883 | . "\n $th4<b>$h4</b></th>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 884 | . $_ |
| 885 | . "\n</table>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 886 | } |
| 887 | |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 888 | sub do_cmd_lineiv{ |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 889 | local($_) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 890 | my $c1 = next_argument(); |
| 891 | my $c2 = next_argument(); |
| 892 | my $c3 = next_argument(); |
| 893 | my $c4 = next_argument(); |
| 894 | my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
| 895 | if ($font) { |
| 896 | $sfont = "<$font>"; |
| 897 | $efont = "</$font>"; |
| 898 | } |
| 899 | my($c1align,$c2align,$c3align,$c4align) = @col_aligns; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 900 | return "<tr>$c1align$sfont$c1$efont</td>\n" |
| 901 | . " $c2align$c2</td>\n" |
| 902 | . " $c3align$c3</td>\n" |
Fred Drake | 15799ed | 1999-02-12 19:23:17 +0000 | [diff] [blame] | 903 | . " $c4align$c4\ </td>" |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 904 | . $_; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 905 | } |
| 906 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 907 | sub do_cmd_maketitle { |
| 908 | local($_) = @_; |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 909 | my $the_title = "\n<div class=titlepage><center>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 910 | if ($t_title) { |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 911 | $the_title .= "\n<h1>$t_title</h1>"; |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 912 | } else { write_warnings("\nThis document has no title."); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 913 | if ($t_author) { |
| 914 | if ($t_authorURL) { |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 915 | my $href = translate_commands($t_authorURL); |
Fred Drake | 2d1f81e | 1999-02-09 16:03:31 +0000 | [diff] [blame] | 916 | $href = make_named_href('author', $href, |
| 917 | "<b><font size='+2'>$t_author</font></b>"); |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 918 | $the_title .= "\n<p>$href</p>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 919 | } else { |
Fred Drake | 2d1f81e | 1999-02-09 16:03:31 +0000 | [diff] [blame] | 920 | $the_title .= ("\n<p><b><font size='+2'>$t_author</font></b></p>"); |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 921 | } |
Fred Drake | 0893205 | 1998-04-17 02:15:42 +0000 | [diff] [blame] | 922 | } else { write_warnings("\nThere is no author for this document."); } |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 923 | if ($t_institute) { |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 924 | $the_title .= "\n<p>$t_institute</p>";} |
Fred Drake | d07868a | 1998-05-14 21:00:28 +0000 | [diff] [blame] | 925 | if ($DEVELOPER_ADDRESS) { |
| 926 | $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";} |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 927 | if ($t_affil) { |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 928 | $the_title .= "\n<p><i>$t_affil</i></p>";} |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 929 | if ($t_date) { |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 930 | $the_title .= "\n<p><strong>$t_date</strong>"; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 931 | if ($PYTHON_VERSION) { |
| 932 | $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";} |
| 933 | $the_title .= "</p>" |
| 934 | } |
| 935 | if ($t_address) { |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 936 | $the_title .= "\n<p>$t_address</p>"; |
| 937 | } else { $the_title .= "\n<p>"} |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 938 | if ($t_email) { |
Fred Drake | c9a4438 | 1998-03-17 06:29:13 +0000 | [diff] [blame] | 939 | $the_title .= "\n<p>$t_email</p>"; |
| 940 | }# else { $the_title .= "</p>" } |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 941 | $the_title .= "\n</center></div>"; |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 942 | return $the_title . $_ ; |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 943 | } |
| 944 | |
| 945 | |
Fred Drake | 885215c | 1998-05-20 21:32:09 +0000 | [diff] [blame] | 946 | # |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 947 | # Module synopsis support |
| 948 | # |
| 949 | |
| 950 | require SynopsisTable; |
| 951 | |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 952 | sub get_chapter_id(){ |
| 953 | my $id = do_cmd_thechapter(''); |
Fred Drake | 45f2601 | 1998-08-04 22:07:18 +0000 | [diff] [blame] | 954 | $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/; |
| 955 | $id =~ s/\.//; |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 956 | return $id; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 957 | } |
| 958 | |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 959 | %ModuleSynopses = ('chapter' => 'SynopsisTable instance'); |
| 960 | |
| 961 | sub get_synopsis_table($){ |
| 962 | my($chap) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 963 | my $st = $ModuleSynopses{$chap}; |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 964 | my $key; |
| 965 | foreach $key (keys %ModuleSynopses) { |
| 966 | if ($key eq $chap) { |
| 967 | return $ModuleSynopses{$chap}; |
| 968 | } |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 969 | } |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 970 | $st = SynopsisTable->new(); |
| 971 | $ModuleSynopses{$chap} = $st; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 972 | return $st; |
| 973 | } |
| 974 | |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 975 | sub do_cmd_moduleauthor{ |
| 976 | local($_) = @_; |
| 977 | next_argument(); |
| 978 | next_argument(); |
| 979 | return $_; |
| 980 | } |
| 981 | |
| 982 | sub do_cmd_sectionauthor{ |
| 983 | local($_) = @_; |
| 984 | next_argument(); |
| 985 | next_argument(); |
| 986 | return $_; |
| 987 | } |
| 988 | |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 989 | sub do_cmd_declaremodule{ |
| 990 | local($_) = @_; |
| 991 | my $key = next_optional_argument(); |
| 992 | my $type = next_argument(); |
| 993 | my $name = next_argument(); |
| 994 | my $st = get_synopsis_table(get_chapter_id()); |
| 995 | # |
| 996 | $key = $name unless $key; |
| 997 | $type = 'built-in' if $type eq 'builtin'; |
| 998 | $st->declare($name, $key, $type); |
| 999 | define_module($type, $name); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 1000 | return anchor_label("module-$key",$CURRENT_FILE,$_) |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1001 | } |
| 1002 | |
| 1003 | sub do_cmd_modulesynopsis{ |
| 1004 | local($_) = @_; |
| 1005 | my $st = get_synopsis_table(get_chapter_id()); |
Fred Drake | 1cc5899 | 1999-04-13 22:08:59 +0000 | [diff] [blame^] | 1006 | $st->set_synopsis($THIS_MODULE, translate_commands(next_argument())); |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 1007 | return $_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1008 | } |
| 1009 | |
| 1010 | sub do_cmd_localmoduletable{ |
| 1011 | local($_) = @_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1012 | my $chap = get_chapter_id(); |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 1013 | return "<tex2html-localmoduletable><$chap>\\tableofchildlinks[off]" . $_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1014 | } |
| 1015 | |
| 1016 | sub process_all_localmoduletables{ |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 1017 | while (/<tex2html-localmoduletable><(\d+)>/) { |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 1018 | my $match = $&; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1019 | my $chap = $1; |
| 1020 | my $st = get_synopsis_table($chap); |
| 1021 | my $data = $st->tohtml(); |
Fred Drake | f7685d7 | 1998-07-25 03:31:46 +0000 | [diff] [blame] | 1022 | s/$match/$data/; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1023 | } |
| 1024 | } |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 1025 | sub process_python_state{ |
| 1026 | process_all_localmoduletables(); |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 1027 | } |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1028 | |
| 1029 | |
| 1030 | # |
| 1031 | # "See also:" -- references placed at the end of a \section |
| 1032 | # |
| 1033 | |
| 1034 | sub do_env_seealso{ |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 1035 | return "<div class=seealso>\n " |
Fred Drake | 2cafcbb | 1999-03-25 16:57:04 +0000 | [diff] [blame] | 1036 | . "<p class=heading><b>See Also:</b></p>\n" |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 1037 | . @_[0] |
| 1038 | . '</div>'; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1039 | } |
| 1040 | |
| 1041 | sub do_cmd_seemodule{ |
| 1042 | # Insert the right magic to jump to the module definition. This should |
| 1043 | # work most of the time, at least for repeat builds.... |
| 1044 | local($_) = @_; |
| 1045 | my $key = next_optional_argument(); |
| 1046 | my $module = next_argument(); |
| 1047 | my $text = next_argument(); |
| 1048 | $key = $module |
| 1049 | unless $key; |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 1050 | return '<div class=seemodule>' |
| 1051 | . "\n<p>Module <b><tt class=module><a href=\"module-$key.html\">" |
| 1052 | . "$module</a></tt></b>" |
| 1053 | . " ($text)</p>\n</div>" |
| 1054 | . $_; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1055 | } |
| 1056 | |
| 1057 | sub do_cmd_seetext{ |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 1058 | return '<div class=seetext><p>' . @_[0] . '</div>'; |
Fred Drake | a0f4c94 | 1998-07-24 22:16:04 +0000 | [diff] [blame] | 1059 | } |
| 1060 | |
| 1061 | |
| 1062 | # |
Fred Drake | 885215c | 1998-05-20 21:32:09 +0000 | [diff] [blame] | 1063 | # Definition list support. |
| 1064 | # |
| 1065 | |
| 1066 | sub do_env_definitions{ |
| 1067 | local($_) = @_; |
Fred Drake | 90fdda5 | 1999-02-16 20:27:42 +0000 | [diff] [blame] | 1068 | return "<dl class=definitions>$_</dl>\n"; |
Fred Drake | 885215c | 1998-05-20 21:32:09 +0000 | [diff] [blame] | 1069 | } |
| 1070 | |
| 1071 | sub do_cmd_term{ |
| 1072 | local($_) = @_; |
Fred Drake | ccc6272 | 1999-01-05 22:16:29 +0000 | [diff] [blame] | 1073 | my $term = next_argument(); |
| 1074 | my($name,$aname,$ahref) = new_link_info(); |
Fred Drake | 885215c | 1998-05-20 21:32:09 +0000 | [diff] [blame] | 1075 | # could easily add an index entry here... |
Fred Drake | 62e4369 | 1998-08-10 19:40:44 +0000 | [diff] [blame] | 1076 | return "<dt><b>$aname" . $term . "</a></b>\n<dd>" . $_; |
Fred Drake | 885215c | 1998-05-20 21:32:09 +0000 | [diff] [blame] | 1077 | } |
| 1078 | |
| 1079 | |
Fred Drake | 2ff880e | 1999-02-05 18:31:29 +0000 | [diff] [blame] | 1080 | process_commands_wrap_deferred(<<_RAW_ARG_DEFERRED_CMDS_); |
| 1081 | code # {} |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 1082 | declaremodule # [] # {} # {} |
| 1083 | memberline # [] # {} |
| 1084 | methodline # [] # {} # {} |
| 1085 | modulesynopsis # {} |
Fred Drake | 557460c | 1999-03-02 16:05:35 +0000 | [diff] [blame] | 1086 | platform # {} |
Fred Drake | 2ff880e | 1999-02-05 18:31:29 +0000 | [diff] [blame] | 1087 | samp # {} |
Fred Drake | 2e1ee3e | 1999-02-10 21:17:04 +0000 | [diff] [blame] | 1088 | setindexsubitem # {} |
Fred Drake | f32834c | 1999-02-12 22:06:32 +0000 | [diff] [blame] | 1089 | withsubitem # {} # {} |
Fred Drake | 2ff880e | 1999-02-05 18:31:29 +0000 | [diff] [blame] | 1090 | _RAW_ARG_DEFERRED_CMDS_ |
| 1091 | |
| 1092 | |
Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 1093 | 1; # This must be the last line |