⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 texi2html

📁 这个是LINUX下的GDB调度工具的源码
💻
📖 第 1 页 / 共 5 页
字号:
#%format_map = (	       'quotation', 'BLOCKQUOTE',	       # lists	       'itemize', 'UL',	       'enumerate', 'OL',	       # poorly supported	       'flushleft', 'PRE',	       'flushright', 'PRE',	       );## an eval of these $complex_format_map->{what}->[0] yields beginning# an eval of these $complex_format_map->{what}->[1] yieleds end$complex_format_map ={ example =>  [  q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=example><pre>"},  q{'</pre></td></tr></table>'} ], smallexample =>  [  q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smallexample><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre>"},  q{'</FONT></pre></td></tr></table>'} ], display => [  q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=display><pre " . 'style="font-family: serif">'},  q{'</pre></td></tr></table>'} ], smalldisplay => [  q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smalldisplay><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre " . 'style="font-family: serif">'},  q{'</pre></FONT></td></tr></table>'} ]};$complex_format_map->{lisp} = $complex_format_map->{example};$complex_format_map->{smalllisp} = $complex_format_map->{smallexample};$complex_format_map->{format} = $complex_format_map->{display};$complex_format_map->{smallformat} = $complex_format_map->{smalldisplay};## texinfo definition shortcuts to real ones#%def_map = (	    # basic commands	    'deffn', 0,	    'defvr', 0,	    'deftypefn', 0,	    'deftypevr', 0,	    'defcv', 0,	    'defop', 0,	    'deftp', 0,	    # basic x commands	    'deffnx', 0,	    'defvrx', 0,	    'deftypefnx', 0,	    'deftypevrx', 0,	    'defcvx', 0,	    'defopx', 0,	    'deftpx', 0,	    # shortcuts	    'defun', 'deffn Function',	    'defmac', 'deffn Macro',	    'defspec', 'deffn {Special Form}',	    'defvar', 'defvr Variable',	    'defopt', 'defvr {User Option}',	    'deftypefun', 'deftypefn Function',	    'deftypevar', 'deftypevr Variable',	    'defivar', 'defcv {Instance Variable}',	    'deftypeivar', 'defcv {Instance Variable}', # NEW: FIXME	    'defmethod', 'defop Method',	    'deftypemethod', 'defop Method', # NEW:FIXME	    # x shortcuts	    'defunx', 'deffnx Function',	    'defmacx', 'deffnx Macro',	    'defspecx', 'deffnx {Special Form}',	    'defvarx', 'defvrx Variable',	    'defoptx', 'defvrx {User Option}',	    'deftypefunx', 'deftypefnx Function',	    'deftypevarx', 'deftypevrx Variable',	    'defivarx', 'defcvx {Instance Variable}',	    'defmethodx', 'defopx Method',	    );## things to skip#%to_skip = (	    # comments	    'c', 1,	    'comment', 1,            'ifnotinfo', 1,            'ifnottex', 1,	    'ifhtml', 1,	    'end ifhtml', 1,            'end ifnotinfo', 1,            'end ifnottex', 1,	    # useless	    'detailmenu', 1,            'direntry', 1,	    'contents', 1,	    'shortcontents', 1,	    'summarycontents', 1,	    'footnotestyle', 1,	    'end ifclear', 1,	    'end ifset', 1,	    'titlepage', 1,	    'end titlepage', 1,	    # unsupported commands (formatting)	    'afourpaper', 1,	    'cropmarks', 1,	    'finalout', 1,	    'headings', 1,            'sp', 1,	    'need', 1,	    'page', 1,	    'setchapternewpage', 1,	    'everyheading', 1,	    'everyfooting', 1,	    'evenheading', 1,	    'evenfooting', 1,	    'oddheading', 1,	    'oddfooting', 1,	    'smallbook', 1,	    'vskip', 1,	    'filbreak', 1,	    'paragraphindent', 1,	    # unsupported formats	    'cartouche', 1,	    'end cartouche', 1,	    'group', 1,	    'end group', 1,	    );#+++#############################################################################                                                                              ## Argument parsing, initialisation                                             ##                                                                              ##---############################################################################## flush stdout and stderr after every write#select(STDERR);$| = 1;select(STDOUT);$| = 1;%value = ();				# hold texinfo variables, see also -D$use_bibliography = 1;$use_acc = 1;## called on -init-filesub LoadInitFile{  my $init_file = shift;  # second argument is value of options  $init_file = shift;  if (-f $init_file)  {    print "# reading initialization file from $init_file\n"       if ($T2H_VERBOSE);    require($init_file);  }  else  {    print "$ERROR Error: can't read init file $int_file\n";    $init_file = '';  }}## called on -langsub SetDocumentLanguage{  my $lang = shift;  if (! exists($T2H_WORDS->{$lang}))  {    warn "$ERROR: Language specs for '$lang' do not exists. Reverting to '" .       ($T2H_LANG ? T2H_LANG : "en") . "'\n";  }  else  {    print "# using '$lang' as document language\n" if ($T2H_VERBOSE);    $T2H_LANG = $lang;  }}#### obsolete cmd line options##$T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} ={ type => '!', linkage => sub {$main::T2H_SECTION_NAVIGATION = 0;}, verbose => 'obsolete, use -nosec_nav', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {use_acc} ={ type => '!', linkage => \$use_acc, verbose => 'obsolete', noHelp => 2};$T2H_OBSOLETE_OPTIONS -> {expandinfo} ={ type => '!', linkage => sub {$main::T2H_EXPAND = 'info';}, verbose => 'obsolete, use "-expand info" instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {expandtex} ={ type => '!', linkage => sub {$main::T2H_EXPAND = 'tex';}, verbose => 'obsolete, use "-expand tex" instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {monolithic} ={ type => '!', linkage => sub {$main::T2H_SPLIT = '';}, verbose => 'obsolete, use "-split no" instead', noHelp => 2};$T2H_OBSOLETE_OPTIONS -> {split_node} ={ type => '!', linkage => sub{$main::T2H_SPLIT = 'section';}, verbose => 'obsolete, use "-split section" instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {split_chapter} ={ type => '!', linkage => sub{$main::T2H_SPLIT = 'chapter';}, verbose => 'obsolete, use "-split chapter" instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {no_verbose} ={ type => '!', linkage => sub {$main::T2H_VERBOSE = 0;}, verbose => 'obsolete, use -noverbose instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {output_file} ={ type => '=s', linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, verbose => 'obsolete, use -out_file instead', noHelp => 2};$T2H_OBSOLETE_OPTIONS -> {section_navigation} ={ type => '!', linkage => \$T2H_SECTION_NAVIGATION, verbose => 'obsolete, use -sec_nav instead', noHelp => 2,};$T2H_OBSOLETE_OPTIONS -> {verbose} ={ type => '!', linkage => \$T2H_VERBOSE, verbose => 'obsolete, use -Verbose instead', noHelp => 2};# read initialzation from $sysconfdir/texi2htmlrc or $HOME/.texi2htmlrcmy $home = $ENV{HOME};defined($home) or $home = '';foreach $i ('/usr/local/etc/texi2htmlrc', "$home/.texi2htmlrc") {    if (-f $i) {	print "# reading initialization file from $i\n" 	    if ($T2H_VERBOSE);	require($i);    }}#+++#############################################################################                                                                              ## parse command-line options#                                                                              ##---############################################################################$T2H_USAGE_TEXT = <<EOT;Usage: texi2html  [OPTIONS] TEXINFO-FILETranslates Texinfo source documentation to HTML.EOT$T2H_FAILURE_TEXT = <<EOT;Try 'texi2html -help' for usage instructions.EOT$options = new Getopt::MySimple;# some older version of GetOpt::Long don't have # Getopt::Long::Configure("pass_through")eval {Getopt::Long::Configure("pass_through");};$Configure_failed = $@ && <<EOT;**WARNING: Parsing of obsolete command-line options could have failed.            Consider to use only documented command-line options (run           'texi2html -help 2' for a complete list) or upgrade to perl            version 5.005 or higher.EOTif (! $options->getOptions($T2H_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")){  print $Configure_failed if $Configure_failed;  die $T2H_FAILURE_TEXT;}if (@ARGV > 1){  eval {Getopt::Long::Configure("no_pass_through");};  if (! $options->getOptions($T2H_OBSOLETE_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n"))  {    print $Configure_failed if $Configure_failed;    die $T2H_FAILURE_TEXT;  }}if ($T2H_CHECK) {    die "Need file to check\n$T2H_FAILURE_TEXT" unless @ARGV > 0;    &check;    exit;}#+++#############################################################################                                                                              ## evaluation of cmd line options#                                                                              ##---############################################################################if ($T2H_EXPAND eq 'info') {  $to_skip{'ifinfo'} = 1;  $to_skip{'end ifinfo'} = 1;} elsif ($T2H_EXPAND eq 'tex'){  $to_skip{'iftex'} = 1;  $to_skip{'end iftex'} = 1;  }$T2H_INVISIBLE_MARK = '<IMG SRC="invisible.xbm">' if $T2H_INVISIBLE_MARK eq 'xbm';## file name buisness#die "Need exactly one file to translate\n$T2H_FAILURE_TEXT" unless @ARGV == 1;$docu = shift(@ARGV);if ($docu =~ /.*\//) {    chop($docu_dir = $&);    $docu_name = $';} else {    $docu_dir = '.';    $docu_name = $docu;}unshift(@T2H_INCLUDE_DIRS, $docu_dir);$docu_name =~ s/\.te?x(i|info)?$//;	# basename of the document$docu_name = $T2H_PREFIX if ($T2H_PREFIX);# subdirif ($T2H_SUBDIR && ! $T2H_OUT){  $T2H_SUBDIR =~ s|/*$||;  unless (-d "$T2H_SUBDIR" && -w "$T2H_SUBDIR")  {    if ( mkdir($T2H_SUBDIR, oct(755)))    {      print "# created directory $T2H_SUBDIR\n" if ($T2H_VERBOSE);    }    else    {      warn "$ERROR can't create directory $T2H_SUBDIR. Put results into current directory\n";      $T2H_SUBDIR = '';    }  }}if ($T2H_SUBDIR && ! $T2H_OUT){  $docu_rdir = "$T2H_SUBDIR/";  print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE);}else{  if ($T2H_OUT && $T2H_OUT =~ m|(.*)/|)  {    $docu_rdir = "$1/";    print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE);  }  else  {    print "# putting result files into current directory \n" if ($T2H_VERBOSE);    $docu_rdir = '';  }}# extensionif ($T2H_SHORTEXTN){  $docu_ext = "htm";}else{  $docu_ext = "html";}if ($T2H_TOP_FILE =~ /\..*$/){  $T2H_TOP_FILE = $`.".$docu_ext";}# result filesif (! $T2H_OUT && ($T2H_SPLIT =~ /section/i || $T2H_SPLIT =~ /node/i)){  $T2H_SPLIT = 'section';}elsif (! $T2H_OUT && $T2H_SPLIT =~ /chapter/i){  $T2H_SPLIT = 'chapter'}else{  undef $T2H_SPLIT;}$docu_doc = "$docu_name.$docu_ext";		# document's contents$docu_doc_file = "$docu_rdir$docu_doc";if ($T2H_SPLIT) {  $docu_toc  = $T2H_TOC_FILE || "${docu_name}_toc.$docu_ext"; # document's table of contents  $docu_stoc = "${docu_name}_ovr.$docu_ext"; # document's short toc  $docu_foot = "${docu_name}_fot.$docu_ext"; # document's footnotes  $docu_about = "${docu_name}_abt.$docu_ext"; # about this document  $docu_top  = $T2H_TOP_FILE || $docu_doc;}else{  if ($T2H_OUT)  {    $docu_doc = $T2H_OUT;    $docu_doc =~ s|.*/||;  }  $docu_toc = $docu_foot = $docu_stoc = $docu_about = $docu_top = $docu_doc;}$docu_toc_file  = "$docu_rdir$docu_toc";$docu_stoc_file = "$docu_rdir$docu_stoc";$docu_foot_file = "$docu_rdir$docu_foot";$docu_about_file = "$docu_rdir$docu_about";$docu_top_file  = "$docu_rdir$docu_top";$docu_frame_file =     "$docu_rdir${docu_name}_frame.$docu_ext";$docu_toc_frame_file = "$docu_rdir${docu_name}_toc_frame.$docu_ext";## variables#$value{'html'} = 1;			# predefine html (the output format)$value{'texi2html'} = $THISVERSION;	# predefine texi2html (the translator)# _foo: internal to track @fooforeach ('_author', '_title', '_subtitle',	 '_settitle', '_setfilename', '_shorttitle') {    $value{$_} = '';		        # prevent -w warnings}%node2sec = ();				# node to section name%sec2node = ();				# section to node name%sec2number = ();                       # section to number%number2sec = ();                       # number to section %idx2node = ();                         # index keys to node%node2href = ();			# node to HREF%node2next = ();			# node to next%node2prev = ();			# node to prev%node2up   = ();			# node to up%bi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -