podbrowser-0.12/0000775000076400007640000000000010724574636012644 5ustar gavingavinpodbrowser-0.12/html2ps-podbrowser0000664000076400007640000040210210476030542016326 0ustar gavingavin: # Use perl eval 'exec perl -S $0 "$@"' if $running_under_some_shell; # This is html2ps version 1.0 beta4, an HTML-to-PostScript converter. # Copyright (C) 1995-2000 Jan Karrman. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Author: Jan Karrman, Dept. of Scientific Computing, Uppsala University, # Sweden, e-mail: jan@tdb.uu.se. # Set the name of the global configuration file. See the installation notes # and manual page for more details on configuration files. $globrc='/tmp/h/lib/html2ps/html2psrc'; $ug='/tmp/h/lib/html2ps/html2ps.html'; $conf=<<'EOR'; @html2ps { package { PerlMagick: 0; ImageMagick: 0; pbmplus: 0; netpbm: 0; djpeg: 0; Ghostscript: 0; TeX: 0; dvips: 0; libwww-perl: 0; geturl: ""; check: ""; path: ""; } paper { type: A4; height: ""; width: ""; } option { twoup: 0; base: ""; check: 0; toc: ""; debug: 0; DSC: 0; encoding: "ISO-8859-1"; rcfile: ""; frame: 0; grayscale: 0; help: 0; hyphenate: 0; scaleimage: 1; cookie: ""; language: ""; landscape: 0; scalemath: 1; number: 0; startno: ""; output: ""; original: 0; rootdir: ""; xref: 0; scaledoc: 1; style: ""; titlepage: 0; text: 0; underline: 0; colour: 0; version: 0; web: ""; duplex: ""; } margin { middle: 2cm; } xref { text: "[p $N]"; passes: 1; } quote { en { open: "“"; close: "”"; open2: "`"; close2: "'"; } sv { open: "”"; close: "”"; open2: "'"; close2: "'"; } da { open: "»"; close: "«"; } no { open: "«"; close: "»"; } fr { open: "« "; close: " »"; } de { open: "„"; close: "“"; open2: "‚"; close2: "`"; } fi: sv; es: en; it: no; nn: no; nb: no; } toc { heading: "

Table of Contents

"; level: 6; indent: 1em; } titlepage { content: "

$T

$[author]

"; margin-top: 4cm; } font { times { names: "Times-Roman Times-Italic Times-Bold Times-BoldItalic"; } new-century-schoolbook { names: "NewCenturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic"; } helvetica { names: "Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique"; } helvetica-narrow { names: "Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique"; } palatino { names: "Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic"; } avantgarde { names: "AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique"; } bookman { names: "Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic"; } courier { names: "Courier Courier-Oblique Courier-Bold Courier-BoldOblique"; } } hyphenation { min: 8; start: 4; end: 3; en { file: ""; extfile: ""; } } header { left: ""; center: ""; right: ""; odd-left: ""; odd-center: ""; odd-right: ""; even-left: ""; even-center: ""; even-right: ""; font-family: Helvetica; font-size: 8pt; font-style: normal; font-weight: normal; color: black; alternate: 1; } footer { left: ""; center: ""; right: ""; odd-left: ""; odd-center: ""; odd-right: ""; even-left: ""; even-center: ""; even-right: ""; font-family: Helvetica; font-size: 8pt; font-style: normal; font-weight: normal; color: black; alternate: 1; } frame { width: 0.6pt; margin: 0.5cm; color: black; } justify { word: 15pt; letter: 0pt; } draft { text: DRAFT; print: ""; dir: 0; font-family: Helvetica; font-style: normal; font-weight: bold; color: F0F0F0; } colour { black: 000000; green: 008000; silver: C0C0C0; lime: 00FF00; gray: 808080; olive: 808000; white: FFFFFF; yellow: FFFF00; maroon: 800000; navy: 000080; red: FF0000; blue: 0000FF; purple: 800080; teal: 008080; fuchsia: FF00FF; aqua: 00FFFF; } html2psrc: "$HOME/.html2psrc"; imgalt: "[IMAGE]"; datefmt: "%e %b %Y %R"; locale: ""; doc-sep: ""; ball-radius: 0.25em; numbstyle: 0; showurl: 0; seq-number: 0; extrapage: 1; break-table: 0; forms: 1; textarea-data: 0; page-break: 1; expand-acronyms: 0; spoof: ""; ssi: 1; prefilled: 0; } BODY { font-family: Times; font-size: 11pt; text-align: left; background: white; } H1, H2, H3, H4, H5, H6 { font-weight: bold; margin-top: 0.8em; margin-bottom: 0.5em; } H1 { font-size: 19pt } H2 { font-size: 17pt } H3 { font-size: 15pt } H4 { font-size: 13pt } H5 { font-size: 12pt } H6 { font-size: 11pt } P, OL, UL, DL, BLOCKQUOTE, PRE { margin-top: 1em; margin-bottom: 1em; } P { line-height: 1.2em; text-indent: 0; } OL, UL, DD { margin-left: 2em } TT, KBD, PRE { font-family: Courier } PRE { font-size: 9pt } BLOCKQUOTE { margin-left: 1em; margin-right: 1em; } ADDRESS { margin-top: 0.5em; margin-bottom: 0.5em; } TABLE { margin-top: 1.3em; margin-bottom: 1em; } DIV.noprint { display: none } DEL { text-decoration: line-through } A:link, HR { color: black } @page { margin-left: 2.5cm; margin-right: 2.5cm; margin-top: 3cm; margin-bottom: 3cm; } EOR eval "require POSIX"; $posix = !$@; %extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1); %fal=("serif","times", "sans_serif","helvetica", "monospace","courier"); @fo=("p","pre","h1","h2","h3","h4","h5","h6","i","b","tt","kbd","cite","samp", "address","blockquote","ol","ul","dl","dt","dd","table","header","footer"); %quote=('','en'); %valid=('font',1, 'font_files',1, 'margin,left',1, 'margin,right',1, 'margin,top',1, 'margin,bottom',1); %cm=('cm',1, 'mm',0.1, 'in',2.54, 'pt',2.54/72, 'pc',2.54/6); %pt=('cm',72/2.54, 'mm',72/25.4, 'in',72, 'pt',1, 'pc',12); %space=('thinsp',6, '#8201',6, 'ensp',2, '#8194',2, 'emsp',1, '#8195',1); $space=join('|',keys %space); %vars=("T","Ti", "N","Pn", "U","UR", "H","h", "A","Au"); %height=("letter",27.9, "legal",35.6, "arche",121.9, "archd",91.4, "archc",61, "archb",45.7, "archa",30.5, "flsa",33, "flse",33, "halfletter",21.6, "11x17",43.2, "ledger",27.9); %width=("letter",21.6, "legal",21.6, "arche",91.4, "archd",61, "archc",45.7, "archb",30.5, "archa",22.9, "flsa",21.6, "flse",21.6, "halfletter",14, "11x17",27.9, "ledger",43.2); $version="html2ps version 1.0 beta4"; $opts="2|b:|c|C:|d|D|e:|f:|F|g|h|H|i:|k:|l:|L|m:|n|N:|o:|O|r:|R|s:|S:|t|T|u|" ."U|v|W:|x:"; %optalias=( 'twoup','2', 'base','b', 'check','c', 'toc','C', 'debug','d', 'DSC','D', 'encoding','e', 'rcfile','f', 'frame','F', 'grayscale','g', 'help','h', 'hyphenate','H', 'scaleimage','i', 'cookie','k', 'language','l', 'landscape','L', 'scalemath','m', 'number','n', 'startno','N', 'output','o', 'original','O', 'rootdir','r', 'xref','R', 'scaledoc','s', 'style','S', 'titlepage','t', 'text','T', 'underline','u', 'colour','U', 'version','v', 'web','W', 'duplex','x'); %type=( 'paper,height',2, 'paper,width',2, 'option,i',3, 'option,m',3, 'option,N',4, 'option,s',3, 'option,x',4, 'xref,passes',4, 'draft,print',5); $usage=<html2ps.dbg") || die "Error opening debug file: html2ps.dbg\n"; print STDERR "***** Writing debug info to html2ps.dbg\n"; print DBG "***** $version\n***** Command: $0 $args\n***** Perl: $]\n"; print DBG "***** HTML2PSPATH=$ENV{'HTML2PSPATH'}\n"; } undef $/; $user=0; $V='(-?\d+\.?\d*|-?\d*\.?\d+)'; &getconf($conf); &pagedef; undef %AT_page; for(@fo,"draft") { eval "\$deffnt{'$_'}=defined \$$_\{'font-family'\}?" ."\$$_\{'font-family'\}:\$body{'font-family'}"; } $user=1; if(open(RC,"<$globrc")) { $conf=; print DBG "***** Global file $globrc:\n$conf" if($opt_d); &getconf($conf); close RC; } else { &dbg("Warning: cannot open the global resource file: $globrc\n") if($globrc); } $html2psrc=~s/^(~|\$HOME)/$ENV{"HOME"}/; $prc=$html2psrc; if($opt_f) { ($prc=$opt_f)=~s/^:/$html2psrc:/; $prc=~s/:$/:$html2psrc/; $prc=~s/::/:$html2psrc:/; } $cwd=$posix?POSIX::getcwd():""; opendir(DIR,$cwd); @local=readdir DIR; closedir DIR; $globrc=~/html2psrc/; $gdir=$`; $hpath=$ENV{"HTML2PSPATH"}?$ENV{"HTML2PSPATH"}:".:"; $hpath=~s/^:/$gdir:/; $hpath=~s/:$/:$gdir/; $hpath=~s/::/:$gdir:/; $cur=$hpath=~s/(^|:)\.($|:)/$1$cwd$2/; @hpath=split(/:/,$hpath); for(@hpath) { if(opendir(DIR,$_)) { @files=readdir DIR; $files{$_}=" @files "; closedir DIR; } } @rc=split(/:/,$prc); for $rc (@rc) { $found=0; S:for $dir (@hpath) { if(-r $rc && !grep(/^$rc$/,@local) || $files{$dir}=~/ $rc /) { chdir $dir if($files{$dir}=~/ $rc / && $cwd); if(open(RC,"<$rc")) { $conf=; print DBG "***** Personal file $rc:\n$conf" if($opt_d); &getconf($conf); close RC; $found=1; } last S; } } &dbg("Error opening resource file: $rc\n") if($opt_f && !$found); } chdir $cwd if($cwd); $user=2; &getconf($opt_S) if($opt_S); print DBG "*****\n" if($opt_d); &pagedef; ($pagew,$pageh)=split /\s+/, $AT_page{'size'} if(defined $AT_page{'size'}); require Image::Magick if($package{'PerlMagick'}); $geturl=$package{'geturl'}; $ulanch="f"; $f=72/2.54; $giftopm="giftopnm" if($package{'netpbm'}); $giftopm="giftoppm" if($package{'pbmplus'}); for(keys %option){eval "\$opt_$_='$option{$_}' if(!defined \$opt_$_)"}; die $usage if $opt_h; die "$version\n" if $opt_v; &dbg("$version\n") if ($opt_v||$opt_d); die "Ghostscript is required to generate DSC PostScript\n" if($opt_D && !$package{'Ghostscript'}); die "Ghostscript is required to generate cross references\n" if($opt_R && !$package{'Ghostscript'}); $tmpname=$posix?POSIX::tmpnam():"h2p_$$"; ($scr=$tmpname)=~/\w+$/; $tempdir=$`; if($opt_u) {$ulanch="t"}; if(defined $opt_x && $opt_x!~/^[0-2]$/) { die "Illegal duplex value: $opt_x\n"; } $V='(-?\d+\.?\d*|-?\d*\.?\d+)'; for $o ($opt_s,$opt_i,$opt_m,$opt_N) { die "Non numeric: $o\n" if(defined($o) && $o!~/^$V$/); } $twoup=$opt_2?"t":"f"; $xp=$extrapage?"t":"f"; die "Invalid option: -W $opt_W\n" if($opt_W!~/^[abflprsL\d]*$/); $tocdoc=$opt_C=~/[ft]/; if($tocdoc && !defined $opt_W) {$opt_W=4}; $mult=$#ARGV>0 || $opt_W; $maxlev=$opt_W=~/(\d+)/?$1:4; $link=$opt_W=~/l/; $local=$opt_W=~/s/; $rel=$opt_W=~/r/; $below=$opt_W=~/b/; $layer=$opt_W=~/L/; $prompt=$opt_W=~/p/; if($opt_C && $opt_C!~/^(b?[ft]|[ft]b?|b?h|hb?)$/) {die "Invalid option: -C $opt_C\n"}; $tc=$opt_C?"t":"f"; $rev=$opt_C=~/t/; $first=$opt_C=~/b/ || $opt_R; $th=$tocdoc?"f":"t"; $oeh=0; $oef=0; @now=localtime; @gmnow=gmtime; POSIX::setlocale(&POSIX::LC_TIME,$locale) if($posix); $R='(\s*>|[^a-zA-Z0-9>][^>]*>)'; $S='([\w.:/%-]+)|"([^"]*)"|\'([^\']*)\''; $X='[\da-fA-F]'; $IM='(gif|jpeg|jpg|png|xbm|xpm|ps|eps)'; for('odd-left','odd-center','odd-right','even-left','even-center','even-right') { $oeh=1 if defined $header{$_}; $oef=1 if defined $footer{$_}; } %metarc=(); for $a ('left','center','right') { if(defined $header{"odd-$a"} || defined $header{"even-$a"}) { $oeh=1; } if(defined $footer{"odd-$a"} || defined $footer{"even-$a"}) { $oef=1; } for('','odd-','even-') { $apa=$header{$_.$a}; $numb=1 if($apa=~/(^|[^\$])\$N/); &spec($header{$_.$a}); &spec($footer{$_.$a}); $header{$_.$a}="($apa)"; $apa=$footer{$_.$a}; $numb=1 if($apa=~/(^|[^\$])\$N/); $footer{$_.$a}="($apa)"; &varsub($header{$_.$a},$footer{$_.$a}); } } if($oeh) { $yz="/YY [[{$header{'odd-left'}}{$header{'even-left'}}]" ."[{$header{'odd-right'}}{$header{'even-right'}}]" ."[{$header{'odd-center'}}{$header{'even-center'}}]] D\n"; } else { $ind=$header{'alternate'}; $yz="/YY [[{$header{'left'}}$ind][{$header{'right'}}".(1-$ind) ."][{$header{'center'}}2]] D\n"; } if($oef) { $yz.="/ZZ [[{$footer{'odd-left'}}{$footer{'even-left'}}]" ."[{$footer{'odd-right'}}{$footer{'even-right'}}]" ."[{$footer{'odd-center'}}{$footer{'even-center'}}]] D"; } else { $ind=$footer{'alternate'}; $yz.="/ZZ [[{$footer{'left'}}$ind][{$footer{'right'}}".(1-$ind) ."][{$footer{'center'}}2]] D"; } $number=$opt_n || !$numb && ($opt_C || $opt_N || $opt_R)?"t":"f"; $tih=$titlepage{'content'}; $toch=$toc{'heading'}; for ($imgalt,$xref{'text'},$tih,$toch,$inh,$draft{'text'}) { &spec($_); } for ($paper{'height'},$paper{'width'},$margin{'middle'},$frame{'margin'}, $mlr,$mrl,$mtl,$mbl,$mll,$mrr,$mtr,$mbr,$pagew,$pageh) { &getval($_,1); } $opt_s*=0.65 if($opt_2 && $opt_L); $opt_N=1 if(!defined $opt_N); $opt_N=int($opt_N-1); $mm=int($margin{'middle'}*$f); $is=0.8*$opt_i; $msc=1/$opt_s; $mag=1200*$opt_m*$opt_s; $xref=$opt_R?"t":"f"; $xref{'text'}=~s/\$N/) WB pN WB (/g; $d=int($f*$frame{'margin'}); for (0..10) { $temp=2**(-$_/2); $width{"a$_"}=int($temp*2**(-1/4)*1000+.5)/10; $height{"a$_"}=int($temp*2**(1/4)*1000+.5)/10; $width{"b$_"}=int($temp*1000+.5)/10; $height{"b$_"}=int($temp*2**(1/2)*1000+.5)/10; } if(!$pagew || !$pageh) { if($width{"\L$paper{'type'}"}) { $paper{'width'}=$width{"\L$paper{'type'}"} if(!defined $paper{'width'}); $paper{'height'}=$height{"\L$paper{'type'}"} if(!defined $paper{'height'}); ($pagew,$pageh)=($paper{'width'},$paper{'height'}); } elsif($paper{'type'}) { &dbg("Unknown paper type: $paper{'type'}\n"); } } if($opt_L) { $wl=$pageh-$mll-$mrl; $wr=$pageh-$mlr-$mrr; $hl=int(($pagew-$mtl-$mbl)*$f+.5); $hr=int(($pagew-$mtr-$mbr)*$f+.5); $xl=int($mtl*$f+.5); $xr=int($mtr*$f+.5); $yl=int($mll*$f+.5); $yr=int($mlr*$f+.5); $rot=" 90 rotate"; } else { $wl=$pagew-$mll-$mrl; $wr=$pagew-$mlr-$mrr; $hl=int(($pageh-$mtl-$mbl)*$f+.5); $hr=int(($pageh-$mtr-$mbr)*$f+.5); $xl=int($mll*$f+.5); $xr=int($mlr*$f+.5); $yl=int(($pageh-$mtl)*$f+.5); $yr=int(($pageh-$mtr)*$f+.5); $rot=""; } if($opt_2) { $wl=($wl-$margin{'middle'})/2; $wr=($wr-$margin{'middle'})/2; } $wl=int($wl*$f+.5); $wr=int($wr*$f+.5); $pag=int($pageh*$f+.5); $fe=$opt_F?"t":"f"; $cf=$opt_U?"t":"f"; $tp=$opt_t?"t":"f"; $rm=$numbstyle?"t":"f"; $pa=$showurl?"t":"f"; $nh=$seq_number?"t":"f"; $bt=$break_table?"t":"f"; $ea=$expand_acronyms?"t":"f"; $fi=$prefilled?"t":"f"; $latin1=$opt_e=~/ISO-8859-1/i; $lt=$del{'text-decoration'}=~/^line-through$/i?"SE":"WB"; if(!$opt_x && defined $opt_x) { $dupl="[{false statusdict/setduplexmode get exec} stopped cleartomark"; } if($opt_x) { $dupl="[{true statusdict/setduplexmode get exec} stopped cleartomark"; } if($opt_x==2) { $dupl.="\n[{true statusdict/settumble get exec} stopped cleartomark"; } %head=("html",1, "head",1, "title",1, "base",1, "meta",1, "link",1, "style",1, "script",1, "isindex",1); %algn=("left",1, "center",2, "right",3, "justify",4, "char",5); %f=("void",1, "above",2, "below",3, "hsides",4, "lhs",5, "rhs",6, "vsides",7, "box",8, "border",9); %r=("none",1, "groups",2, "rows",3, "cols",4, "all",5); %v=("top",1, "middle",2, "bottom",3, "baseline",4); %it=("radio",0, "checkbox",1, "text",2, "password",2, "image",3); %ssy=(200,"\\", 201, "(", 202, ")"); %lity=("I",0, "i",1, "A",2, "a",3, "1",4, "disc",5, "square",6, "circle",7); $ltr=join('|',keys %lity); %tex=('`a',"\340", '\^a',"\342", '`e',"\350", '`e',"\350", 'c\{c\}',"\347", "'e","\351", '\^e',"\352", '"e',"\353", '\^i',"\356", '"i',"\357", '\^o',"\364", '`u',"\371", '\^u',"\373", '"u',"\374", '"y',"\377", 'aa',"\345", '"a',"\344", '"o',"\366", 'ae',"\346", 'oe',"\225"); @hind=(0,0,0,0,0,0); $ltrs='A-Za-z\222-\226\300-\377'; %ent=( "lsquo|#8216",96, "rsquo|#8217",39, "circ|#710",141, "tilde|#732",142, "permil|#8240",143, "dagger|#8224",144, "Dagger|#8225",145, "Yuml|#376",146, "scaron|#353",147, "Scaron|#352",148, "oelig|#339",149, "OElig|#338",150, "lsaquo|#8249",151, "rsaquo|#8250",152, "sbquo|#8218",153, "bdquo|#8222",154, "ldquo|#8220",155, "rdquo|#8221",156, "ndash|#8211",157, "mdash|#8212",158, "trade|#8482",159, "nbsp",160, "iexcl",161, "cent",162, "pound",163, "curren",164, "yen",165, "brvbar",166, "sect",167, "uml",168, "copy",169, "ordf",170, "laquo",171, "not",172, "reg",174, "macr",175, "deg",176, "plusmn",177, "sup2",178, "sup3",179, "acute",180, "micro",181, "para",182, "middot",183, "cedil",184, "sup1",185, "ordm",186, "raquo",187, "frac14",188, "frac12",189, "frac34",190, "iquest",191, "Agrave",192, "Aacute",193, "Acirc",194, "Atilde",195, "Auml",196, "Aring",197, "AElig",198, "Ccedil",199, "Egrave",200, "Eacute",201, "Ecirc",202, "Euml",203, "Igrave",204, "Iacute",205, "Icirc",206, "Iuml",207, "ETH",208, "Ntilde",209, "Ograve",210, "Oacute",211, "Ocirc",212, "Otilde",213, "Ouml",214, "times",215, "Oslash",216, "Ugrave",217, "Uacute",218, "Ucirc",219, "Uuml",220, "Yacute",221, "THORN",222, "szlig",223, "agrave",224, "aacute",225, "acirc",226, "atilde",227, "auml",228, "aring",229, "aelig",230, "ccedil",231, "egrave",232, "eacute",233, "ecirc",234, "euml",235, "igrave",236, "iacute",237, "icirc",238, "iuml",239, "eth",240, "ntilde",241, "ograve",242, "oacute",243, "ocirc",244, "otilde",245, "ouml",246, "divide",247, "oslash",248, "ugrave",249, "uacute",250, "ucirc",251, "uuml",252, "yacute",253, "thorn",254, "yuml",255); %symb=( "alpha|#945",141, "beta|#946",142, "gamma|#947",147, "delta|#948",144, "epsilon|#949",145, "zeta|#950",172, "eta|#951",150, "theta|#952",161, "thetasym|#977",112, "iota|#953",151, "kappa|#954",153, "lambda|#955",154, "mu|#956",155, "nu|#957",156, "xi|#958",170, "pi|#960",160, "piv|#982",166, "omicron|#959",157, "rho|#961",162, "sigma|#963",163, "sigmaf|#962",126, "tau|#964",164, "upsilon|#965",165, "upsih|#978",241, "phi|#966",146, "phiv",152, "chi|#967",143, "psi|#968",171, "omega|#969",167, "Alpha|#913",101, "Beta|#914",102, "Gamma|#915",107, "Delta|#916",104, "Epsilon|#917",105, "Zeta|#918",132, "Eta|#919",110, "Theta|#920",121, "Iota|#921",111, "Kappa|#922",113, "Lambda|#923",114, "Mu|#924",115, "Nu|#925",116, "Xi|#926",130, "Omicron|#927",117, "Pi|#928",120, "Rho|#929",122, "Sigma|#931",123, "Tau|#932",124, "Upsilon|#933",125, "Phi|#934",106, "Chi|#935",103, "Psi|#936",131, "Omega|#937",127, "fnof|#402",246, "perp|#8869",136, "plusmn|#177",261, "cdot|#183",327, "or|#8744",332, "and|#8743",331, "le|#8804",243, "ge|#8805",263, "equiv|#8801",272, "cong|#8773",100, "asymp|#8776",273, "ne|#8800",271, "sub|#8834",314, "sube|#8838",315, "sup|#8835",311, "supe|#8839",312, "isin|#8712",316, "larr|#8592",254, "rarr|#8594",256, "uarr|#8593",255, "darr|#8595",257, "harr|#8596",253, "lArr|#8656",334, "rArr|#8658",336, "uArr|#8657",335, "dArr|#8659",337, "hArr|#8660",333, "forall|#8704","042", "exist|#8707","044", "infin|#8734",245, "nabla|#8711",321, "part|#8706",266, "hellip|#8230",274, "int|#8747",362, "sum|#8721",345, "prod|#8719",325, "real|#8476",302, "image|#8465",301, "bull|#8226",267, "prime|#8242",242, "Prime|#8243",262, "oline|#8254",140, "frasl|#8260",244, "weierp|#8472",303, "alefsym|#8501",300, "crarr|#8629",277, "empty|#8709",306, "notin|#8713",317, "ni|#8715","047", "minus|#8722","055", "lowast|#8727","052", "radic|#8730",326, "prop|#8733",265, "ang|#8736",320, "cap|#8745",307, "cup|#8746",310, "sim|#8764",176, "nsub|#8836",313, "oplus|#8853",305, "otimes|#8855",304, "sdot|#8901",327, "lceil|#8968",351, "rceil|#8969",371, "lfloor|#8970",353, "rfloor|#8971",373, "lang|#9001",341, "rang|#9002",361, "spades|#9824",252, "clubs|#9827",247, "hearts|#9829",251, "diams|#9830",250, "loz|#9674",340); $pc=')WB NL NP('; $nimg=-1; $nm=-1; @font=(); @size=(); @styl=(); @alig=(); @colr=(); @topm=(); @botm=(); @lftm=(); @rgtm=(); @z1=(); @z2=(); @z3=(); &Subst($doc_sep); ($toct=$toch)=~s|<[\w/!?][^>]*>||g; $dh="/h0 [()($toct)] D\n"; &Subst($toch); $toch=~s/ H\(/ -1 H(/g; $toch="($toch)"; &varsub($toch); &Subst($tih); $tih=~s/ H\(/ -1 H(/g; $tih="($tih)"; &varsub($tih); $mn=0; $nfont=0; $mi=0; for (@fo) {&setel($_)}; %arr=%draft; &fs("draft"); if(!$latin1 && !defined $fontid{"times"}) { $fontid{"times"}=$nfont++; @docfonts=(@docfonts,split(/\s+/,$font_names{"times"})); } $wind=0; $wf="t"; if(!$latin1) { $wind=$fontid{"times"}; $wf="f"; } for $k (keys %font_files){ @ff=split(/\s+/,$font_files{$k}); @fn=split(/\s+/,$font_names{$k}); for (0..3) { if($ff[$_]) { $ff{$fn[$_]}=$ff[$_]; } elsif(!$ff{$fn[$_]}) { $ff{$fn[$_]}=$ff[0]; } $fr{$fn[$_]}=$k; } } $pta=defined $p{"text-align"}?$p{"text-align"}:$body{"text-align"}; $pal=0; $pal=1 if($pta=~/^c/i); $pal=2 if($pta=~/^r/i); $pal=3 if($pta=~/^j/i); $bgcol=&col2rgb($body{"background"}); if(!$bgcol) {$bgcol="[16#FF 16#FF 16#FF]"}; if(!$p{"color"}) {$p{"color"}="black"}; $tcol=&col2rgb($p{"color"}); $lcol=&col2rgb($a__link{"color"}); if($lcol) { $Lc="/Lc t D\n/Dl $lcol D\n"; $Lc.=$tcol ne $lcol?"/LX t D":"/LX f D"; } else { $Lc="/Lc f D\n/LX f D"; } $pcol=&col2rgb($pre{"color"}); if(!$pcol) {$pcol="[0 0 0]"}; $deftbg=&col2rgb($table{"background"}); $hc=&col2rgb($hr{"color"}); if(!$hc) {$hc="[0 0 0]"}; $fcol=&col2rgb($frame{"color"}); if(!$fcol) {$fcol="[0 0 0]"}; for ($p{"font-size"},$pre{"font-size"},$header{"font-size"},$frame{'width'}, $footer{"font-size"},$justify{'letter'},$justify{'word'}, $titlepage{'margin-top'}) { &getval($_,2); } for ($p{"line-height"},$p{"text-indent"},$p{"margin-top"},$toc{'indent'}, $ball_radius) { &getval($_,0); } $fl="/FL [/".join("\n/",@docfonts)."] D"; for $k (keys %ff) { $f=$ff{$k}; if(defined $fontid{$fr{$k}} && !defined($cont{$f})) { open(FONT,"<$f") || &dbg("Error opening fontfile $f\n"); ($cont{$f}=)=~s/(^|\r?\n|\r)%.*//g; close FONT; } } $fontdef=""; for (keys %cont) { $fontdef.=$cont{$_}; } &ent($yz); &ent($xref{'text'}); &ent($draft{'text'}); $lnum=0; for (keys %quote_open) { $lid{$_}=$lnum++; if(!defined $quote_close{$_}) {$quote_close{$_}=$quote_open{$_}}; if(!defined $quote_open2{$_}) {$quote_open2{$_}=$quote_open{$_}}; if(!defined $quote_close2{$_}) {$quote_close2{$_}=$quote_close{$_}}; &ent($quote_open{$_}); &ent($quote_close{$_}); &ent($quote_open2{$_}); &ent($quote_close2{$_}); push(@qo,$quote_open{$_}); push(@qc,$quote_close{$_}); push(@qo2,$quote_open2{$_}); push(@qc2,$quote_close2{$_}); } $qo=join(')(',@qo); $qc=join(')(',@qc); $qo2=join(')(',@qo2); $qc2=join(')(',@qc2); $hyphenation_file{''}=$hyphenation_file{'en'}; $br=$collapse_br?"f":"t"; $gd=0; $ddr=defined $draft{'print'}; if($ddr) { if($draft{'print'}==0) { $draft="f"; } else { $gd=1; $draft="t"; } } if(-e '/dev/null' || !-e 'nul') { $pathsep=':'; $gs='gs'; } else { $pathsep=';'; $gs='gswin32c'; } $gb=$gs_bug?"t":"f"; for (keys %quote) {$lid{$_}=$lid{$quote{$_}}}; $ENV{'PATH'}.="$pathsep$package{'path'}" if($package{'path'}); $delim="%-- End of variable part --"; $cd="/Cd {aload length 2 idiv dup dict begin {D} repeat currentdict end} D"; $mysymb=<1?"s":"")." remaining\n"); } if($banner) { $_="/Ba t D /BA {($banner)BN} D\nBs f Pb CP /BO E D pop\n"; &Subst($_); s/ H\(/ -1 H(/g; } else { $_="/Ba f D /BO 0 D Bs"; } if($tocdoc && $first && $ndoc==1) { $TC=" TC\n"; $et=" NP Ep ET /Tc f D"; } else { $TC=""; $et=""; } $_.="\n/UR ($html) D\n/Ti ($ti) D\n/Au ($au) D\n/Df $draft D\n/ME ["; for $i (sort {$metarc{$a} <=> $metarc{$b}} keys %metarc){ $_.="($meta{$i})"; } $_.="] D\n$TC"; if($ndoc==1) {$top=$_}; if(!$tocdoc) { $toc.="ND 1 gt{Ts 3 mul Np $refs{$html}()0 C()BD($ti)ES()$refs{$html}" ." 1 TN()EA()BN}if\n"; } $hv=0; while($P2=~s/(\d) (\d) H\(([^\s<)]*)/$1 $2 $nhd H($3)WB $nref Sn(/) { $nhd++; if($hv+1<$2) { for($hv+1..$2-1) { push(@z1,-$nref); push(@z2,$_); } } $hv=$2; $hind[$hv-1]++; for $i ($hv..5) {$hind[$i]=0}; $hind=join('.',@hind[0..$hv-1]); $hst=$3; $'=~/\)EH/; ($htxt=$hst.$`)=~s/\)EA\(//g; if(!$tocdoc) { $toc.="$hv NH le{$nref($hind\\240\\240)$hv C($htxt)$nref 1 TN()EA()BN}if\n"; } push(@z1,$nref); push(@z2,$hv); $nref++; $htxt=~s/(\s+|\)BR\()/ /g; $htxt=~s/(^\s+|\)[^(]*\(|\s+$)//g; $htxt=~s/\\(200|201|202)/\\$ssy{$1}/g; $htxt="" if(!$latin1); $dh.="/h$nhd [($hind\\240\\240)($htxt)] D\n"; } if($tocdoc) { if($ndoc==1 && !$first) { $toc="TC RC ZF $_ $P2 WB () BN\n"; $P2=""; $P3=""; $np=""; $_=""; } } $P3.="$fl1\n/Cb $bg D /Ct $tcol D /Cl $lcol D /CL -1 D Ct Sc\n"; if($ndoc==1 && !$first) {$P3.="Pt\n"}; $P3.="$fl2\n$_\n$np\n$P2"; if($tocdoc && $ndoc==1 && !$first) { $np="/Cb $bg D NP RC ZF"; } else { $fl1="WB NL$et"; $fl2="DS"; $np="0 BO R"; } } } $P3.=($P3!~/\)\s*$/?"()":"")."WB NL"; if(!$tocdoc && $first && $nhd){$P3="$toc/OU t D /Cb $bg D NP Ep ET $P3"}; if(!$first && ($tocdoc || !$tocdoc && $nhd)){$P3.=" $toc"}; if($ntab>=0) { $_="$tables] D"; &ack($_); y/\t\f/ /; s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; s/\)XX/)9 9 PR/g; s/ H\(/ -1 H(/g; $tables=$_; } $_="%!PS\n%%Title: $title\n$P0$P1"; if($nimg>=0) { $_.="/AX [".join(' ',@XS)."] D\n/AY [".join(' ',@YS)."] D\n" ."/IX [".join(' ',@IX)."] D\n/IT [".join(' ',@IT)."] D\n"; if($nm>=0) { $_.="/AZ [".join(' ',@DP)."] D\n/WS [".join(' ',@WS)."] D\n" ."/FC [".join(' ',@FC)."] D\n/NI $nm D\n/BM ".($nm+1)." array D\nSB\n"; for $i (0..$nm) {$_.="$BM[$i]\n\n"} } $_.="\n$pv%Endpv\n" if($nps); } @kw=split(/[, ]+/,$kw); @Kw=(); for $i (@kw){push(@Kw,$i) if(!grep(/^\Q$i\E$/,@Kw))}; $kw=join(', ',@Kw); for $i (0..$#z2) { $n=0; $j=$i; while($j++<=$#z2 && $z2[$j]>$z2[$i]) {$n++ if($z2[$j]==$z2[$i]+1)}; push(@z3,$n); } $tdef=$ntab>=0?"$tbl$tables\n0 1 $ntab\{TS}for RC ZF\n":""; $hd="/Hr [@z1]D\n/HV [@z2]D\n/Cn [@z3]D"; &cut($hd); if($gd) { $sd="/Df t D /DG IW IW mul IL IL mul add sqrt D IW IL IW IL lt{E}if" ." /WM E D /WX E D /DZ 180 D gsave SD /DZ DZ DF mul D SD grestore\n"; } else { $sd="/Df f D\n"; } $_.=<}ie SW pop D ET RC ZF $sd$rfs$tdef$top$P3 /TE t D NP TU PM 0 eq and{/Pn () D showpage}if end restore EOD if(($first || $opt_R) && $xref{'passes'}) { &dbg("Inserting cross references\n") if($opt_d); for $i (1..$xref{'passes'}) {&ref}; } &fin; sub h2p { if($html eq '-') { $_=<>; } elsif($html=~m|://|) { if(($prompt || $nrem>50) && $level>1) { &prompt("Retrieve document $html (y/n/q)? ",$ans); if($ans=~/q/i) {undef @docs}; return 0 unless($ans=~/y/i); } &geturl($html,$_) || return; $nrem++; if($contyp!~m|text/html|i) {$_=" \n$_"}; unless(($ba2)=$html=~m|(.*://.*/)|) {$ba2=$html."/"}; } else { if(open(FILE,"<$html")) { &dbg("Reading $html\n") if($opt_W || $opt_d); $_=<FILE>; if(!/<HTML/i && $html!~/html?$/i && ($html!~/\.ps$/i || $ndoc>1)) { $_=" <plaintext>\n$_"; } close FILE; $var{DOCUMENT_NAME}=$html; if($posix) { $var{LAST_MODIFIED}=POSIX::strftime("%c",localtime((stat $html)[9])); $var{DATE_LOCAL}=POSIX::strftime("%c",@now); $var{DATE_GMT}=POSIX::strftime("%c",@gmnow); } $mod=(stat $html)[9]; } else { &dbg("*** Error opening $html\n"); return 0; } } if(/^%!/ && /$delim/) { $psin=1; &openps if($opt_o); $_=$P0.$'; for $s ("b","c","cw","g","t") { &dbg("Option -$s ignored\n") if(eval "\$opt_$s"); } &fin; } &hb($_,$head); $head=~/<title$R\s*([\w\W]*)<\/title/i; ($ti=$2)=~s/\s+/ /g; $ti=$doctit{$html} if(!$ti); $ti=~s/\s*$//g; &spec($ti); &ent($ti); $ti="<Untitled>" if(!$ti); $title=$ti if(!$title); $draft="f" if(!$ddr); %meta=(); $au=""; while($head=~/<meta\s[^>]*(name|http-equiv)\s*=\s*["']?\s*(\w+)$R/gi) { $k=lc $2; ($v)=$&=~/content\s*=\s*["']\s*([^"']+)/i; $v=~s/\s+/ /g; $v=~s/\s*$//g; &spec($v); &ent($v); $meta{$k}=$v; if($k=~/author/) {$au=$au?"$au, $v":$v}; if($k=~/keywords/) {$kw=$kw?"$kw, $v":$v}; if($k=~/subject/ && !$su) {$su=$v}; if(!$ddr && $k=~/status/ && $v=~/draft/i) {$draft="t";$gd=1}; } $Au.=($Au?" + ":"").$au if($au); $b2=$opt_b; unless($b2) { ($b2)=$head=~/<base\s+href\s*=\s*"([^"]*)"$R/i; unless($b2) {($b2)=$head=~/<base\s+href\s*=\s*([\w\.-]+)$R/i} unless($b2) {$b2=$ba2} } $b2=~s|[^/]*$||; ($b1)=$b2=~m|(.*://[^/]*)/|; unless($b1) {$b1=$opt_r}; unless($b2) {$b2=$html=~m|(.*/)[^/]*$|?$1:""}; if(!defined $B2) {$B2=$b2}; $levl{$b2.$html}=$levl{$html}; while($link && $head=~/<link\s+[^>]*rel\s*=\s*["']?next$R/gi) { if(($lnk)=$&=~/href\s*=\s*["']?\s*([^"' >]*)/gi) { if($lnk=~m|.+//[^/]+$|) {$lnk=$&."/"} if($lnk=~m|://|) { $rlnk=0; } else { $rlnk=1; if($lnk=~m|^/|) {$lnk=$b1.$lnk} else {$lnk=$b2.$lnk} } while($lnk!~m|^\.\./| && $lnk=~m|[^/]*/\.\./|) {$lnk=$`.$'}; $lnk=~s|/\./|/|g; if(&follow && !$levl{$lnk}) { $levl{$lnk}=$level+1; push(@links,$lnk); } } } ($battr)=/<BODY$R/i; ($lang)=$battr=~/\slang\s*=\s*['"]?([a-zA-Z-]+)/i; ($lang)=$head=~/<html[^>]+lang\s*=\s*['"]?([a-zA-Z-]+)/i if(!$lang); $lang=$opt_l if($opt_l); $lang='en' if(!$lang); $lang=lc $lang; if($battr=~/\stext\s*=\s*['"]?\s*#?(\w+)/i) {$tcol=&col2rgb($1)}; if(!$tcol) {$tcol="Dt"}; if($battr=~/\slink\s*=\s*['"]?\s*#?(\w+)/i) {$lcol=&col2rgb($1)}; if(!$lcol) {$lcol="Dl"}; &inihyph if($opt_H); ($bg)=$battr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $bg=&col2rgb($bg); if($bg) { ($red,$grn,$blu)=@cvec; } else { ($red,$grn,$blu)=$bgcol=~/#(\w+).*#(\w+).*#(\w+)/; $bg="Db"; } $temp=""; while(/<object$R/i) { $temp.=$`; $tag=$&; $end=$'; $type=$tag=~/type\s*=\s*($S)/i?$+:""; $uaddr=$tag=~/data\s*=\s*($S)/i?$+:""; if($type=~/^text\/(html|plain)$/i || !$type && $uaddr=~m"(\.html?|://.+/|://[^/]+)$"i) { $tag=~/data\s*=\s*/i; if(&open($uaddr,"<$idoc")) { if($type=~/plain/i) { $idoc="<XMP>$idoc</XMP>"; } else { &hb($idoc,$dum); } $_=$idoc; $_.=$' if($end=~/<\/object>/i); } else { &dbg("\n*** Error opening $uaddr\n"); $_=$end; } } else { $temp.=$tag; $_=$end; } } $_=$temp.$_; if($opt_c && defined $package{'check'}) { $file=$html; if($html=~m|://|) { open(SCRATCH,">$scr"); print SCRATCH; close SCRATCH; $file="$scr"; } &dbg(`$package{'check'} $file`); } if(!$latin1) { if($opt_e=~/EUC-/i) { s/([\216\217\241-\376].)+/\000$&\000/g; &spec($_); s/\000(.+?)\000/)F1($1)F2(/g; } elsif($opt_e=~/SHIFT-JIS/i) { s/[\201-\237\340-\374][@-~\200-\374]/$&\000/g; s/[\241-\337]+(?!\000)/$&\000/g; s/[ -~\t\n\r\240]+(?!\000)/\002$&\001/g; &spec($_); s/\000//g; } else { while(/\e\$B([^\e]*)/) { $beg=$`; $end=$'; $mat=$1; $mat=~s/\s//g; $_="$beg\001$mat$end"; } s/\e\([BJ]/\002/g; &spec($_); } s/\001/)F1(/g; s/\002/)F2(/g; $_=")F2($_"; y/\000-\010\013\016-\037\177//d; } else { &spec($_); y/\000-\010\013\016-\037\177-\237//d; } s/(\r\n|\r)/\n/g; $refs{$html}=$nref++ if(!defined $refs{$html}); $_="\004$lang\004)WB $refs{$html} Sn($_"; # Yes, I know Perl has case-insensitive pattern matching. But on my system # it takes about 10 times longer to run! $pt=""; if(/<[pP][lL][aA][iI][nN][tT][eE][xX][tT]$R/) {$_=$`;$pt=$'}; while($_){ if(/(<[lL][iI][sS][tT][iI][nN][gG]$R)/) {$_=$`; $tag=$1; $rest=$'; if(/<[xX][mM][pP]$R/){$_=$`; &Subst($_); $P2.="$_)XX("; $_=$'.$tag.$rest; if(m|</[xX][mM][pP]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}} else {&Subst($_); $P2.="$_)XX("; $_=$rest; if(m|</[lL][iI][sS][tT][iI][nN][gG]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}}} elsif(/<[xX][mM][pP]$R/) {$_=$`; &Subst($_); $P2.="$_)XX("; $_=$'; if(m|</[xX][mM][pP]$R|) {$P2.="$`)RP("; $_=$'} else {$P2.=$'; $_=""}} else {&Subst($_);$P2.=$_; $_=""} } $pt=~s/\f/$pc/g; if($pt) {$P2.=")XX($pt"}; $P2.=")"; if($plain) {$P2.="RP ()"}; while($P2=~/XX\(/) { $beg=$`; $'=~/\)(RP|$)/; $mat=$`; $end=$&.$'; $mat=~s/(.*\n){30}.*/$&)WR(/g; ($temp=$mat)=~s/\)[^(]+\(//g; @prel=split(' *\n',$temp); $maxl=0; for $line (@prel) { $line=~s/\\.../x/g; while($line=~/\t+/) { $sp=' ' x (length($&)*8-length($`)%8); $line=~s/\t+/$sp/; $mat=~s/\t+/$sp/; } $ll=length($line); $maxl=$ll if($ll > $maxl); } $P2="$beg ".($#prel+1)." $maxl PR($mat$end"; } $P1=~s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; $P2=~s/[\200-\377]/sprintf("\\%3.3o",ord($&))/eg; $P2=~y/\t\f/ /; 1; } sub Subst{ local($_)=@_; if($page_break) { s/<!--NewPage-->/$pc/g; s/<(\?|hr\s+class\s*=\s*["']?)\s*page-break$R/$pc/gi; } s/<!--OddPage-->/)WB NL OP(/g; if($ssi && $html!~m|://|) { while(/<!--#(include|config|echo)\s+(\w+)\s*="([^"]+)"\s*-->/) { $inc=""; $file=$3; if($1 eq "include" && (substr($file,0,1) ne "/" || $opt_r)) { if(substr($file,0,1) ne "/") { $file=$B2.$file; } elsif($2 eq "virtual") { $file=$opt_r.$file; } if(open INC,"<$file") { $inc=<INC>; &spec($inc); close INC; } } elsif ($1 eq "config" && $2 eq "timefmt") { if($posix) { $var{LAST_MODIFIED}=POSIX::strftime($3,localtime((stat $html)[9])); $var{DATE_LOCAL}=POSIX::strftime($3,@now); $var{DATE_GMT}=POSIX::strftime($3,@gmnow); } } elsif ($1 eq "echo") { $inc=$var{$3}; } $_=$`.$inc.$'; } } s/(&shy;?|&#173;?|<!--hy-->)/)HY(/g; while(/<!--/) { $_=$`; &getcom; $_.=$rest; } $temp=""; while(/<([^"'>]*=\s*["'])/) { $temp.=$`."<"; $_=$1.$'; while(/^[^"'>]*=\s*(["'])/) { $temp.=$&; $_=$'; if(/$1/) { ($tg=$`)=~y/>/\003/; $temp.=$tg.$&; $_=$'; } } } $_=$temp.$_; $a='[aA][lL][iI][gG][nN]'; $Y='[sS][tT][yY][lL][eE]'; $A="($a\\s*=\"?|$Y\\s*=\\s*\"?[tT][eE][xX][tT]-\\s*$a:)"; $I='[lL][eE][fF][tT]'; $C='[cC][eE][nN][tT][eE][rR]'; $D='[rR][iI][gG][hH][tT]'; $J='[jJ][uU][sS][tT][iI][fF][yY]'; $s='[sS][eE][lL][eE][cC][tT]'; $F='[fF][oO][nN][tT]'; $U='[cC][oO][lL][oO][rR]'; $O='[cC][oO][mM][pP][aA][cC][tT]'; s/<\w+[^>]*\s+[iI][dD]\s*=\s*($S)[^>]*>/$&<a name="$+">/g; s|<[dD][eE][lL]$R[\w\W]*?</[dD][eE][lL]>||g if($del{'display'}=~/^none$/); $ndiv=1; s|</?[dD][iI][vV]\d$R||g; s|<(/?)([dD][iI][vV])([>\s])|"<$1$2".($1?--$ndiv:$ndiv++).$3|eg; while(/<[dD][iI][vV](\d+)$R/) { $dbeg=$`; $dnum=$1; $dattr=$2; $dend=$'; $div=""; $ediv=""; if($2=~/class\s*=\s*["']?noprint$R/i) { $_=$dbeg; $_.=$' if($dend=~/<\/[dD][iI][vV]$dnum>/); } else { if($dattr=~/$A\s*($I|$C|$D|$J)/) { $div.=")".$algn{"\L$2"}." Al("; $ediv.=")Ea("; } if($dattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i) { $lang=lc $1; $div.="\004$lang\004"; &inihyph if($opt_H); $dbeg=~/(\004[^\004]*\004)[^\004]*$/; $ediv.=$1; } $dend=~s|</[dD][iI][vV]$dnum>|$ediv)BR(|; $_="$dbeg$div)BR($dend"; } } s|<$C$R|)2 Al(|g; s|</$C$R|)Ea(|g; s|<(\w+)/([^/]+)/|<$1>$2</$1>|g; s/(<\w+[^>]*>)\n|\n(<\/\w+>)/$+/g; s|(<[lL][iI])$R\s*<[pP]>|)0 P($1$2|g; s/<[hH]([1-6])\s+$A\s*($I|$C|$D|$J)$R/)$algn{"\L$3"} $1 H(/g; s|<[hH]([1-6])$R|)0 $1 H(|g; s|</[hH][1-6]>|)EH(|g; s|<[bB][rR]$R|)BR(|g; s/<[pP]\s+[^>]*$A\s*($I|$C|$D|$J)$R/)$algn{"\L$2"} P(/g; s|<[pP]$R|)0 P(|g; s|</[pP]>|)EP(|g; s|<[aA][dD][dD][rR][eE][sS][sS]$R|)AD(|g; s|</[aA][dD][dD][rR][eE][sS][sS]>|)DA(|g; s|<[pP][rR][eE]$R\n?|)XX(|g; s|\n? *</[pP][rR][eE]>|)RP(|g; s|<[dD][tT]\s[^>]*$O$R|)1 DT(|g; s|<[dD][tT]$R|)0 DT(|g; s|<[dD][dD]$R|)DD(|g; s|<[dD][lL]\s[^>]*$O$R|)1 DL(|g; s|<[dD][lL]$R|)0 DL(|g; s|</[dD][lL]>|)LD(|g; s|<[uU][lL]$R|)UL(|g; s|</[uU][lL]>|)LU(|g; s|<[mM][eE][nN][uU]$R|)UL(|g; s|</[mM][eE][nN][uU]>|)LU(|g; s|<[dD][iI][rR]$R|)UL(|g; s|</[dD][iI][rR]>|)LU(|g; s|<[oO][lL]\s[^>]*[sS][tT][aA][rR][tT]\s*=\s*['"]?(-?\d+)$R|$&)WB $1 Ln(|g; s|<[oO][lL]\s[^>]*[tT][yY][pP][eE]\s*=\s*['"]?([1iIaA])$R|)$lity{$1} OL(|g; s|<[oO][lL]$R|)4 OL(|g; s|</[oO][lL]>|)LO(|g; s|<[lL][iI]\s[^>]*[vV][aA][lL][uU][eE]\s*=\s*['"]?(-?\d+)$R|$&)WB $1 Ln(|g; s|<[lL][iI]\s[^>]*[tT][yY][pP][eE]\s*=\s*['"]?($ltr)$R|)$lity{$1} LI(|g; s|<[lL][iI]$R|)-1 LI(|g; s|</[lL][iI]$R||g; s"<([bB][qQ]|[bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE])$R")BQ("g; s"</([bB][qQ]|[bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE])>")QB("g; s|<[sS][tT][rR][oO][nN][gG]$R|)BD(|g; s|</[sS][tT][rR][oO][nN][gG]>|)ES(|g; s|<[sS][aA][mM][pP]$R|)SM(|g; s|</[sS][aA][mM][pP]>|)ES(|g; s|<[qQ]$R(\s*)|$2)Q(|g; s|(\s*)</[qQ]>|)EQ($1|g; s|<[cC][iI][tT][eE]$R|)CT(|g; s|</[cC][iI][tT][eE]>|)ES(|g; s|<[vV][aA][rR]$R|)I(|g; s|</[vV][aA][rR]>|)ES(|g; s|<[bB]$R|)BD(|g; s|</[bB]>|)ES(|g; s|<[iI]$R|)I(|g; s|</[iI]>|)ES(|g; s|<[tT][tT]$R|)TT(|g; s|</[tT][tT]>|)ES(|g; s|<[uU]$R|)UN(|g; s|</[uU]>|)NU(|g; s|<[sS]([tT][rR][iI][kK][eE])?$R|)SE(|g; s|</[sS]([tT][rR][iI][kK][eE])?>|)XE(|g; s|<[dD][fF][nN]$R|)I(|g; s|</[dD][fF][nN]>|)ES(|g; s|<[eE][mM]$R|)EM(|g; s|</[eE][mM]>|)ES(|g; s|<[cC][oO][dD][eE]$R|)SM(|g; s|</[cC][oO][dD][eE]>|)ES(|g; s|<[kK][bB][dD]$R|)KB(|g; s|</[kK][bB][dD]>|)ES(|g; s|<[bB][iI][gG]$R|)4 FZ(|g; s|</[bB][iI][gG]>|)ES(|g; s|<[sS][mM][aA][lL][lL]$R|)2 FZ(|g; s|</[sS][mM][aA][lL][lL]>|)ES(|g; s|<[iI][nN][sS]$R|)sM WB(|g; s|</[iI][nN][sS]>|)WB eM(|g; s|<[dD][eE][lL]$R|)sM $lt(|g; s|</[dD][eE][lL]>|)XE eM(|g; s|<[aA][cC][rR][oO][nN][yY][mM][^>]+[tT][iI][tT][lL][eE]\s*=\s*($S)[^>]*>|)($+)Ac(|g; s|</[aA][cC][rR][oO][nN][yY][mM]>|)Ca(|g; s|<[sS][cC][rR][iI][pP][tT][\w\W]*?</[sS][cC][rR][iI][pP][tT]>||g; s|<[fF][oO][rR][mM][\w\W]*?</[fF][oO][rR][mM]>||g if(!$forms); s|</?[fF][oO][rR][mM]$R|)Ts BE(|g; s/<$s[^>]*[mM][uU][lL][tT][iI][pP][lL][eE]$R/)1 MS(<table>/g; s/<$s$R/)0 MS(<table>/g; s|</$s>|</table>|g; s/<[oO][pP][tT][iI][oO][nN]$R/<tr><td>)O(/g; while(/<[iI][nN][pP][uU][tT]$R/) { $beg=$`; $iattr=$1; $rest=$'; $it=2; if($iattr=~/type\s*=\s*["']?(\w+)/i) {$it=$it{"\L$1"}}; if(defined($it) && $it<2) { $it=($iattr=~/\schecked\W/i?1:0) ." $it"; } elsif($it==2) { $siz=$iattr=~/size\s*=\s*["']?(\d+)/i?$1:12; $ival=$iattr=~/value\s*=\s*($S)/i?$+:""; $it="($ival)$siz $it"; } if(defined($it)) { $cmd=$it==3?"<img $iattr":")$it BX("; } else { $cmd=""; } $_=$beg.$cmd.$rest; } while(/<[tT][eE][xX][tT][aA][rR][eE][aA]$R/) { $beg=$`; $txatr=$1; $rest=$'; if($rest=~m|</[tT][eE][xX][tT][aA][rR][eE][aA]>|) { $rest=$'; $data=$prefilled||$textarea_data?$`:""; $rows=4; $cols=20; if($txatr=~/rows\s*=\s*["']?(\d+)/i) {$rows=$1}; if($txatr=~/cols\s*=\s*["']?(\d+)/i) {$cols=$1}; $nl=$data=~y/\n/\n/; for ($nl..$rows) {$data.="\n"}; $data=~/(.*\n){$rows}/; $tfont=$prefilled?"TT":"0 FZ"; ($data=$&)=~s/.*\n/<tr height=24><td valign=top>)$tfont($&)ES(/g; $wi=10*$cols; $frame=$prefilled?"frame=box":"border"; $_="$beg<table $frame width=$wi cellpadding=2>$data</table>$rest"; } else { $_=$beg.$rest; } } $nfnt=1; s|<(/?)($F)([>\s])|"<$1$2".($1?--$nfnt:$nfnt++).$3|eg; while(/<$F(\d+)([^>]*)$U\s*=\s*["']?\s*#?(\w+)$R/) { $rgb=&col2rgb($3); $_=$`.($rgb?")WB $rgb Sc(":"")."<font$2$4"; $temp=$'; $temp=~s|</$F$1>|</font>)Ec(| if($rgb); $_.=$temp; } $base{"+"}="Bf add "; $base{"-"}="Bf add "; s/<$F\d*\s[^>]*[sS][iI][zZ][eE]\s*=\s*["']?([+-]?)(\d+\.?\d*)$R/)$1$2 $base{$1}FZ(/g; s|<$F\d*$R|)3 FZ(|g; s|</$F\d*>|)Ef(|g; s|<[bB][aA][sS][eE]$F\s[^>]*[sS][iI][zZ][eE]\s*=\s*["']?(\d+)$R|)$1 BZ(|g; while(/(<[aA]\s+[^>]*)[nN][aA][mM][eE]\s*=\s*(["']?)([^"'\s>]*)$R([^\s<)]*)/) { $lnk="$html#$3"; $refs{$lnk}=$nref++ unless(defined $refs{$lnk}); $_="$`$1$4$5)WB $refs{$lnk} Sn($'"; } while(/<[aA]\s+[^>]*[hH][rR][eE][fF]\s*=\s*["']?\s*([^"'\s>]*)$R/) { $beg=$`; $tag=$&; $rest=$'; $lnk=$1; $revtoc=$tag=~/rev\s*=['"]?\s*toc/i; $html=~m|[^/]*$|; $lnk=~s/^\Q$&#/#/; $loc=$lnk=~/^#/; if($loc) { $html=~m|[^/]*$|; $lnk=$&.$lnk; } if($lnk=~m|.+//[^/]+$|) {$lnk=$&."/"} if($lnk=~m|://|) { $rlnk=0; } else { $rlnk=1; if($lnk=~m|^/|) {$lnk=$b1.$lnk} elsif($lnk!~m|^\w+:|) {$lnk=$b2.$lnk}; } while($lnk!~m|^\.\./| && $lnk=~m|[^/]*/\.\./|) {$lnk=$`.$'}; $lnk=~s"(^|/)\./"$1"g; ($doc)=$lnk=~/([^#]*)/; ($doctit{$doc})=$tag=~/title\s*=['"]([^'"]*)['"]/i; $T=0; $anch=2; if($loc || grep(/^\Q$doc\E$/,(@docs,@links)) || $opt_W && !$link && $level<=$maxlev && &follow){ $refs{$lnk}=$nref++ unless(defined $refs{$lnk}); $anch="$refs{$lnk} 1"; $ltype=$rev && $revtoc && $ndoc==1 || $opt_C=~/f/ && $ndoc==1?1:0; $rest=~s|</a>|)$refs{$lnk} $ltype TN TL()Ec /AF f D(|i; if(&follow && !$levl{$doc}) { &dbg("Link: $doc\n") if($opt_d); $levl{$doc}=$level+1; push(@links,$doc); } } elsif(defined $refs{$lnk}) { $anch="$refs{$lnk} 1"; } $addr=$dum{$lnk}?"R$dum{$lnk}":0; if(!$dum{$lnk} && $lnk=~m|://|) { $dum{$lnk}=$nlnk++; $rfs.="/R$dum{$lnk} ($lnk) D\n"; $addr="R$dum{$lnk}"; } $_=$beg.")$addr $anch A(".$rest; } s|</[aA]>|)EA(|g; if((!$mult || $doc_sep eq $pc && $mult) && m|<[bB][aA][nN][nN][eE][rR]$R([\w\W]*)</[bB][aA][nN][nN][eE][rR]>|) { $banner=$2; $_=$`.$'; } while(/<[tT][aA][bB][lL][eE]([^>]*)>/) { local($beg)=$`; local($rest)=$'; $tattr=$1; $tag=$&; $rest=~/(<\/[tT][aA][bB][lL][eE]>|$)/; $table=$`; $rest=$'; while($table=~/<[tT][aA][bB][lL][eE]([^>]*)>/) { $tattr=$1; $table=$'; $beg.=$tag.$`; $tag=$&; } ($tla)=$tattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; if(!$tla) {($tla)=$beg=~/\004_?([^\004]*)\004[^\004]*$/}; $ntab++; $table=~s/^\s*//; undef %cells; undef %rd; undef @cali; undef @cval; undef @cgrp; undef @cwid; undef @codc; undef @r0; undef @c0; ($capat,$cap)=$table=~m|<caption$R([\w\W]*)</caption>|i; $capat=~/ALIGN\s*=\s*["']?\s*(\w+)/i; $capa=0; $capa=1 if("\L$1" eq "bottom"); $capa=-1 if($cap!~/\S/); $bord=0; if($tattr=~/border/i) { ($bord)=$'=~/^\s*=\s*["']?(\d+)/; if(!$bord && $bord ne "0") {$bord=1}; } ($talgn)=$tattr=~/ALIGN\s*=\s*["']?\s*(\w+)/i; $tal=-1; $tal=0 if($talgn=~/^left$/i); $tal=1 if($talgn=~/^center$/i); $tal=2 if($talgn=~/^right$/i); ($fra)=$tattr=~/FRAME\s*=\s*["']?\s*(\w+)/i; if($fra && $f{"\L$fra"}) {$fra=$f{"\L$fra"}} else {$fra=$bord?9:1}; ($rul)=$tattr=~/RULES\s*=\s*["']?\s*(\w+)/i; if($rul && $r{"\L$rul"}) {$rul=$r{"\L$rul"}} else {$rul=$bord?5:1}; unless(($twid)=$tattr=~/WIDTH\s*=\s*["']?(\d+\.?\d*%?)/i) {$twid=0}; $twid=$twid=~/%$/?$`/100:-$twid; ($cpad)=$tattr=~/CELLPADDING\s*=\s*["']?\s*$V/i; if($tattr=~/CELLSPACING\s*=\s*["']?\s*$V/i && $1!=0) {$cpad+=$1/2}; ($tbg)=$tattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $tbg=&col2rgb($tbg); ($tcl)=$tattr=~/CLASS\s*=\s*["']?\s*(\w+)/i; $tcl="\L$tcl" eq "telelista"? 1: 0; $ic=0; $span=1; undef $gal; undef $gva; undef $odc; undef $gwi; $cgs=0; while($table=~/<[cC][oO][lL]([^>]*>)/g && $span>0) { $cola=$1; $ab=$`; $aft=$'; $cola=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $alg=$algn{"\L$2"}; ($val)=$cola=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $val=$v{"\L$val"}; ($odc)=$cola=~/CHAR\s*=\s*["']?(.)/i; unless(($wid)=$cola=~/WIDTH\s*=\s*["'](\d+%?)/i) {$wid=0}; if($wid=~/%$/) {$wid=$`/100}; ($span)=$cola=~/SPAN\s*=\s*["']?\s*(\d+)/i; if(!$span && $span ne "0") {$span=1}; $us=1; if($cola=~/^GROUP/i) { $gal=$alg; $gva=$val; $gdc=$odc; $gwi=$wid; $cgs=1; if($aft=~/<COL\s/i) { $us=$`=~m|</?COLGROUP|i; } } else { while($ab=~/<COLGROUP/i) {$ab=$'}; if($ab=~m|</COLGROUP|i) { undef $gal; undef $gva; undef $odc; undef $gwi; } if(!$alg) {$alg=$gal}; if(!$val) {$val=$gva}; if(!$odc) {$odc=$gdc}; if(!$wid) {$wid=$gwi}; if($span eq "0") { $ic++; push(@cali,$alg); push(@cval,$val); push(@cwid,$wid); push(@codc,$odc); push(@cgrp,1); } } if($us) { for (1..$span) { $ic++; push(@cali,$alg); push(@cval,$val); push(@cwid,$wid); push(@codc,$odc); push(@cgrp,$cgs); $cgs=0; } } } $table=~/<t[hd][\s>]/i; if($`!~/<tr/i) {$table="<TR>$table"}; $nrow=-1; $ncol=-1; $nhead=0; $nfoot=0; $nb=0; unless($table=~/<tbody$R/i || $table=~s|</tfoot>|$&<tbody>|i) { $table=~s|</thead>|$&<tbody>|i; } while($table=~/<[tT][rR]\s*([^>]*)>/g) { $nrow++; $ab=$`; $row=$'; $rattr=$1; for $j (@c0) { $cells{"$nrow,$j,0"}=1; } $rgrp=0; if($ab=~/<tbody$R/i) { $ib=0; while($ab=~/<[tT][bB][oO][dD][yY]$R/g) { $ib++; $battr=$1; if($ib>$nb) { $rgrp=1; $nb=$ib; } } } else { if($ab=~/<tfoot$R/i) { $nfoot++; $battr=$1; } elsif($ab=~/<thead$R/i) { $nhead++; $battr=$1; } } $battr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $balgn=$algn{"\L$2"}; $battr=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $bva=$v{"\L$1"}; ($bdc)=$battr=~/CHAR\s*=\s*["']?(.)/i; $rd{"$nrow,0"}=0; $rd{"$nrow,1"}=0; $rd{"$nrow,2"}=0 unless($rd{"$nrow,2"}); $rd{"$nrow,3"}=$rgrp; $rattr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i; $ralgn=$algn{"\L$2"}; $rattr=~/VALIGN\s*=\s*["']?\s*(\w+)/i; $rva=$v{"\L$1"}; ($rla[$nrow])=$rattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; ($rbg)=$rattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $rbg[$nrow]=&col2rgb($rbg); ($rdc)=$rattr=~/CHAR\s*=\s*["']?(.)/i; if($row=~/<tr/i) {$row=$`}; $rh[$nrow]=$rattr=~/HEIGHT\s*=\s*["']?(\d+)/i?$1:0; $icol=0; $colsp=1; while($row=~/<[tT]([hH]|[dD])(\s*[^>]*)>/g && $colsp>0) { $cattr=$2; $cell=$'; $ctype=$1=~/h/i?1:0; if($cell=~/<t[hd]/i) {$cell=$`}; $cell=~s/\s+$//; $cell=~s/\)HY\($/\255/; $cell=~s/[\200-\377]([^\\]|\\20.)/$&)WB(/g if(!$latin1); ($rowsp)=$cattr=~/ROWSPAN\s*=\s*["']?(\d+)/i; $rsp=$rowsp; if(!$rsp) { if($rsp eq "0") { push(@c0,$icol); } else { $rowsp=1; } $rsp=1; } ($colsp)=$cattr=~/COLSPAN\s*=\s*["']?(\d+)/i; $csp=$colsp; if(!$csp) { if($csp eq "0") { push(@r0,$nrow); $csp=$ncol-$icol<0? 1: $ncol-$icol+1; } else { $colsp=1; $csp=1; } } ($cdc)=$cattr=~/CHAR\s*=\s*["']?(.)/i; while($cells{"$nrow,$icol,0"}==1) {$icol++}; # for $i ($nrow..$nrow+$rsp-2) {$rd{"$i,2"}=1}; for $j ($icol..$icol+$csp-1) { for $i ($nrow..$nrow+$rsp-1) { $cells{"$i,$j,0"}=1; } } if($colsp) { for $j ($ncol+1..$icol+$csp) { for $i (@r0) { $cells{"$i,$j,0"}=1; } } } if($ic<$icol+$csp) { for ($ic..$icol+$csp-1) { push(@cali,$cali[$ic-1]); push(@cval,$cval[$ic-1]); push(@cgrp,0); } $ic=$icol+$csp; } $cal=$ctype; $cal=$balgn-1 if($balgn); $cal=$ralgn-1 if($ralgn); $cal=$cali[$icol]-1 if($cali[$icol]); if($cattr=~/(^|\s)ALIGN\s*=\s*["']?\s*(\w+)/i) { $cal=$algn{"\L$2"}-1 if($algn{"\L$2"}); } $cvl=2; $cvl=$cval[$icol] if($cval[$icol]); $cvl=$bva if($bva); $cvl=$rva if($rva); if($cattr=~/VALIGN\s*=\s*["']?\s*(\w+)/i) { $cvl=$v{"\L$1"} if($v{"\L$1"}); } ($cbg)=$cattr=~/BGCOLOR\s*=\s*["']?\s*#?(\w+)/i; $cbg=&col2rgb($cbg); for($rbg[$nrow],$tbg,$deftbg,$bg) {$cbg=$_ if(!$cbg)}; $now=0; $ro=$cattr=~/class\s*=\s*["']?rot(-?90)/i?$1:0; if($cattr=~/NOWRAP/i || $cal==4 || $ro) {$now=1}; $dc="."; $dc=$bdc if($bdc || $bdc eq "0"); $dc=$rdc if($rdc || $rdc eq "0"); $dc=$codc[$icol] if($codc[$icol] || $codc[$icol] eq "0"); $dc=$cdc if($cdc || $cdc eq "0"); ($wid)=$cattr=~/WIDTH\s*=\s*["'](\d+%?)/i; if($wid=~/%$/) {$wid=$`/100}; if($wid>$cwid[$icol]) {$cwid[$icol]=$wid}; if($cpad || $cpad eq "0") { $clm=$cpad; $crm=$cpad; $ctm=$cpad; $cbm=$cpad; } else { $clm=$rul<5?8:4; $crm=$rul<5?8:4; $ctm=2; $cbm=6; } if($tcl==1) { $clm=$icol>0?12:2; $crm=12; $ctm=0; $cbm=0; } if($rul==1 && $fra==1 && $icol==0 && $tal==0) {$clm=0}; ($lang)=$cattr=~/lang\s*=\s*["']?([a-zA-Z-]+)/i; for($rla[$nrow],$tla) {$lang=$_ if(!$lang)}; $lang=lc $lang; &inihyph if($opt_H); $cbg=~/#(\w+).*#(\w+).*#(\w+)/; &img($cell,$1,$2,$3); @cll=("{(\004$lang\004)WB($cell)}",0,0,$ctype,0,$colsp,$rowsp,$cal, "($dc)",$cvl,$now,$clm,$crm,$ctm,$cbm,0,0,0,0,$cbg,$ro); for $i (0..$#cll) {$cells{"$nrow,$icol,$i"}=$cll[$i]}; $icol+=$csp; if($icol-1>$ncol) {$ncol=$icol-1}; } } for $j (0..$ncol) { for $i (0..$nrow) { if($cells{"$i,$j,0"} && $cells{"$i,$j,0"}!=1) { if($cells{"$i,$j,6"}>$nrow-$i+1) {$cells{"$i,$j,6"}=$nrow-$i+1}; if($cells{"$i,$j,6"}>1) {$rd{"$i,2"}=1}; } } } $rd{"$nrow,2"}=0; $rw="["; for $i (0..$nrow) { $rw.="[$rh[$i] ".$rd{"$i,1"}." ".$rd{"$i,2"}." ".$rd{"$i,3"}." 0 0 ["; for $j (0..$ncol) { $cbg=""; for($rbg[$i],$tbg,$deftbg,$bg) {$cbg=$_ if(!$cbg)}; $temp="[{()}0 0 0 0 1 1 0(.)0 0 $clm $crm $ctm $cbm 0 0 0 0 $cbg $ro]"; if($cells{"$i,$j,0"}==1) { $temp="0"; } elsif($cells{"$i,$j,0"}) { $temp="["; for $k (0..$#cll) { $temp.=$cells{"$i,$j,$k"}." "; } $temp.="]"; } $rw.="$temp\n"; } $rw.="]]\n"; } if($nrow==$nhead+$nfoot-1) { $nhead=0; $nfoot=0; } $tdesc="[0 0 $tcl 0 0 $tal 0 $twid $bord $nrow $ncol" ." $nhead $nfoot $fra $rul {($cap)} $capa]\n"; $cdesc="["; for (0..$ncol) { unless($wid=$cwid[$_]) {$wid=0}; $cdesc.="[0 0 0 $wid $cgrp[$_] 0 0]"; } $cdesc.="]\n"; $tables.="[$tdesc $cdesc $rw]]\n"; $_=$beg.")$ntab PT(".$rest; } &img($_,$red,$grn,$blu); &ack($_); $_[0]=$_; } sub getcom{ $com=$&; $'=~/--\s*(--|>)/; $com.=$`.$&; $rest=$'; while($1 eq "--") { $'=~/(>)/ if($'!~/--\s*(--|>)/); $com.=$`.$&; $rest=$'; } } sub getl { ($l)=@_; if(!$lid{$l}) { while($l=~s/-[^-]+$// && !$lid{$l}) {}; } $lid{$l}; } sub ack { local($_)=@_; chdir $tempdir; while (/<[mM][aA][tT][hH]/) { $beg=$`; $rest=$&.$'; $rest=~m|</[mM][aA][tT][hH]>|; $end=$'; $math=$`; if(&math2sym($math)) { $_=$beg.$sym.$end; } elsif($package{'TeX'} && $package{'dvips'}) { $math=~s|\\200|\\|g; $math=~s|\\201|\(|g; $math=~s|\\202|\)|g; &math2tex($math); open(SCRATCH,">$scr.tex"); print SCRATCH $tex; close SCRATCH; `tex $scr.tex`; `dvips -E -o $scr.ps $scr.dvi`; open(LOG,"$scr.log"); $log=<LOG>; close LOG; ($h,$d)=$log=~/[\w\W]*$prog: +([\d.]+)pt: +([\d.]+)/ ? ($1,$2) : (1,0); $above=$h+$d>0?sprintf("%.4f",$h/($h+$d)):0; open(PS,"$scr.ps"); $pic=<PS>; if($pic=~/^%!/ && $pic=~/%%BoundingBox: +$V +$V +$V +$V/) { $xs=$3-$1; $ys=$4-$2; $llx=$1; $lly=$2; $ps=""; for $i (split(/\n/,$pic)) { $ps.=$i."\n" if($i && $i!~/^%/); } if($ps=~/\nTeXDict begin/) { if(!$ph) { $ph="/DH {1 F div dup scale /showpage {} D\n$`$&} D\n%EndDH\n"; $pv=$ph.$pv; } $ps="save -$llx -$lly translate\nDH$' restore"; } } $nimg++; $nps--; push(@XS,$xs); push(@YS,$ys); push(@IX,$nps); push(@IT,2); $pv.="/P$nimg {$ps} D\n"; $eps{"P$nimg"}=$ps; $_=$beg.")$above 3 (P$nimg) $nimg IM(".$end; } else { $math=~s/<math$R//i; $_=$beg.$math.$end; } } chdir $cwd; s|<[sS][uU][bB]$R|)Sb(|g; s|<[sS][uU][pP]$R|)Sp(|g; s"</[sS][uU]([bB]|[pP])>")Es("g; s|<[A-Za-z/!?]\w*$R||g; &ent($_); y/\003/>/; s/\004([^\004]*)\004/")".&getl($1)." Sl($&"/eg; if($opt_H) { &dbg("Inserting potential hyphenation points\n") if($opt_d && $ndoc>0); $temp=""; while(/\004([^\004]*)\004/) { $temp.=$`; $lang=$1; $end=$'; if($end=~/\004([^\004]*)\004/) { $htext=$`; $end=$&.$'; } else { $htext=$end; $end=""; } $apa=""; while($htext=~/(..?)\(([^)]*)/) { $slut=$'; if($1 eq "XX") { $apa.=$`.$&; if($'=~/RP\(/) { $apa.=$`; $htext=$&.$'; } else { $apa.=$slut; $htext=""; } } elsif($1 eq ") ") { $apa.=$`.$&; $htext=$'; } else { $apa.="$`$1("; $htext=$'; ($txt=$2)=~s/[$ltrs]{$hyphenation{'min'},}/&hyph($&)/eg; $apa.=$txt; } } $_=$apa.$slut.$end; } $_=$temp.$_; } s/\004([^\004]*)\004//g; $_[0]=$_; } sub ent { local($_)=@_; s|&#x($X+);?|"&#".hex($1).";"|egi; for $char (keys %ent) {s/&($char)(;|$|(?=\W))/chr($ent{$char})/eg}; for $char (keys %symb) {s/&($char)(;|$|(?=\W))/)SY(\\$symb{$char})ES(/g}; s/&(euro|#8364)(;|$|(?=\W))/)MY(e)ES(/g; s|&lt;?|<|g; s|&gt;?|>|g; s|&quot;?|"|g; s/&($space);?/)$space{$1} Se(/g; s|&#(\d+);?|$1==38?"\005":$1<256?chr($1):$&|eg; s/(\005|&amp;?)/\&/g; $_[0]=$_; } sub spec { $_[0]=~s/(\\|&#92(;|$|(?=\W)))/\\200/g; $_[0]=~s/(\(|&#40(;|$|(?=\W)))/\\201/g; $_[0]=~s/(\)|&#41(;|$|(?=\W)))/\\202/g; $_[0]=~s/&(there4|#8756|#[xX]2234)(;|$|(?=\W))/)SY(\\200)ES(/g; } sub math2tex { local($_)=@_; local($beg,$rest); %a=("line","overline", "cub","overbrace", "hat","widehat", "tilde","widetilde", "larr", "overleftarrow", "rarr", "overrightarrow"); %b=("line","underline", "cub","underbrace", "hat","widehat", "tilde","widetilde"); %s=("medium","\\big", "large","\\Big", "huge","\\bigg"); ($mattr)=/<math$R/i; $st=$mattr=~/class\s*=\s*["']?chem/i?'\rm ':''; $di=$mattr=~/class\s*=\s*["']?displayed/i?'\displaystyle ':''; s/<math$R//gi; s/\\/\\backslash/g; s/__/_\\>_/gi; s/\^\^/^\\>^/gi; s/_([^_]+)_/_{$1}/g; s/\^([^^]+)\^/^{$1}/g; s/&thinsp;?/\\,/g; s/&sp;?/\\>/g; s/&emsp;?/\\;/g; s/&nbsp;?/\\>/g; s/&epsi;?/\\varepsilon /g; s/&upsi;?/\\upsilon /g; s/&piv;?/\\varpi /g; s/&sigmav;?/\\varsigma /g; s/&thetav;?/\\vartheta /g; s/&phiv;?/\\varphi /g; s/&Upsi;?/\\Upsilon /g; s/&omicron;?/o/g; s/&plusmn;?/\\pm /g; s/&or;?/\\vee /g; s/&and;?/\\wedge /g; s/&ap;?/\\approx /g; s/&sube;?/\\subseteq /g; s/&sub;?/\\subset /g; s/&supe;?/\\supseteq /g; s/&sup;?/\\supset /g; s/&isin;?/\\in /g; s/&larr;?/\\leftarrow /g; s/&rarr;?([_^])/\\mathop\\rightarrow\\limits$1 /g; s/&rarr;?/\\rightarrow /g; s/&uarr;?/\\uparrow /g; s/&darr;?/\\downarrow /g; s/&harr;?/\\leftrightarrow /g; s/&lArr;?/\\Leftarrow /g; s/&rArr;?/\\Rightarrow /g; s/&uArr;?/\\Uparrow /g; s/&dArr;?/\\Downarrow /g; s/&exist;?/\\exists /g; s/&inf;?/\\infty /g; s/&?int;?/\\int\\limits /g; s/&?sum;?/\\sum\\limits /g; s/&?prod;?/\\prod\\limits /g; s/&pd;?/\\partial /g; s/&lcub;?/\\{/g; s/&rcub;?/\\}/g; s/<t>/\\hbox{/gi; s/<b>/\\bf /gi; s/<bt>/{\\bf\\hbox{/gi; s/<sub$R/_{/gi; s/<sup$R/\^{/gi; s/<box\s*size=["']?(\w+)["']?>/{\\def\\lft{$s{$1}}\\def\\rgt{$s{$1}}/gi; s/<box$R/{/gi; s/<text\s*>/\\hbox{/gi; s/([\(\[\|])\s*<left>/\\lft$1/gi; s/<right>/\\rgt /gi; s/<(atop|choose|over)>/\\\L$1 /gi; s/<of>/}\\of{/gi; s/<bar>/\\overline{/gi; s/<vec>/\\overrightarrow{/gi; s/<hat>/\\widehat{/gi; s/<tilde>/\\widetilde{/gi; s/<(sqrt|root|vec|dot|ddot|hat|tilde)>/\\\L$1\{/gi; while(/<above\s+sym\s*=\s*["']?equals["']?\s*>/i) { $beg=$`."\\overline{\\overline{"; $rest=$'; $rest=~s/<\/above>/}}/i; $_=$beg.$rest; } s/<above\s*>/\\overline{/gi; s/<above\s+sym\s*=\s*["']?(\w+)["']?\s*>/\\$a{$1}\{/gi; s/<below\s*>/\\underline{/gi; s/<below\s+sym\s*=\s*["']?(\w+)["']?\s*>/\\$b{$1}\{/gi; s/<\/(math|row|item|b)>//gi; s/<\/(box|t|sup|sub|sqrt|root|vec|bar|dot|ddot|hat|tilde|above|below|text|array)>/}/gi; s/<\/bt>/}}/gi; s/&lt;?/< /gi; s/&gt;?/>/gi; s/&(\w+);?/\\$1 /gi; s/<array$R/\\matrix{/gi; s/<row>\s*<item$R//i; s/<row>\s*<item$R/\\cr /gi; s/<item>/&/gi; s/<[^ ]$R//gi; s/\n*$//; $tex="\\batchmode\\magnification=$mag\\hsize=40cm\\nopagenumbers\n" ."\\def\\lft{\\left}\\def\\rgt{\\right}\n\\setbox0=\\hbox{\$$st$di".$_."\$}\n" ."\\immediate\\write0{$prog: \\the\\ht0: \\the\\dp0}\\box0\n\\end\n"; } sub Getopts { local($optlist)=@_; local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts); local($errs)=0; local($[)=0; @args=split( /\|/, $optlist ); for $opt (@args) { if(substr($opt,-1,1) ne ':') {$olist.=$opt} else {$plist.=$opt} } @popts=split(/:/,$plist); while(@ARGV && ($_=$ARGV[0]) =~ /^-(.*)/) { $opt=$1; if($opt=~/^-/ && $optalias{$'}) {$opt=$optalias{$'}}; if($opt =~ /^[$olist]+$/) { while ($char=chop $opt) {eval "\$opt_$char=1"} shift(@ARGV); } else { $found=0; for $opts (@popts) { $rest=substr($opt,length($opts)); if(index($opt,$opts)==0) { $found=1; shift(@ARGV); if(length($rest)==0) { ++$errs unless @ARGV; $rest=shift(@ARGV); } eval "\$opt_$opts=\$rest"; } } if(!$found) { &dbg("Unknown option: $opt\n"); ++$errs; shift(@ARGV); } } } $errs==0; } sub openps { open(STDOUT,">$opt_o") || die "*** Error opening $opt_o for output\n"; } sub getalt { if($imgcmd eq "img") { $alt=""; $match=0; if($img=~/alt\s*=\s*"([^"]*)"/i) {$alt=$1; $match=1}; if(!$match && $img=~/alt\s*=\s*([\w\.-]+)/i) {$alt=$1; $match=1}; if(!$match) {$alt=")WB IA WB("}; $text="$alt )WB("; return; } if($imgcmd eq "hr") { $text=$img=~/align\s*=\s*["']?(left|center|right)/i?")$algn{lc $1} ":")2 "; $text.=$img=~/size\s*=\s*["']?$V/i?$1:.6; $wd=1; if($img=~/width\s*=\s*["']?$V(%?)/i) {$wd=$2?$1/100:-$1}; $text.=" $wd HR("; return; } if($imgcmd eq "fig") { $text=")BN("; } } sub xbmtops { $fc=1; $dp=1; ($xs,$ys)=$pic=~/^#define.* (\d+)[\w\W]*^#define.* (\d+)/; $nd=2*int(($xs+7)/8)*$ys; ($pic)=$pic=~/[^#].* char.*[\w\W]*{([\w\W]*)}/; $pic=~s/[ ,\n\r]*0x[ ,]*//g; $pic=~y/01246789bdef/f7bd91e62480/; $bm=unpack("H*", pack("h*",$pic)); } sub pmtops { pmtoraw($pm) if($pm=~/^P([1-3])/); $pm=~/^P([4-6])/; $maptype=$1; return if(!$maptype); $pm=$'; $bm=""; $nint=3; $dp=8; if($maptype==4) { $nint=2; $dp=1; } undef @num; $found=0; while($pm && $found<$nint) { if($pm=~/^\s*(\d+)/) {$num[$found]=$1}; if($num[$found]) { $found++; $pm=$'; } elsif($pm=~/^\s*#.*\n/) { $pm=$'; } else { return; } } ($b)=$pm=~/\s([\w\W]*)/; ($xs,$ys,$bits)=@num; return if($bits>255); $fc=1; if($maptype==6) { $fc=3; $nd=6*$xs*$ys; $bm=unpack("H*",$b); } else { $bm=unpack("H*",$b); if($maptype==4) { $nd=2*int(($xs+7)/8)*$ys; $bm=~y/0123456789abcdef/fedcba9876543210/; } else { $nd=2*$xs*$ys; } } } sub trans { $next = 13; $temp = ord substr($pic,10,1); if($temp & 0x80) {$next += 3*2**(($temp & 0x07) + 1)} else {return}; $byte = ord substr($pic,$next,1); while($byte != 0x3b && $next <= length $pic) { if($byte == 0x21) { if(ord substr($pic,$next+1,1) == 0xf9) { if(ord substr($pic,$next+3,1) & 0x01) { &dbg("Transparent\n") if($opt_d); $src{$URL}=$pic; $idx = 3*(ord substr($pic,$next+6,1))+13; substr($pic,$idx,3) = pack("H*",$red.$grn.$blu) if($idx<length $pic); } return; $next += 2; &skip; } else { $next += 2; &skip; } } elsif($byte == 0x2c) { $next += 10; $temp = ord substr($pic,$next-1,1); if($temp & 0x80) {$next += 3*2**(($temp & 0x07) + 1)}; $next++; &skip; } else {return} } } sub skip { $byte = ord substr($pic,$next,1); while($byte != 0) { $next += $byte + 1; $byte = ord substr($pic,$next,1); } $next++; $byte = ord substr($pic,$next,1); } sub run { &dbg("@_\n") if($opt_d); $pm=`@_`; } sub geturl { local($url)=@_; &dbg("Retrieving $url"); if($package{'libwww-perl'} || $package{'jfriedl'}) { warn "\n"; &gu(); if($code==401) { &prompt("\nDocument requires username and password\n\nUsername: ",$user); &prompt("Password: ",$pass); &gu($user,$pass); } $_[1]=$cont; } elsif(defined $geturl) { &dbg("..."); $_[1]=`$geturl '$url'`; if($?) { &dbg("\n*** Error opening $url\n"); return 0; } &dbg("done\n"); if($_[1]=~/\r?\n\r?\n/) { $_[1]=$'; $dhead=$`; ($code)=$dhead=~/HTTP\/\S+ +(\d+)/i; ($contyp)=$dhead=~/Content-type:\s+(.*)/i; } else { $code=500; } } $_[0]=$url; $code<300; } sub gu { if($package{'libwww-perl'}) { require LWP::UserAgent; $ua=new LWP::UserAgent; $ua->env_proxy(); if ($opt_k) { require HTTP::Cookies; $cookie_jar = HTTP::Cookies::Netscape->new(File => $opt_k, AutoSave => 1); $ua->cookie_jar($cookie_jar); } $req = HTTP::Request->new(GET => $url); $req->authorization_basic(@_) if(@_); $ua->agent($spoof) if($spoof); my $res = $ua->request($req); $code=$res->code; $contyp=$res->header('content-type'); $cont=$res->content; } else { require "www.pl"; @opts=@_?("authorization=$_[0]:$_[1]"):(); push(@opts,"quiet") if(!$opt_d); $www::useragent=$spoof if($spoof); ($status,$memo,%info)=&www::open_http_url(*FILE,$url,@opts); $code=$info{'CODE'}; ($contyp)=$info{'HEADER'}=~/Content-type:\s+(.*)/i; $cont=<FILE>; } } sub pictops { if($opt_g) { $fc=1; $pg1="pgm"; $pg2="|ppmtopgm"; } else { $fc=3; $pg1="ppm"; $pg2=""; } ($type)=$URL=~/([^\?]+)\??/; ($type)=$type=~/\.(\w+)$/; $bm=""; $ps=""; $pm=""; if($opt_U && $src{$URL} && !$cmd{$URL.$red.$grn.$blu}) { $pic=$src{$URL}; } elsif($URL=~m|://|) { &geturl($URL,$pic) || return; } else { $flag=0; if($opt_O) { $orig=$URL; unless($orig=~s/\.\w*$/.ps/) {$orig.=".ps"}; if(open(ORIG,"<$orig")) { $pic=<ORIG>; close ORIG; if($pic=~/^%!/ && $pic=~/%%BoundingBox:/) { $flag=1; &dbg("Using $orig as original for $URL\n") if($opt_d); } } } if(!$flag) { if(open(PIC,"<$URL")) { binmode PIC; $pic=<PIC>; close PIC; } else { &dbg("*** Error opening $URL\n"); return; } } } $pic=~s/^[\n\r]*//; &trans if($pic=~/^GIF/); if($pic=~/^P[1-6]/) { $pm=$pic; } else { open(SCRATCH,">$scr"); binmode(SCRATCH); print SCRATCH "$pic"; close SCRATCH; if($pic=~/^%!/ && $pic=~/%%BoundingBox: +$V +$V +$V +$V/) { $xs=$3-$1; $ys=$4-$2; $ps="save\n0 0 M\nIS IS scale\n/showpage {}D\n".(0-$1)." ".(0-$2)." translate\n"; for $i (split(/\n/,$pic)) { $ps.=$i."\n" if($i && $i!~/^%/); } $ps.="restore"; } elsif($type=~/.xbm$/i || $pic=~/^#define/) { &xbmtops; } elsif($package{'ImageMagick'}) { if($package{'PerlMagick'}) { $imobj=Image::Magick->new; $mess=$imobj->Read($scr); if($mess) { &dbg("$mess\n"); } else { $mess=$imobj->Write("$scr\.$pg1"); &dbg("$mess\n") if($mess); } undef $imobj; } else { # &run("convert $scr $pg1:-"); &run("convert $scr $scr\.$pg1"); } open(PNM,"$scr\.$pg1"); binmode PNM; $pm=<PNM>; close PNM; if(!$pm && $pic=~/^\377\330/ && $package{'djpeg'}) { &run("djpeg $scr$pg2"); } } elsif($pic=~/^\377\330/ && $package{'djpeg'}) { &run("djpeg $scr$pg2"); } elsif($package{'pbmplus'} || $package{'netpbm'}) { if($pic=~/^GIF/) { &run("$giftopm $scr"); } else { &run("anytopnm $scr"); } if($opt_g && $pm=~/^P6/) { open(SCRATCH,">$scr"); binmode(SCRATCH); print SCRATCH $pm; close SCRATCH; &run("ppmtopgm $scr"); } } } &pmtops if(!$bm); return if(!$bm); $bm=substr($bm,0,$nd); $pad=$nd-length($bm); if($pad) {$bm.="f" x $pad}; $bm=~s/(.{60})/$1\n/g; } sub math2sym { local($_)=@_; s/<math$R//gi; for $char (keys %symb) {s/&($char)(;|$|(?=\W))/\\$symb{$char}/g}; $stat=!/([&<][a-zA-Z]|[_^{])/; s/[a-zA-Z\s]*[a-zA-Z][a-zA-Z\s]*/)ES()I($&)ES()SY(/g; s/(\\200|\\201|\\202)/)RO($&)ES(/g; $sym=")SY($_)ES("; $stat; } sub varsub { for (@_) { s/\\\\/\000/g; s/\([^)]+\)/()$&join /g; s/(^|[^\\])\$(T|N|U|H|A)/$1)join $vars{$2} join(/g; s/(^|[^\\])\$D\{"(.*?)"\}/"$1".POSIX::strftime($+,@now)/eg if($posix); s/(^|[^\\])\$D/"$1".POSIX::strftime($datefmt,@now)/eg if($posix); # while(/(?=[^\\])\${([^}]+)}/) { while(/(?=[^\\])\$\[([^]]+)\]/) { if(!defined $metarc{lc $1}) { $metarc{lc $1}=$mn++; } $_="$`)join ME $metarc{lc $1} get join($'"; } s/\\\$/\$/g; s/\000/\\\\/g; s/\(\)join//g; s/\(\) ?(\([^)]*\)|\w+) ?join/ $1/g; } } sub follow { return 0 if(!$opt_W); $H=$lnk=~/\.html?(#|$)/i || $lnk=~m|.+//.+/[^/\.]*$|; $T=$rev && ($revtoc && $ndoc==1 || $ndoc>1 && $H); $L=$b1=~m|://| && $lnk=~m"^$b1(/|$)" || $b1!~m|://| && $lnk!~m|://|; $B=$B2 && $lnk=~/^$B2/ || !$B2 && $lnk!~m"(^\.\.|://)"; return $rlnk && ($H || $T) if($rel); return $L && ($H || $T) if($local); return $B && ($H || $T) if($below); return $H || $T if($rev); $H; } sub DSC { &dbg("Generating DSC PostScript\n") if($opt_d); %op=("moveto",2, "rmoveto",2, "lineto",2, "rlineto",2, "translate",2, "scale",2, "show",1, "awidthshow",6, "stroke",0, "save",0, "restore",0, "gsave",0, "grestore",0, "showpage",0, "newpath",0, "setlinewidth",1, "setlinejoin",1, "setgray",1, "closepath",0, "fill",0, "arc",5, "setrgbcolor",3, "rotate",1, "image",5, "colorimage",7); %sho=("moveto","M", "rmoveto","RM", "lineto","L", "rlineto","RL", "show","S", "showpage","N", "awidthshow","A"); $i=0; $po="/OU true D\n"; for (keys %op) { $cmd=$sho{$_}?$sho{$_}:$_; push(@val,$cmd); $in{$_}=$i++; $j=$op{$_}+1; $extra=""; if(/showpage/) {$extra="Bb{Xl Yl Xh Yh}if Pn "}; if(/image/) {$extra="K2 ";$j++}; $t=$op{$_}?"$op{$_} copy $extra$in{$_} $j array astore":"[$extra$in{$_}]"; $po.="/$_ {OU {$t ==} if $_}d\n"; } $po.="/pdfmark {$i] ==} D\n"; $in{"pdfmark"}=$i++; push(@val,"pdfmark"); $po.="/NF {OU{2 copy E $i 3 array astore ==}if ONF}d\n" ."/EX {[IS EC] ==} D\n/Cd {} D\n/DU {TU PM 1 eq and TP and{Pn ==}if}d\n" ."/BB {US Bb{dup Yl lt{dup /Yl E D}if dup Yh gt{/Yh E D}{pop}ie\n" ." dup Xl lt{dup /Xl E D}if dup Xh gt{/Xh E D}{pop}ie}\n" ." {/Yl E D /Yh Yl D /Xl E D /Xh Xl D /Bb t D}ie}D\n"; $in{"Nf"}=$i++; s|/(NF.*)|/O$1|; s|/BB .*|$po|; push(@val,"Nf"); if($psin) { ($ti)=/%%Title: (.*)/; if(m|/BM (\d+)|) { $nbit=$1; for $vec ("IT","WS") { /\/$vec \[(.*)\]/; @$vec=split(' ',$1); } /\nSB/; for (0..$nbit-1) { $'=~/\n\n/; push(@BM,$`); } } ($epsf)=/(\n\/P\d+_?\d* [\w\W]*)%Endpv/; while($epsf=~/\n\/(P\d+_?\d*) \{/g) { $pid=$1; $rest=$'; $temp=$'=~/\/P\d+_?\d* \{/?$`:$rest; ($eps{$pid})=$temp=~/([\w\W]*)} D/; } if(/\/DH {/) { $'=~/%EndDH/; $ph="/DH {$`"; } } $j=-1; for $i (0..$#IT) { $j++ if($IT[$i] == 0); push(@ix,$j); } $dfn="/F $opt_s D\n$ph"; for (keys %sho) { $dfn.="/$sho{$_} {$_} d\n"; } open(SCR,">$scr.ps"); print SCR "$_ quit\n"; close SCR; $cd{')]'}="Cd "; $io="($in{'image'}|$in{'colorimage'})"; $_=""; $temp=""; $pn=""; $start=1; $EPS="%%EndPageSetup"; $pp=0; $n=0; for $line (split(/\r?\n/,`$gs -q -dNODISPLAY $scr.ps -c quit`)) { if(!$pp) { $mv=""; $cx=""; $cy=""; } if($start && $line!~/ $in{"pdfmark"}\]$/) { $pdf=$temp; $temp=""; $start=0; } $pp=$line=~/^\[(\S+) (\S+) ($in{'moveto'}|$in{'rmoveto'}|$in{'Nf'})\]$/; S:{ if($pp && $3==$in{"Nf"}) { $fn="$1 $2 $val[$3]\n"; last S; } if($pp && $3==$in{"moveto"}) { $cx=$1; $cy=$2; $mv=sprintf("%.1f %.1f %s\n",$1,$2,$val[$3]); last S; } if($pp && $3==$in{"rmoveto"}) { if($mv) { $cx+=$1; $cy+=$2; $mv=sprintf("%.1f %.1f %s\n",$cx,$cy,$val[$in{"moveto"}]); } else { $temp.=sprintf("%.1f %.1f %s\n",$1,$2,$val[$3]) if($1||$2); } last S; } if($line=~s/^\[(.*)\((\S*)\) ($in{"showpage"})\]$/pgsave restore $val[$3]/) { $pbb=""; if($1) { ($llx,$lly,$urx,$ury)=split(/ /,$1); $llx=int($llx); $lly=int($lly); $urx=int($urx+1); $ury=int($ury+1); $pbb="%%PageBoundingBox: $llx $lly $urx $ury\n"; if(!defined($Llx) || $llx<$Llx) {$Llx=$llx}; if(!defined($Lly) || $lly<$Lly) {$Lly=$lly}; if(!defined($Urx) || $urx>$Urx) {$Urx=$urx}; if(!defined($Ury) || $ury>$Ury) {$Ury=$ury}; } $pn.="," if($pn && $2); $n++; @df=(); for(0..$#docfonts) { push(@df,$docfonts[$_]) if($uf{$_}==$n); } push(@df,"Symbol") if($uf{"-1"}==$n); $fu=""; $tmp=@df?"%%PageResources: font":""; &splitline(@df); $_.="%%Page: $pn$2 $n\n$fu$pbb%%BeginPageSetup\n/pgsave save D\n$temp$line\n"; $EPS="%%EndPageSetup"; $temp=""; $line=""; $fn=""; $mv=""; $pn=""; last S; } if($line=~/^\[([^(]*)(\(.*\)) ($in{"show"}|$in{"awidthshow"})\]$/) { if(length $2>2) { $line="$fn$1$2 $val[$3]"; if($fn=~/(\S+) Nf/ && $uf{$1}!=$n+1) { $uf{$1}=$n+1; $fnt=$1<0?"Symbol":$docfonts[$1]; $line="%%IncludeResource: font $fnt\n$line"; } $fn=""; $pp=0; } else { $pp=1; } last S; } if($line=~/^\[(\S+) (\S+) ($in{"scale"})\]$/) { $line=$1!=1||$2!=1?"$1 $2 $val[$3]\n$EPS":"$EPS"; $EPS=""; last S; } if($line=~/^\[(.*) (\d+) $io\]$/) { $li=$BM[$2]=~y/\n/\n/+2; $line="\/picstr $WS[$ix[$2]] string D\n$1\n" ."%%BeginData: $li Hex Lines\n$val[$3]\n$BM[$2]\n%%EndData"; last S; } if($line=~/^\((.*)\)$/) { $pn=$1; $line=""; last S; } last S if($line=~s/^\[([^\/].* )?(\d+)\]$/$1$val[$2]/); last S if($line=~s/(\)\])? (\/\w+) $in{"pdfmark"}\]$/$1 $cd{$1}$2 pdfmark/); last S if($line=~s/^\[(\S+) \((P\d+.*)\)\]$/\/IS $1 D\n$eps{$2}/); &dbg("$line\n"); } if(!$pp && $mv.$line) { $mv=~s/\.0//g; $temp.="$mv$line\n"; } } @nf=(); @sf=(); $fontdef=""; for(0..$#docfonts) { $ff=$ff{$docfonts[$_]}; if($ff && $uf{$_}>0) { push(@sf,$docfonts[$_]); $fontdef.="%%BeginResource: font $docfonts[$_]\n$cont{$ff}\n%%EndResource\n"; $cont{$ff}=""; } push(@nf,$docfonts[$_]) if(!$ff && $uf{$_}>0); } push(@nf,"Symbol") if($uf{"-1"}>0); $ti="@ARGV" unless($psin); $or=$opt_L?"Landscape":"Portrait"; $setup="%%BeginSetup\n"; $setup.="$dupl\n" if($dupl); $setup.="$fontdef" if($fontdef); $fu=""; $tmp=@nf?"%%DocumentNeededResources: font":""; &splitline(@nf); $tmp=@sf?"%%DocumentSuppliedResources: font":""; &splitline(@sf); s/\\(200|201|202)/\\$ssy{$1}/g; $dd="Clean7Bit"; $dd="Clean8Bit" if(($fontdef.$_)=~/[\200-\377]/); $dd="Binary" if(($fontdef.$_)=~/[\000-\010\013-\014\016-\036]/); $time=localtime; print <<EOT; %!PS-Adobe-3.0 %%Title: $title %%Creator: $version %%CreationDate: $time $fu%%DocumentData: $dd %%Orientation: $or %%BoundingBox: $Llx $Lly $Urx $Ury %%Pages: $n %%EndComments %%BeginProlog /d {bind def} bind def /D {def} d /ie {ifelse} d /E {exch} d /t true D /f false D $fl $cd $defs $mysymb/Nf {dup 0 ge{FL E get}{-1 eq{/Symbol}{/MySymbol}ie}ie findfont E scalefont setfont} D /IP {currentfile picstr readhexstring pop} D /WF $wf D $dfn%%EndProlog $setup$reenc$pdf%%EndSetup $_%%EOF EOT } sub splitline { for (@_) { if(length($tmp.$_)>78) { $fu.="$tmp\n"; $tmp="%%+ font"; } $tmp.=" $_"; } $fu.="$tmp\n" if($tmp); } sub ref { @pnum=(); /.*\s*$/; open(SCR,">$scr.ps"); print SCR "$`HN{==}forall $& quit\n"; close SCR; $pnum=`$gs -q -dNODISPLAY $scr.ps -c quit`; while($pnum=~/\([^)]*\)/g) {push(@pnum,$&)}; $pnum="@pnum"; &cut($pnum); s|/HN [^D]*D|/HN [$pnum] D|; } sub cut { $_[0]=~s/(.{70}[^ \n]*) ([^ ])/$1\n$2/g; } sub fin { if($opt_D) { &DSC; } else { print; } if($opt_d) { print DBG "\n"; close DBG; } unlink "$scr","$scr.ps","$scr.ppm","$scr.tex","$scr.dvi","$scr.log" if($scr); exit; } sub col2rgb { $rgb=$colour{"\L$_[0]"}?($colour{"\L$_[0]"}):$_[0]; @cvec=$rgb=~/($X$X)($X$X)($X$X)/?($1,$2,$3):(); @cvec?"[16#$1 16#$2 16#$3]":""; } sub inihyph { if($hyphenation_file{$lang}) { $hyfile=$hyphenation_file{$lang}; } else { &dbg("No hyphenation file for language '$lang'\n"); $lng=$lang; while($lng=~s/-?[^-]+$// && !$hyphenation_file{$lng}) {}; $hyfile=$hyphenation_file{$lng}; &dbg(" ..using $hyfile\n"); } if($init{$hyfile}) { $rep{$lang}=$refl{$hyfile}; return; } if(open(HYPH,"<$hyfile")) { &dbg("Reading hyphenation patterns from $hyfile\n") if($opt_d); <HYPH>=~/\\patterns{.*/; close HYPH; $def=$`; ($patterns=$')=~s/\^\^($X$X)/chr hex $1/eg; $upp{$lang}=''; $low{$lang}=''; while ($def=~/\\lccode(`\\?\^\^|")($X$X)=(`\\?\^\^|")($X$X)/g) { if($2 ne $4) { $uc=$2; $lc=$4; if($`=~/\n$/ || $`!~/%.*$/) { $upp{$lang}.=chr hex $uc; $low{$lang}.=chr hex $lc; } } } while ($def=~/\\let\\(\w+)=(\^\^|")($X$X)/g) { $key=$1; $value=chr hex $3; $tex{$key}=$value if($`=~/\n$/ || $`!~/%.*$/); } for $key (keys %tex) { $patterns=~s/\\$key */$tex{$key}/g; } if($lang=~/^de/) { %de=('"a',228, '"o',246, '"u',252, '\3', 223); $patterns=~s/\\c\{[^}]*\}//g; $patterns=~s/\\n\{([^}]*)\}/$1/g; $patterns=~s/("a|"o|"u|\\3)/chr $de{$1}/eg; $upp{"de"}=~s/\337//; $low{"de"}=~s/\377//; } if($lang=~/^is/ && !$upp{"is"}) { %is=("'a","\341", "'e","\351", "'i","\355", "'o","\363", "'u","\372", "'y","\375", '"x',"\346", '"o',"\366", "'d","\360", "`t","\376"); $isch=join("|",keys %is); $patterns=~s/($isch)/$is{$1}/g; $upp{"is"}="\301\311\315\323\332\335\306\326\336\320"; $low{"is"}="\341\351\355\363\372\375\346\366\376\360"; } if($lang=~/^fi/ && !$upp{"fi"}) { $upp{"fi"}="\304\326"; $low{"fi"}="\344\366"; } if($lang=~/^fr/ && !$upp{"fr"}) { $upp{"fr"}="\300\302\307\311\310\312\313\316\317\324\326\333\226"; $low{"fr"}="\340\342\347\351\350\352\353\356\357\364\366\373\225"; } if($lang=~/^es/ && !$upp{"es"}) { $upp{"es"}="\301\311\315\323\321\332\334"; $low{"es"}="\341\351\355\363\361\372\374"; } $patterns=~s/\{([\w\W]*?)\}/[$1]/g; $patterns=~/}/; $end=$`; if($def.$'=~/\\hyphenation\[.*/) { $'=~/]/; $hyext=$`; } ($patterns=$end)=~s/%.*//g; for $key (split('\s+',$patterns)) { $value=$key; $key=~s/\d//g; $value=~s/^([$ltrs.])/0$1/; $value=~s/[$ltrs](\d)/$1/g; $value=~s/[$ltrs.]/0/g; $patt{"$key,$lang"}=$value if($value=~/^\d+$/); } } else { &dbg("Cannot open hyphenation file: $hyfile\n"); } $hext=$hyphenation_extfile{$lang}; for(split('\s*:\s*',$hext)) { if(open(HEXT,"<$_")) { &dbg("Reading hyphenation extensions from $_\n") if($opt_d); $hyext.=<HEXT>; close HEXT; } else { &dbg("Cannot open hyphenation extension file: $_\n"); } } if($hyext) { for $key (keys %tex) { $hyext=~s/$key */$tex{$key}/g; } for $key (split('\s+',$hyext)) { $key=~s/\s+//g; $value="00$key\0"; $key=~s/-//g; $value=~s/[$ltrs]/0/g; $value=~s/0-/1/g; $hext{"$key,$lang"}=$value; } } $refl{$hyfile}=$lang; $rep{$lang}=$lang; $init{$hyfile}=1; } sub hyph { $word="\L$_[0]"; eval "\$word=~y/$upp{$rep{$lang}}/$low{$rep{$lang}}/" if($upp{$rep{$lang}}); $len=length($word); $h=$hext{"$word,$rep{$lang}"}; if($h) { @br=split(//,$h); } else { @br=(0) x ($len+3); for $i (0..$len) { for $j (0..$len-$i) { $str=substr(".$word.",$j,$i+2); $pstr=$patt{"$str,$rep{$lang}"}; if($pstr) { @patt=split(//,$pstr); for $k (0..$#patt) { $br[$k+$j]=$patt[$k] if($br[$k+$j]<$patt[$k]); } } } } } $hword=""; for $i (0..$len-1) { $hword.=substr($_[0],$i,1); if(($h || $i>$hyphenation{'start'}-2 && $i<$len-$hyphenation{'end'}) && $br[$i+2]%2==1) {$hword.=")HY("}; } $hword.=")YH(" if(length $word < length $hword); $hword; } sub setel { $el=$_[0]; eval "\%arr=\%$el"; &fs($el); push(@font,$fontid{"\L$font"}); push(@styl,$styl); push(@size,$arr{'font-size'}); push(@alig,$algn{$arr{'text-align'}}-1); push(@topm,$arr{'margin-top'}); push(@botm,$arr{'margin-bottom'}); push(@lftm,$arr{'margin-left'}); push(@rgtm,$arr{'margin-right'}); push(@colr,$col eq "[16#00 16#00 16#00]"?0:$col); $temp=$arr{'margin-top'}*$arr{'font-size'}; $mi=$temp if($temp>$mi); $temp=$arr{'margin-bottom'}*$arr{'font-size'}; $mi=$temp if($temp>$mi); } sub fs { $arr{'font-family'}='times' if($el ne 'p' && !$latin1 && !defined $arr{$_}); for ("font-family","font-size") { $arr{$_}=$body{$_} if(!defined $arr{$_}); } ($font=$arr{'font-family'})=~s/\W/-/g; if(!$font_names{"\L$font"}) {$font=$fal{$font}}; if(!$font_names{"\L$font"}) { &dbg("Unknown font: $arr{'font-family'}, using $deffnt{$_[0]}\n"); $font=$deffnt{$_[0]}; } if(!defined $fontid{"\L$font"}) { $fontid{"\L$font"}=$nfont++; @names=split(/\s+/,$font_names{"\L$font"}); for($#names+1..3) {push(@names,$names[0])}; @docfonts=(@docfonts,@names); } &getval($arr{"font-size"},2); for ('left','right','top','bottom') { $arr{"margin-$_"}=0 if(!defined $arr{"margin-$_"}); } for ($arr{"text-indent"},$arr{"margin-top"},$arr{"margin-bottom"}, $arr{"margin-left"},$arr{"margin-right"}) { &getval($_,0); } $styl=$arr{'font-style'}=~/^(i|o)/+2*($arr{'font-weight'}=~/^b/); $col=$arr{'color'}?&col2rgb($arr{'color'}):-1; } sub img { local($_,$red,$grn,$blu)=@_; local($beg,$end); ($red,$grn,$blu)=("FF","FF","FF") if(!$opt_U || $red.$grn.$blu !~ /^\w{6}$/); while (/<(img|fig|hr|overlay|object)\s/i) { $imgcmd="\L$1"; $beg=$`; $'=~/>/; $img=" $`"; $end=$'; $img=~s/\n/ /g; if($imgcmd ne "object" || $img=~/data\s*=\s*['"]?([\w\/\.:~%-]+\.$IM)/i || $img=~/type\s*=\s*['"]?(image\/|application\/postscript)/i){ if($opt_T) { &getalt; } else { $al=0; $off=""; ($align)=$img=~/align\s*=\s*['"]?(\w*)/i; if($align=~/^middle$/i) {$al=1}; if($align=~/^top$/i) {$al=2}; if($imgcmd eq "overlay") { $al=4; $xoff=0; $yoff=0; if($img=~/\s*x\s*=\s*['"]?(\d+)/i) {$xoff=$1}; if($img=~/\s*y\s*=\s*['"]?(\d+)/i) {$yoff=$1}; $off="$xoff $yoff "; } $url=""; if($img=~/\s(src|data)\s*=\s*($S)/i) {($url)=$+=~/([^ \n]*)/}; &dbg("Image: $url\n") if($opt_d && $url); $URL=$url; unless($url=~m|://|) { $url=~s/^file://; if($url=~m|^/|) {$URL=$b1.$url} else {$URL=$b2.$url} } while($URL!~m|^\.\./| && $URL=~m|[^/]*/\.\./|) {$URL=$`.$'}; $URL=~s|/\./|/|g; $text=$src{$URL}?$cmd{$URL.$red.$grn.$blu}:$cmd{$URL}; if(!$text || $opt_U && $src{$URL} && !$cmd{$URL.$red.$grn.$blu}) { if(!$url || $failed{$url}) { &getalt; } else { &pictops; if($bm || $ps) { &dbg("Size: $xs*$ys\n") if($opt_d); $nimg++; push(@XS,$xs); push(@YS,$ys); if($bm) { $nm++; push(@DP,$dp); push(@BM,$bm); push(@WS,int(($xs-1)*$dp/8)+1); push(@FC,$fc); push(@IX,$nm); push(@IT,0); } if($ps) { $nps--; push(@IX,$nps); push(@IT,1); $nli=30000; $n=1; $npr=$ps=~s|(.*\n){$nli}|sprintf("$&} D\n/P$nimg\_%d {",$n++)|eg; if($npr) { $proc=" ("; for $i (0..$npr) { $proc.="P$nimg\_$i "; } $proc.=")"; $pv.="/P$nimg\_0 {$ps} D\n"; $eps{"P$nimg\_0"}=$ps; } else { $proc=" (P$nimg)"; $pv.="/P$nimg {$ps} D\n"; $eps{"P$nimg"}=$ps; } } $text="$proc $nimg IM("; $cmd{$URL}=$text if(!$cmd{$URL}); $cmd{$URL.$red.$grn.$blu}=$text if($src{$URL}); $proc=""; $end=$' if($imgcmd eq "object" && $end=~m|</object>|i); } else { &getalt; $failed{"$url"}=1; } } } elsif($imgcmd eq "object" && $end=~m|</object>|i) { $end=$'; } } if($cmd{$URL}) { $text=")".$off.$al.$text; if($imgcmd eq "fig") { $end=~m|</fig>|i; $fig=$`; $end=$'; $over=""; while($fig=~/(<overlay$R)/ig) {$over.=$1}; ($dum,$cap)=$fig=~m|<caption$R([\w\W]*)</caption>|i; ($dum,$cred)=$fig=~m|<credit$R([\w\W]*)</credit>|i; $text=")BN($text$over)BN($cap)BN($cred)BN("; } } } $_=$beg.$text.$end; } s|<[hH][rR]$R|)2 1 1 HR(|g; $_[0]=$_; } sub getval{ local($val,$unit)=$_[0]=~/$V\s*(\w*)/g; $val*=$cm{$unit} if($_[1]==1 && defined $cm{$unit}); $val*=$pt{$unit} if($_[1]==2 && defined $pt{$unit}); $_[0]=$val; } sub getconf { local($_)=@_; while(/\@import\s+(([\w.\/-]+)|"([^"]*)"|'([^']*)')\s*;/) { if(open(SS,"<$+") && !$read{$+}) { $conf=<SS>; $_=$`.$conf.$'; print DBG "***** $+:\n$conf" if($opt_d); close SS; $read{$+}=1; } else { &dbg($read{$+}?"Infinite \@import loop: $+\n":"Error opening: $+\n"); $_=$`.$'; } } @block=(); while(&getblk($_)){}; } sub getblk { local($_)=@_; local ($beg,$match,$end,$blk,$key,$val,$id,$temp); while(/^\s*\/\*/) { /\*\/|$/; $_=$'; } return 0 if !/\S/; /[\w,:.@\s-]+\{/; $_=$'; ($id=$&)=~s/^\s*|\s*\{//g; $id=lc $id; push(@block,"\L$id"); if($#block==1) { $valid{$id}=1 if(!$user); if($id eq "color") {$id="colour"}; if(!$valid{$id}) { &dbg("Error in configuration file: unknown block name '$id'\n"); } } $blk=""; W:while(/\s*(\/\*|[\w][\w-]*\s*:|[\w,:.\s-]+\{|\})\s*/) { $blk.=$1 if($1 ne "/*"); $beg=$`; $match=$1; $end=$'; S:{ if($match=~/\{$/) { $temp=$match.$end; $blk.=&getblk($temp); $_=$temp; last S; } if($match=~/:$/) { ($key=$`)=~s/\s*$//; # $end=~/([\w.\$-]+|"[^"]*"|'[^']*')\s*;?/; $end=~/("[^"]*"|'[^']*'|.*?(?= *(\/\*|;|}|$)))/m; $blk.=$`.$&; $_=$'; ($val=$1)=~s/^["']|["']$//g; $val=~s/'|\\/\\$&/g; $typ=1; $typ=2 if($val=~/^$V(cm|mm|in|pt|pc|em)$/); $typ=3 if($val=~/^$V$/); $typ=4 if($val=~/^-?\d+$/); $typ=5 if($val eq "0" || $val eq "1"); if($block[0] eq '@html2ps') { if($#block==0) { if(!$user) { $valid{$key}=1; $type{$key}=$typ if(!defined $type{$key}); } if($valid{$key}) { if($typ>=$type{$key}) { $key=~s/-/_/g; eval "\$$key='$val'" if($user || $val ne ''); # print DBG "\$$key='$val'\n" if($opt_d && $user); } elsif($user) { &dbg("Error in configuration file: bad value for $key: $val\n"); } } else { &dbg("Error in configuration file: unknown key '$key'\n"); } } if($#block==1) { if($id eq "option" && $optalias{$key}) {$key=$optalias{$key}}; if(!$user) { $valid{"$id,$key"}=1; $type{"$id,$key"}=$typ if(!defined $type{"$id,$key"}); } if($valid{"$id,$key"} || $extend{$id}) { if($typ>=$type{"$id,$key"} || $id eq "colour") { eval "\$$id\{'$key'}='$val'" if($user || $val ne ''); # print DBG "\$$id\{'$key'}='$val'\n" if($opt_d && $user); } elsif($user) { &dbg("Error in configuration file: bad value for $key: $val\n"); } } else { &dbg("Error in block '$id' in configuration file:" ." unknown key '$key'\n"); } } if($#block>1) { $temp="$block[$#block-1]_$key"; $valid{$temp}=1 if(!$user); $parblk=$block[$#block-1]; if($valid{$temp}) { eval "\$$parblk\_$key\{'$id'}='$val'"; # print DBG "\$$parblk\_$key\{'$id'}='$val'\n" if($opt_d && $user); } elsif($valid{$parblk}) { &dbg("Error in block '$parblk' in configuration file:" ." unknown key '$key'\n"); } } } else { for $i (split(',\s*',$id)) { $i=~s/@/AT_/; $i=~s/\./_/; $i=~s/ *:/__/; eval "\$$i\{'\L$key'}='\L$val'"; # print DBG "\$$i\{'\L$key'}='\L$val'\n" if($opt_d && $user); } } last S; } if($match eq "/*") { /\*\/|$/; $_=$'; last S; } last W; } } pop(@block); $_[0]=$end; $blk; } sub prompt { local($/)="\n"; &dbg($_[0]); chop($_[1]=<STDIN>); } sub dbg { print STDERR $_[0]; print DBG $_[0]; } sub hb { local($_)=@_; local($head,$body,$beg,$end,$match,$tag); #If neither </HEAD> nor <BODY> can be found, find the separation point (messy). if(!/<(body|\/head)/i || $`=~/<plaintext|<xmp|<listing|<!--/i) { $head=""; $int=""; S1: while(/<(\/?\w+|!--|!|\?)/) { S2:{ $beg=$`; $end=$'; $match=$&; $tag=$1; if($tag eq "!--") { $int.=$`; &getcom; $int.=$com; $_=$rest; last S2; } if($tag=~/[!?]/) { $end=~/>/; $int.="$beg$match$`>"; $_=$'; last S2; } $tag=~s|/||; last S1 if(!$head{"\L$tag"}); $end=~/$R/; $head.=$int.$beg.$match.$&; $int=""; $_=$'; } } $body=$int.$_; } else { $head=$`; $body=$&.$'; } $_[0]=$body; $_[1]=$head; } sub open { if($_[0]=~m|://|) { &geturl($_[0],$_[1]); } elsif(open(FILE,"<$_[0]")) { $_[1]=<FILE>; close FILE; } else { 0; } } sub pagedef { for $margin ('left','right','top','bottom') { ($m)=$margin=~/(.)/; if(defined $margin{$margin}) { &dbg("'margin { margin-$margin:... }' is obsolete, use '\@page'\n"); $AT_page{"margin-$margin"}=$margin{$margin} if(!defined $AT_page{"margin-$margin"}); } for $page ('left','right') { ($p)=$page=~/(.)/; eval "\$m$m$p=\$AT_page\{'margin'} if(defined \$AT_page\{'margin'})"; eval "\$m$m$p=\$AT_page\{'margin-$margin'} if(defined \$AT_page\{'margin-$margin'})"; eval "\$m$m$p=\$AT_page__$page\{'margin'} if(defined \$AT_page__$page\{'margin'})"; eval "\$m$m$p=\$AT_page__$page\{'margin-$margin'} if(defined \$AT_page__$page\{'margin-$margin'})"; } } } sub pmtoraw { @pars=(); ($temp)=@_; for $i (0..3) { 1 while ($temp=~s/^\s*#.*//); next if($pars[0] eq 'P1' && $i == 3); $temp=~s/\s*(\S+)\s*//; $pars[$i]=$1; } $temp=~s/#.*//g; $pars[0]=~s/\d/$&+3/e; $_[0]="$pars[0]\n$pars[1] $pars[2]\n"; if($pars[0] eq 'P4') { $temp=~s/\s//g; $_[0].=pack("B*",$temp); } else { $_[0].="255\n"; while ($temp=~/\d+/g) { $_[0].=pack("C",int(255*$&/$pars[3]+.5)); } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/podbrowser.spec���������������������������������������������������������������������0000664�0000764�0000764�00000002224�10724574650�015702� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Name: podbrowser Summary: A full-featured Perl Documentation Browser. Version: 0.12 Release: 1 Epoch: 0 Group: Applications/Programming License: GPL URL: http://jodrell.net/projects/podbrowser Packager: Gavin Brown <gavin.brown@uk.com> Vendor: http://jodrell.net/ Source: http://jodrell.net/download.html?file=/files/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/root-%{name}-%{version} Prefix: %{_prefix} AutoReq: no BuildArch: noarch BuildRequires: perl >= 5.8.0, gettext Requires: gtk2 >= 2.8.0, libglade2, gnome-icon-theme > 2.10, gettext, perl >= 5.8.0, perl-URI, perl-Gtk2, perl-Gtk2-GladeXML >= 1.001, perl-gettext, perl-Gtk2-Ex-PodViewer >= 0.14, perl-Pod-Simple, perl-Gtk2-Ex-Simple-List, perl-Text-Levenshtein %description PodBrowser is a documentation browser for Perl. You can view the documentation for Perl's builtin functions, its "perldoc" pages, pragmatic modules and the default and user-installed modules. %prep %setup %build make PREFIX=%{_prefix} %install rm -rf %{buildroot} %makeinstall PREFIX=%{buildroot}%{_prefix} %clean rm -rf %{buildroot} %files %defattr(-,root,root,0755) %doc README COPYING %{_bindir}/* %{_datadir}/* ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/podbrowser.pl�����������������������������������������������������������������������0000775�0000764�0000764�00000117457�10724574476�015413� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl # $Id: podbrowser.pl,v 1.43 2006/08/08 10:52:40 gavin Exp $ # Copyright (c) 2004 Gavin Brown. All rights reserved. This program is free # software; you can redistribute it and/or modify it under the same terms # as Perl itself. use File::Basename qw(dirname); use File::Temp qw(tempdir tempfile); use Gtk2 -init; use Gtk2::GladeXML 1.001; use Gtk2::Pango; use Gtk2::Ex::Simple::List; use Gtk2::Ex::PodViewer 0.16; use Gtk2::Ex::PodViewer::Parser qw(decode_entities); use Locale::gettext; use Pod::Simple::Search; use POSIX qw(setlocale); use Storable; use URI::Escape; use HTML::Entities qw(encode_entities_numeric); use strict; ### set up global variables: my $NAME = 'PodBrowser'; my $VERSION = '0.12'; my $PREFIX = '@PREFIX@'; my $GLADE_FILE = (-d $PREFIX ? sprintf('%s/share/%s', $PREFIX, lc($NAME)) : $ENV{PWD}).sprintf('/%s.glade', lc($NAME)); my $LOCALE_DIR = (-d $PREFIX ? "PREFIX/share/locale" : $ENV{PWD}.'/locale'); my $RCFILE = sprintf('%s/.%src', $ENV{HOME}, lc($NAME)); my $DOC_CACHE = sprintf('%s/.%s_cache', $ENV{HOME}, lc($NAME)); ### instance specific ones: my $SEARCH_OFFSET = 0; my $MAXIMIZED = 0; my $FULLSCREEN = 0; my $OPTIONS = load_config(); my @HISTORY = split(/\|/, $OPTIONS->{history}); my @BOOKMARKS = split(/\|/, $OPTIONS->{bookmarks}); my $BOOKMARK_ITEMS = {}; my $PATHS = {}; my $NO_REDRAW = 0; my $MTIME = 0; my @FORWARD; my @BACK; my $CURRENT_DOCUMENT; my $LAST_SEARCH_STR; my $LAST_FAILED_STR; ### set up l10n support: setlocale(LC_ALL, $ENV{LANG}); bindtextdomain(lc($NAME), $LOCALE_DIR); textdomain(lc($NAME)); { no warnings qw(redefine); my $LH = Locale::gettext->domain(lc($NAME)); sub gettext { $LH->get(@_) } } ### bits we'll be reusing: chomp(my $OPENER = `which gnome-open 2> /dev/null`); my $APP = Gtk2::GladeXML->new($GLADE_FILE); my $THEME = get_an_icon_theme(); my $TIPS = Gtk2::Tooltips->new; my $IDX_PBF = Gtk2::Gdk::Pixbuf->new_from_file($THEME->lookup_icon('stock_bookmark', 16, 'force-svg')->get_filename)->scale_simple(16, 16, 'bilinear'); my $PAGE_PBF = Gtk2::Gdk::Pixbuf->new_from_file($THEME->lookup_icon('stock_new-text', 16, 'force-svg')->get_filename)->scale_simple(16, 16, 'bilinear'); my $FOLDER_PBF = Gtk2::Gdk::Pixbuf->new_from_file($THEME->lookup_icon('gnome-fs-directory', 16, 'force-svg')->get_filename)->scale_simple(16, 16, 'bilinear'); my $NORMAL_CURSOR = Gtk2::Gdk::Cursor->new('left_ptr'); my $BUSY_CURSOR = Gtk2::Gdk::Cursor->new('watch'); my $ITEMS = {}; my %categories = ( funcs => gettext('Functions'), modules => gettext('Modules'), pragma => gettext('Pragmas'), pods => gettext('POD Documents'), ); my $CATEGORY_PBFS = {}; my $LEVENSTHEIN = 0; eval ' use Text::LevenshteinXS qw(distance); $LEVENSTHEIN = 1; '; if ($LEVENSTHEIN == 0) { eval ' use Text::Levenshtein qw(distance); $LEVENSTHEIN = 1; '; } my %TOOLBAR_STYLES = ( gettext('Icons') => 'icons', gettext('Text') => 'text', gettext('Both') => 'both', gettext('Both Horizontal') => 'both-horiz', ); $OPTIONS->{variable_font} = (defined($OPTIONS->{variable_font}) ? $OPTIONS->{variable_font} : 'Sans 10'); $OPTIONS->{fixed_font} = (defined($OPTIONS->{fixed_font}) ? $OPTIONS->{fixed_font} : 'Monospace 10'); $OPTIONS->{header_color} = (defined($OPTIONS->{header_color}) ? $OPTIONS->{header_color} : '#404080'); $OPTIONS->{preformat_color} = (defined($OPTIONS->{preformat_color}) ? $OPTIONS->{preformat_color} : '#606060'); $OPTIONS->{toolbar_style} = (defined($OPTIONS->{toolbar_style}) ? $OPTIONS->{toolbar_style} : 'icons'); ### start building the UI: $APP->signal_autoconnect_from_package(__PACKAGE__); $APP->get_widget('location')->disable_activate; $APP->get_widget('location')->entry->signal_connect('activate', \&go); $APP->get_widget('open_dialog_location')->disable_activate; # this seems not to be applied from the glade, so force it: $APP->get_widget('location_toolitem')->set_expand(1); my $group = Gtk2::AccelGroup->new; $group->connect(ord(1), ['mod1-mask'], ['visible'], sub { $APP->get_widget('notebook')->set_current_page(0) }); $group->connect(ord(2), ['mod1-mask'], ['visible'], sub { $APP->get_widget('notebook')->set_current_page(1) }); $group->connect(ord('L'), ['control-mask'], ['visible'], sub { $APP->get_widget('location')->entry->grab_focus }); $APP->get_widget('main_window')->add_accel_group($group); my $toolbar_style_combo = Gtk2::ComboBox->new_text; for (my $i = 0 ; $i < scalar(keys(%TOOLBAR_STYLES)) ; $i++) { my $style = (sort(keys(%TOOLBAR_STYLES)))[$i]; $toolbar_style_combo->append_text($style); $toolbar_style_combo->set_active($i) if ($TOOLBAR_STYLES{$style} eq $OPTIONS->{toolbar_style}); } $APP->get_widget('prefs_table')->attach_defaults($toolbar_style_combo, 1, 2, 4, 5); $toolbar_style_combo->show; my $viewer = Gtk2::Ex::PodViewer->new; $viewer->set_cursor_visible(undef); $viewer->signal_connect('link_clicked' => \&link_clicked); $APP->get_widget('viewer_scrwin')->add($viewer); $viewer->signal_connect('link_enter', sub { set_status($_[1]) }); $viewer->signal_connect('link_leave', sub { set_status('') }); setup_display(); $viewer->show; -r $DOC_CACHE ? $viewer->set_db(retrieve($DOC_CACHE)) : $viewer->_init_db; ### build a SimpleList from the glade widget for the document index: my $page_index = Gtk2::Ex::Simple::List->new_from_treeview( $APP->get_widget('document_index'), icon => 'pixbuf', mark => 'text', link => 'hidden', ); $page_index->get_selection->signal_connect('changed', sub { my $idx = ($page_index->get_selected_indices)[0]; my $mark = $page_index->{data}[$idx][2]; $viewer->jump_to($mark); return 1; }); ### build a tree widget for the full index: my $model = Gtk2::TreeStore->new(qw/Gtk2::Gdk::Pixbuf Glib::String/); my $treeview = $APP->get_widget('index'); $treeview->set_model($model); my $treecolumn = Gtk2::TreeViewColumn->new; $treecolumn->set_title('Name'); my $treecell = Gtk2::CellRendererPixbuf->new; $treecolumn->pack_start($treecell, 0); $treecolumn->add_attribute($treecell, pixbuf => 0); $treecell = Gtk2::CellRendererText->new; $treecell->set('ellipsize-set' => 0, 'ellipsize' => 'end'); $treecolumn->pack_start($treecell, 1); $treecolumn->add_attribute($treecell, text => 1); $treeview->append_column($treecolumn); $treeview->get_selection->signal_connect('changed', \&index_changed); ### build a SimpleList from the glade widget for the search results: my $search_results = Gtk2::Ex::Simple::List->new_from_treeview( $APP->get_widget('search_results'), icon => 'pixbuf', mark => 'text', ); my $search_results_building = 0; $search_results->get_selection->signal_connect('changed', sub { return 1 if ($search_results_building == 1); my $idx = ($search_results->get_selected_indices)[0]; my $doc = $search_results->{data}[$idx][1]; $APP->get_widget('location')->entry->set_text($doc); go(1); }); eval { my $icon = Gtk2::Gdk::Pixbuf->new_from_file($THEME->lookup_icon(lc($NAME), 16, 'force-svg')->get_filename); $APP->get_widget('main_window')->set_icon($icon); $APP->get_widget('view_source_window')->set_icon($icon); $APP->get_widget('bookmarks_dialog')->set_icon($icon); $APP->get_widget('display_preferences_dialog')->set_icon($icon); }; print STDERR $@; Glib::Timeout->add(1000, \&watch_file); ### apply the user's previous preferences: $APP->get_widget('notebook')->set_current_page(int($OPTIONS->{active_page})); $APP->get_widget('pane')->set_position($OPTIONS->{pane_position} || 200); $APP->get_widget('show_index')->set_active($OPTIONS->{show_index} == 0 && defined($OPTIONS->{show_index}) ? undef : 1); $APP->get_widget('location')->set_popdown_strings('', @HISTORY); $APP->get_widget('main_window')->maximize if ($OPTIONS->{maximized} == 1); $APP->get_widget('main_window')->set_default_size( ($OPTIONS->{window_x} > 0 ? $OPTIONS->{window_x} : 800), ($OPTIONS->{window_y} > 0 ? $OPTIONS->{window_y} : 600), ); $OPTIONS->{watch} = (!defined($OPTIONS->{watch}) ? 1 : ($OPTIONS->{watch} == 0 ? 0 : 1)); $APP->get_widget('toggle_watch')->set_active($OPTIONS->{watch} == 0 ? undef : 1); $APP->get_widget('main_window')->signal_connect('window-state-event', \&window_changed_state); ### load the bookmarks: foreach my $bookmark (@BOOKMARKS) { add_bookmark_item($bookmark); } ### construct the bookmarks list: my $bookmarks_list = Gtk2::Ex::Simple::List->new_from_treeview( $APP->get_widget('bookmarks_list'), icon => 'pixbuf', doc => 'text', ); $APP->get_widget('main_window')->show; my $completion_store = Gtk2::ListStore->new('Glib::String'); load_index(); my $completion = Gtk2::EntryCompletion->new; $completion->set_model($completion_store); $completion->set_text_column(0); $completion->set_inline_completion(1); $completion->signal_connect('match-selected', sub { my ($completion, $model, $iter) = @_; my $value = $model->get_value($iter, 0); set_location($value); }); my $completion2 = Gtk2::EntryCompletion->new; $completion2->set_model($completion_store); $completion2->set_text_column(0); $completion2->set_inline_completion(1); $APP->get_widget('location')->entry->set_completion($completion); $APP->get_widget('open_dialog_location')->entry->set_completion($completion2); $APP->get_widget('view_source_text')->set_border_window_size('top', 6); $APP->get_widget('view_source_text')->set_border_window_size('bottom', 6); $APP->get_widget('view_source_text')->set_border_window_size('left', 6); $APP->get_widget('view_source_text')->set_border_window_size('right', 6); $APP->get_widget('view_source_text')->modify_bg('normal', Gtk2::Gdk::Color->new(65535, 65535, 65535)); $APP->get_widget('back_button')->set_menu(Gtk2::Menu->new); $APP->get_widget('forward_button')->set_menu(Gtk2::Menu->new); $APP->get_widget('up_button')->set_menu(Gtk2::Menu->new); ### if the program was run with an argument, load the argument as a document: set_location($ARGV[0]) if (defined $ARGV[0] && $ARGV[0] ne ''); Gtk2->main; exit; sub location_entry_changed { $APP->get_widget('go_button')->set_sensitive($APP->get_widget('location')->entry->get_text ne ''); return 1; } sub search_entry_changed { $APP->get_widget('search_button')->set_sensitive($APP->get_widget('search_entry')->get_text ne ''); return 1; } sub watch_file { return 1 if ($OPTIONS->{watch} != 1); my $file = $APP->get_widget('location')->entry->get_text; go() if ( defined $file && (stat($file))[9] > $MTIME); return 1; } ### pops up the 'open document' dialog: sub open_dialog { $APP->get_widget('open_dialog')->set_icon($APP->get_widget('main_window')->get_icon); $APP->get_widget('open_dialog')->show_all; $APP->get_widget('open_dialog_location')->set_popdown_strings($APP->get_widget('location')->entry->get_text, @HISTORY); return 1; } ### handles the 'open document' dialog response: sub open_dialog_response { if ($_[1] eq 'ok' || $_[1] == 1) { set_location($APP->get_widget('open_dialog_location')->entry->get_text); } $APP->get_widget('open_dialog')->hide_all; return 1; } sub open_dialog_delete_event { $APP->get_widget('open_dialog')->hide_all; return 1; } sub on_open_dialog_location_activate { $APP->get_widget('open_dialog')->signal_emit('response', 1); return 1; } sub browse_button_clicked { my $dialog = Gtk2::FileChooserDialog->new( gettext('Choose File'), undef, 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok' ); $dialog->signal_connect('response', sub { if ($_[1] eq 'ok') { $APP->get_widget('open_dialog_location')->entry->set_text($dialog->get_filename); } $dialog->destroy; }); $dialog->set_icon($APP->get_widget('main_window')->get_icon); $dialog->run; return 1; } ### shows/hides the left pane of the window: sub toggle_index { if ($_[0]->get_active) { $APP->get_widget('notebook')->show_all; } else { $APP->get_widget('notebook')->hide_all; } $OPTIONS->{show_index} = ($_[0]->get_active ? 1 : 0); return 1; } sub toggle_watch { $OPTIONS->{watch} = $APP->get_widget('toggle_watch')->get_active ? 1 : 0; } sub about { Gtk2::AboutDialog->set_url_hook(\&open_url); my $dialog = Gtk2::AboutDialog->new; $dialog->set('name' => $NAME); $dialog->set('version' => $VERSION); $dialog->set('comments' => gettext('A Perl Documentation Browser for GNOME')); $dialog->set('copyright' => gettext('Copyright 2005 Gavin Brown.')); $dialog->set('website' => sprintf('http://jodrell.net/projects/%s', lc($NAME))); $dialog->set('icon' => $APP->get_widget('main_window')->get_icon); $dialog->set('logo' => $APP->get_widget('main_window')->get_icon); $dialog->signal_connect('delete_event', sub { $dialog->destroy }); $dialog->signal_connect('response', sub { $dialog->destroy }); $dialog->signal_connect('close', sub { $dialog->destroy }); $dialog->show_all; return 1; } sub set_ui_busy { return unless $APP->get_widget('main_window')->window; $APP->get_widget('main_window')->window->set_cursor($BUSY_CURSOR); $viewer->get_window('text')->set_cursor($BUSY_CURSOR); Gtk2->main_iteration while (Gtk2->events_pending); } sub set_ui_waiting { return unless $APP->get_widget('main_window')->window; $APP->get_widget('main_window')->window->set_cursor($NORMAL_CURSOR); $viewer->get_window('text')->set_cursor($NORMAL_CURSOR); Gtk2->main_iteration while (Gtk2->events_pending); } ### this is used when the user requests a new document, via the location entry, ### the go button, the 'open document' dialog, the index or via a clicked link: sub go { my $no_reselect = shift; my $text = $APP->get_widget('location')->entry->get_text; set_ui_busy(); if (!$viewer->load($text)) { my @children = grep { /^$text\:\:/ } keys(%{$viewer->get_db}); if (scalar(@children) > 0) { $viewer->load_string(generate_pod_index($text, @children)); set_ui_waiting(); } else { $APP->get_widget('location')->entry->set_text($CURRENT_DOCUMENT); pop(@BACK); set_ui_waiting(); show_fail_dialog($text); } } else { $MTIME = time(); $CURRENT_DOCUMENT = $text; $APP->get_widget('main_window')->set_title(sprintf(gettext('%s - Pod Browser'), $text)); set_ui_waiting(); ### populate the index: @{$page_index->{data}} = (); map { push(@{$page_index->{data}}, [ $IDX_PBF, section_reformat(decode_entities($_)), $_ ]) } $viewer->get_marks; unshift(@HISTORY, $text); ### update the history, removing duplicates: my %seen; for (my $i = 0 ; $i < scalar(@HISTORY) ; $i++) { if (exists $seen{$HISTORY[$i]} && $seen{$HISTORY[$i]} == 1) { splice(@HISTORY, $i, 1); } else { $seen{$HISTORY[$i]} = 1; } } $APP->get_widget('location')->set_popdown_strings(@HISTORY); $LAST_SEARCH_STR = ''; if (defined($PATHS->{$text}) && $no_reselect != 1) { $APP->get_widget('index')->expand_row($PATHS->{$text}, 1); $APP->get_widget('index')->scroll_to_cell($PATHS->{$text}, $APP->get_widget('index')->get_column(0), 1, 0.5, 0); $NO_REDRAW = 1; $APP->get_widget('index')->get_selection->select_path($PATHS->{$text}); $NO_REDRAW = 0; } ### the back button: if (scalar(@BACK) > 0) { $APP->get_widget('back_button')->set_sensitive(1); $APP->get_widget('back_button')->set_tooltip($TIPS, sprintf(gettext("Go back to '%s'"), $BACK[-1]), 1); } elsif (scalar(@BACK) < 1 && $APP->get_widget('back_button')->get('sensitive')) { $APP->get_widget('back_button')->set_sensitive(undef); } ### the forward button: if (scalar(@FORWARD) > 0) { $APP->get_widget('forward_button')->set_sensitive(1); $APP->get_widget('forward_button')->set_tooltip($TIPS, sprintf(gettext("Go forward to '%s'"), $FORWARD[0]), 1); } elsif (scalar(@FORWARD) < 1) { $APP->get_widget('forward_button')->set_sensitive(undef); } ### the up button: if ($APP->get_widget('location')->entry->get_text =~ /::/) { $APP->get_widget('up_button')->set_sensitive(1); my @parts = split(/::/, $APP->get_widget('location')->entry->get_text); pop(@parts); my $doc = join('::', @parts); $APP->get_widget('up_button')->set_tooltip($TIPS, sprintf(gettext("Go up to '%s'"), $doc), 1); } else { $APP->get_widget('up_button')->set_sensitive(undef); } ### the "add bookmark" item. turn off if location is blank or is already bookmarked: $APP->get_widget('add_bookmark_item')->set_sensitive($APP->get_widget('location')->entry->get_text ne '' && !defined($BOOKMARK_ITEMS->{$APP->get_widget('location')->entry->get_text})); return 1; } return 1; } sub show_fail_dialog { my $text = shift; $LAST_FAILED_STR = $text; $APP->get_widget('load_failed_dialog_title_label')->set_markup(sprintf('<span size="large" weight="bold">%s</span>', encode_entities_numeric(sprintf(gettext("Couldn't find a POD document for '%s'."), $text)))); $APP->get_widget('load_failed_dialog')->show_all; } sub close_load_failed_dialog { $APP->get_widget('load_failed_dialog')->hide; return 1; } sub load_failed_dialog_response { close_load_failed_dialog(); if ($_[1] == 49) { open_url(sprintf('http://search.cpan.org/search?query=%s', uri_escape($LAST_FAILED_STR))); } elsif ($_[1] == 99) { reload_index(); set_location($LAST_FAILED_STR); } return 1; } sub close_window { close_program() } sub close_program { if ($MAXIMIZED == 1) { $OPTIONS->{maximized} = 1; } else { $OPTIONS->{maximized} = 0; ($OPTIONS->{window_x}, $OPTIONS->{window_y}) = $APP->get_widget('main_window')->get_size if ($FULLSCREEN == 0); } $OPTIONS->{active_page} = $APP->get_widget('notebook')->get_current_page; $OPTIONS->{pane_position} = $APP->get_widget('pane')->get_position; $OPTIONS->{history} = join('|', splice(@HISTORY, 0, 20)); $OPTIONS->{bookmarks} = join('|', @BOOKMARKS); save_config(); save_cache(); exit 0; } sub load_config { my $OPTIONS = {}; if (open(RCFILE, $RCFILE)) { while (<RCFILE>) { chomp; my ($name, $value) = split(/\s*=\s*/, $_, 2); $OPTIONS->{lc($name)} = $value; } close(RCFILE); } return $OPTIONS; } sub save_config { if (!open(RCFILE, ">$RCFILE")) { printf(STDERR "Cannot open file '%s' for writing: %s\n", $RCFILE, $!); return undef; } else { foreach my $key (sort(keys(%{$OPTIONS}))) { printf(RCFILE "%s=%s\n", $key, $OPTIONS->{$key}); } close(RCFILE); return 1; } return undef; } sub save_cache { store($viewer->get_db, $DOC_CACHE); } sub link_clicked { my (undef, $text) = @_; $text =~ s/\"$//g; $text =~ s/^\"//g; return undef if ($text eq ''); my @marks = $viewer->get_marks; my $seen = 0; map { s/^[\"\']//g ; s/[\"\']$//g ; $seen++ if (lc($_) eq lc($text)) } @marks; if ($seen > 0) { # link referred to an anchor: for (my $i = 0 ; $i < scalar(@marks) ; $i++) { $marks[$i] =~ s/^[\"\']//g; $marks[$i] =~ s/[\"\']$//g; if (lc($marks[$i]) eq lc($text)) { $page_index->select($i); return 1; } } } elsif ($text =~ /\|\/?/) { # link referred to an anchor, but with some named text: my ($text, $section) = split(/\|\/?/, $text, 2); link_clicked(undef, $section); } elsif ($text =~ /^(\w+)\:\/\//) { # link referred to a URL: open_url($text); } elsif ($text =~ /^\// && ! -e $text) { # link referred to a non-existent file, remove the leading slash and try again: $text =~ s/^\///; link_clicked(undef, $text); } elsif ($text =~ /\// && ! -e $text) { # link referred to a poddoc/anchor anchor, split the text and try with the second part: my ($doc, $section) = split(/\//, $text, 2); set_location($doc); link_clicked(undef, $section); } else { # link referred to another pod document: set_location($text); } return 1; } sub set_location { my $locn = shift; if ($APP->get_widget('location')->entry->get_text ne '') { push(@BACK, $APP->get_widget('location')->entry->get_text); } @FORWARD = (); $APP->get_widget('location')->entry->set_text($locn); go(); } sub go_back { unshift(@FORWARD, $APP->get_widget('location')->entry->get_text); my $locn = pop(@BACK); $APP->get_widget('location')->entry->set_text($locn); go(); } sub go_forward { push(@BACK, $APP->get_widget('location')->entry->get_text); my $locn = shift(@FORWARD); $APP->get_widget('location')->entry->set_text($locn); go(); } sub go_up { my @parts = split(/::/, $APP->get_widget('location')->entry->get_text); pop(@parts); $APP->get_widget('location')->entry->set_text(join('::', @parts)); push(@BACK, $CURRENT_DOCUMENT); @FORWARD = (); go(); } sub show_back_button_menu { create_popup_menu($APP->get_widget('back_button')->get_menu, @BACK); return 1; } sub show_forward_button_menu { create_popup_menu($APP->get_widget('forward_button')->get_menu, @FORWARD); return 1; } sub show_up_button_menu { my @items = (); my @parts = (); my $doc = $APP->get_widget('location')->entry->get_text; foreach my $part (split(/::/, $doc)) { push(@parts, $part); my $this_doc = join('::', @parts); push(@items, $this_doc) unless ($this_doc eq $doc); } create_popup_menu($APP->get_widget('up_button')->get_menu, @items); return 1; } sub user_set_location { return undef if ($APP->get_widget('location')->entry->get_text eq ''); push(@BACK, $CURRENT_DOCUMENT) if ($CURRENT_DOCUMENT ne '' && $CURRENT_DOCUMENT ne $APP->get_widget('location')->entry->get_text); @FORWARD = (); go(); } sub search { my $str = $APP->get_widget('search_entry')->get_text; $str =~ s/^\s*$//g; return undef if ($str eq ''); set_ui_busy(); my $doc = $viewer->get_buffer->get_text( $viewer->get_buffer->get_start_iter, $viewer->get_buffer->get_end_iter, undef, ); $APP->get_widget('search_entry')->set_sensitive(0); $SEARCH_OFFSET = 0 if ($str ne $LAST_SEARCH_STR); $LAST_SEARCH_STR = $str; my $chunk = substr($doc, $SEARCH_OFFSET); while ($chunk =~ /($str)/ig) { Gtk2->main_iteration while (Gtk2->events_pending); $SEARCH_OFFSET += pos($chunk); my $iter = $viewer->get_buffer->get_iter_at_offset($SEARCH_OFFSET); $viewer->scroll_to_iter($iter, undef, 1, 0, 0); $APP->get_widget('search_entry')->set_sensitive(1); $APP->get_widget('search_entry')->grab_focus(); $viewer->get_buffer->move_mark( $viewer->get_buffer->get_mark('insert'), $viewer->get_buffer->get_iter_at_offset($SEARCH_OFFSET - length($1)), ); $viewer->get_buffer->move_mark( $viewer->get_buffer->get_mark('selection_bound'), $viewer->get_buffer->get_iter_at_offset($SEARCH_OFFSET), ); set_ui_waiting(); return 1; } $APP->get_widget('search_entry')->set_sensitive(1); $APP->get_widget('search_entry')->grab_focus(); $SEARCH_OFFSET = 0; set_ui_waiting(); my $dialog = Gtk2::MessageDialog->new($APP->get_widget('main_window'), 'modal', 'info', 'ok', sprintf(gettext("The string '%s' was not found."), $str)); $dialog->signal_connect('response', sub { $dialog->destroy }); $dialog->show_all; return undef; } sub select_all { $viewer->get_buffer->move_mark( $viewer->get_buffer->get_mark('insert'), $viewer->get_buffer->get_start_iter, ); $viewer->get_buffer->move_mark( $viewer->get_buffer->get_mark('selection_bound'), $viewer->get_buffer->get_end_iter, ); return 1; } sub search_dialog { $APP->get_widget('search_dialog_entry')->set_text($APP->get_widget('search_entry')->get_text); $APP->get_widget('search_dialog')->show_all; return 1; } sub search_dialog_close { $APP->get_widget('search_dialog')->hide_all; return 1; } sub search_dialog_entry_activate() { search_dialog_response(undef, 'ok'); return 1; } sub search_dialog_response { if ($_[1] eq 'ok') { $APP->get_widget('search_entry')->set_text($APP->get_widget('search_dialog_entry')->get_text); search(); } $APP->get_widget('search_dialog')->hide_all; return 1; } sub open_url { my $url = (ref($_[0]) eq 'Gtk2::AboutDialog' ? $_[1] : $_[0]); if (!-x $OPENER) { my $dialog = Gtk2::MessageDialog->new($APP->get_widget('main_window'), 'modal', 'info', 'ok', gettext('Error opening URL')); $dialog->format_secondary_text("The 'gnome-open' program could not be found."); $dialog->signal_connect('response', sub { $dialog->destroy }); $dialog->show_all; return undef; } else { system("$OPENER \"$url\" &"); return 1; } } ### this looks through the system for perl pod documents that reference functions, modules and pod ### documents, and creates a hash of hashes that can be used to build a sitewide index: sub generate_index { my %PATHS; my $ITEMS = {}; my $category; my @docs = sort(keys(%{$viewer->get_db})); foreach my $doc (@docs) { if ($doc =~ /^perl/) { $category = 'pods'; } elsif ($doc =~ /^[a-z0-9]+$/) { $category = 'pragma'; } elsif ($doc =~ /^[A-Z0-9]/ || $doc =~ /::/) { $category = 'modules'; } $ITEMS->{$category}->{$doc}++; } # doing a reverse sort means that later versions of Perl are preferred over newer versions: foreach my $dir (reverse sort @INC) { if (-r "$dir/pod/perlfunc.pod" && (!exists $PATHS{perlfunc} || $PATHS{perlfunc} eq '') ) { $PATHS{perlfunc} = "$dir/pod/perlfunc.pod"; last; } } $category = ''; if (-r $PATHS{perlfunc}) { if (!open(PERLFUNC, $PATHS{perlfunc})) { print STDERR "$PATHS{perlfunc}: $!\n"; } else { while (<PERLFUNC>) { if (/Alphabetical Listing of Perl Functions/) { $category = 'funcs'; } elsif (/^=item/) { my (undef, $doc, undef) = split(' ', $_, 3); $doc =~ s/[^A-Za-z0-9\_\/\-]+//g; $ITEMS->{$category}->{$doc}++; } } close(PERLFUNC); } } return $ITEMS; } sub load_index { set_ui_busy(); $model->clear; $ITEMS = generate_index(); ### populate the tree: foreach my $category (sort keys %{$ITEMS}) { Gtk2->main_iteration while (Gtk2->events_pending); if ($category ne '') { my $parent_iter = $model->append(undef); $model->set($parent_iter, 0, (defined($CATEGORY_PBFS->{$category}) ? $CATEGORY_PBFS->{$category} : $FOLDER_PBF)); $model->set($parent_iter, 1, $categories{$category}); unless ( $category eq 'modules' ) { foreach my $doc (sort keys %{$ITEMS->{$category}}) { Gtk2->main_iteration while (Gtk2->events_pending); if ($doc ne '') { my $iter = $model->append($parent_iter); $PATHS->{$doc} = $model->get_path($iter); $model->set($iter, 0, $PAGE_PBF); $model->set($iter, 1, $doc); } } } } } if ( $OPTIONS->{hierarchy_module} ) { $APP->get_widget('mod_tree')->set_active(1); } else { toggle_mod_tree(); } $completion_store->clear; my @items = sort(keys(%{$viewer->get_db}), keys(%{$ITEMS->{funcs}})); foreach my $doc (@items) { $completion_store->set($completion_store->append, 0, $doc); } set_ui_waiting(); return undef; } sub toggle_mod_tree { my $active = $APP->get_widget('mod_tree')->get_active(); my $treeview = $APP->get_widget('index'); my $model = $treeview->get_model(); $OPTIONS->{hierarchy_module} = $active; set_ui_busy(); my $category = 'modules'; my $modules = $categories{$category}; my $iter = $model->get_iter_first(); while ( $model->get_value($iter, 1) ne $modules and ($iter = $model->iter_next($iter)) ) { 1; } my $newiter; if ( $iter ) { my $next = $model->iter_next($iter); my $parent = $model->iter_parent($iter); $model->remove($iter); if ( defined $next ) { $newiter = $model->insert_before($parent, $next); } else { $newiter = $model->append($parent); } } else { my $parent = $model->append(undef); $newiter = $model->append($parent); } $model->set($newiter, 0, (defined($CATEGORY_PBFS->{$category}) ? $CATEGORY_PBFS->{$category} : $FOLDER_PBF)); $model->set($newiter, 1, $categories{$category}); if ( $active ) { my $tree = build_mod_tree([sort keys %{$ITEMS->{$category}}]); my $add_child; $add_child = sub { my $t = shift; my $iter = shift; my $path = shift || []; foreach ( sort keys %$t ) { my $iter_child = $model->append($iter); my $doc = join("::", @$path, $_ ); $PATHS->{$doc} = $model->get_path($iter_child); $model->set( $iter_child, 0, $PAGE_PBF); $model->set( $iter_child, 1, $doc ); if ( %{$t->{$_}} ) { $add_child->($t->{$_}, $iter_child, [@$path, $_]); } } }; $add_child->($tree, $newiter); } else { foreach my $doc (sort keys %{$ITEMS->{$category}}) { Gtk2->main_iteration while (Gtk2->events_pending); if ($doc ne '') { my $iter = $model->append($newiter); $PATHS->{$doc} = $model->get_path($iter); $model->set($iter, 0, $PAGE_PBF); $model->set($iter, 1, $doc); } } } $treeview->expand_row( $model->get_path($newiter), 0 ); set_ui_waiting(); return undef; } sub build_mod_tree { my $mods = shift; my %tree; my $add_children = sub { my $root = \%tree; foreach ( @_ ) { if ( exists $root->{$_} ) { $root = $root->{$_}; } else { my $child = {}; $root->{$_} = $child; $root = $child; } } }; foreach ( @$mods ) { next if $_ eq ''; $add_children->(split /::/, $_); } return \%tree; } sub section_reformat { my $str = shift; my @words = split(/[\s\t]+/, $str); my @return = ''; foreach my $word (@words) { if ($word =~ /^[A-Z]+$/) { $word = ucfirst(lc($word)); } push(@return, $word); } return join(' ', @return); } ### this tracks the window's state: sub window_changed_state { my $mask = $_[1]->changed_mask; if ("$mask" eq '[ withdrawn ]') { $MAXIMIZED = 0; $FULLSCREEN = 0; } elsif ("$mask" eq '[ maximized ]') { if ($MAXIMIZED == 1) { $MAXIMIZED = 0; } else { $MAXIMIZED = 1; } $FULLSCREEN = 0; } elsif ("$mask" eq '[ fullscreen ]') { $MAXIMIZED = 0; if ($FULLSCREEN == 1) { $FULLSCREEN = 0; } else { $FULLSCREEN = 1; } } return 1; } ### this is called when the user clicks on an item in the site index: my $index_changed_timeout; sub index_changed { return 1 if ($NO_REDRAW == 1); my ($path) = $APP->get_widget('index')->get_selection->get_selected_rows; if (defined($path)) { my $path = $path->to_string; my $iter = $APP->get_widget('index')->get_model->get_iter_from_string($path); my $value = $APP->get_widget('index')->get_model->get_value($iter, 1); my $seen = 0; foreach my $category (keys %categories) { $seen++ if ($categories{$category} eq $value); } if ($seen < 1) { # defer loading the page, in case the user is # arrowing around in the index. Glib::Source->remove($index_changed_timeout) if ($index_changed_timeout); $index_changed_timeout = Glib::Timeout->add(200, sub { $APP->get_widget('location')->entry->set_text($value); go(1); $index_changed_timeout = 0; 0; # don't run again }); } } return 1; } ### returns an icon theme. When running in a GNOME session, the default is fine. if not, ### we have to load a custom one: sub get_an_icon_theme { my $theme; if (exists $OPTIONS->{theme} && $OPTIONS->{theme} ne '') { # user specified a particular theme in their .podbrowserrc: $theme = Gtk2::IconTheme->new; $theme->set_custom_theme($OPTIONS->{theme}); } else { # get the default theme: $theme = Gtk2::IconTheme->get_default; } my @paths = ( '/usr/share/icons', '/opt/share/icons', '/usr/local/share/icons', sprintf('%s/.icons', $ENV{HOME}), sprintf('%s/.local/share/icons', $ENV{HOME}), sprintf('%s/share/icons', (-d $PREFIX ? $PREFIX : $ENV{PWD})), sprintf('%s/icons', (-d $PREFIX ? $PREFIX : $ENV{PWD})), (-d $PREFIX ? $PREFIX : $ENV{PWD}), ); map { $theme->append_search_path($_) } @paths; if ($theme->has_icon('gnome-mime-text') == 0) { # the first theme failed, try the 'gnome' theme: $theme = Gtk2::IconTheme->new; $theme->set_custom_theme('gnome'); map { $theme->append_search_path($_) } @paths; if ($theme->has_icon('gnome-mime-text') == 0) { print STDERR "*** sorry, I tried my best but I still can't find a usable icon theme!\n"; exit 256; } } return $theme; } ### pop up the bookmarks editor: sub edit_bookmarks_dialog { @{$bookmarks_list->{data}} = (); foreach my $bookmark (@BOOKMARKS) { push(@{$bookmarks_list->{data}}, [$PAGE_PBF, $bookmark]); } $APP->get_widget('bookmarks_dialog')->set_position('center'); $APP->get_widget('bookmarks_dialog')->show_all; return 1; } ### user clicked the "jump to" button on the dialog: sub load_bookmark { my ($idx) = $bookmarks_list->get_selected_indices; return undef if (!defined($idx)); my $bookmark = $BOOKMARKS[$idx]; $APP->get_widget('bookmarks_dialog')->hide; link_clicked(undef, $bookmark); return 1; } ### user clicked the "remove" button on the dialog: sub remove_bookmark { my ($idx) = $bookmarks_list->get_selected_indices; return undef if (!defined($idx)); my $bookmark = $BOOKMARKS[$idx]; $APP->get_widget('bookmarks_menu')->get_submenu->remove($BOOKMARK_ITEMS->{$bookmark}); splice(@{$bookmarks_list->{data}}, $idx, 1); splice(@BOOKMARKS, $idx, 1); return 1; } ### just hide the dialog and return a true value so the dialog isn't destroyed: sub edit_bookmarks_dialog_delete_event { $APP->get_widget('bookmarks_dialog')->hide; return 1; } ### hide the dialog: sub edit_bookmarks_dialog_response { $APP->get_widget('bookmarks_dialog')->hide; return 1; } ### user clicked the "add bookmark" menu item: sub add_bookmark { my $bookmark = $APP->get_widget('location')->entry->get_text; add_bookmark_item($bookmark); push(@BOOKMARKS, $bookmark); $APP->get_widget('add_bookmark_item')->set_sensitive($APP->get_widget('location')->entry->get_text ne '' && !defined($BOOKMARK_ITEMS->{$APP->get_widget('location')->entry->get_text})); return 1; } sub new_window { system("$0 &"); return 1; } ### the next three functions are all used together, in various places: context ### menus for the navigation buttons, the bookmarks menu, and so on: ### append an item to the bookmarks menu. keep a reference in $BOOKMARK_ITEMS ### so that if the bookmark is deleted we can easily remove it from the menu: sub add_bookmark_item { my $bookmark = shift; my $item = document_menu_item($bookmark); $item->show_all; $BOOKMARK_ITEMS->{$bookmark} = $item; $APP->get_widget('bookmarks_menu')->get_submenu->append($item); return 1; } ### create a menu item for a document. they all have the same behaviour: sub document_menu_item { my $document = shift; my $item = Gtk2::ImageMenuItem->new_with_mnemonic($document =~ /\// ? (split(/\//, $document))[-1] : $document); $item->set_image(Gtk2::Image->new_from_pixbuf($PAGE_PBF)); $item->signal_connect('activate', sub { link_clicked(undef, $document) }); $TIPS->set_tip($item, sprintf(gettext("Go to '%s'"), $document)); return $item; } ### create a popup menu for a list of documents: sub create_popup_menu { my ($menu, @docs) = @_; foreach my $child ($menu->get_children) { $menu->remove($child); $child->destroy; } foreach my $doc (@docs) { my $item = document_menu_item($doc); $menu->append($item); } $menu->show_all; return 1; } sub reload_index { set_ui_busy(); $APP->get_widget('main_window')->set_sensitive(undef); Gtk2->main_iteration while(Gtk2->events_pending); $viewer->reinitialize_db; save_cache(); $APP->get_widget('main_window')->set_sensitive(1); set_ui_waiting(); } sub show_help { set_location($0); } sub view_source { $APP->get_widget('view_source_text')->get_buffer->set_text($viewer->parser->source); $APP->get_widget('view_source_window')->show_all; } sub view_source_window_hide { $APP->get_widget('view_source_window')->hide; return 1; } sub show_display_preferences_dialog { $APP->get_widget('variable_font_chooser')->set_font_name($OPTIONS->{variable_font}); $APP->get_widget('fixed_font_chooser')->set_font_name($OPTIONS->{fixed_font}); $APP->get_widget('header_color_chooser')->set_color(Gtk2::Gdk::Color->parse($OPTIONS->{header_color})); $APP->get_widget('monospace_color_chooser')->set_color(Gtk2::Gdk::Color->parse($OPTIONS->{preformat_color})); $APP->get_widget('display_preferences_dialog')->show; return 1; } sub close_display_preferences_dialog { $APP->get_widget('display_preferences_dialog')->hide; return 1; } sub display_preferences_dialog_response { if ($_[1] eq 'ok') { $OPTIONS->{variable_font} = $APP->get_widget('variable_font_chooser')->get_font_name; $OPTIONS->{fixed_font} = $APP->get_widget('fixed_font_chooser')->get_font_name; $OPTIONS->{toolbar_style} = $TOOLBAR_STYLES{$toolbar_style_combo->get_active_text}; $OPTIONS->{header_color} = sprintf('#%02X%02X%02X', $APP->get_widget('header_color_chooser')->get_color->red / 256, $APP->get_widget('header_color_chooser')->get_color->green / 256, $APP->get_widget('header_color_chooser')->get_color->blue / 256, ); $OPTIONS->{preformat_color} = sprintf('#%02X%02X%02X', $APP->get_widget('monospace_color_chooser')->get_color->red / 256, $APP->get_widget('monospace_color_chooser')->get_color->green / 256, $APP->get_widget('monospace_color_chooser')->get_color->blue / 256, ); setup_display(); } $APP->get_widget('display_preferences_dialog')->hide; return 1; } sub setup_display { $viewer->modify_font(Gtk2::Pango::FontDescription->from_string($OPTIONS->{variable_font})); $APP->get_widget('view_source_text')->modify_font(Gtk2::Pango::FontDescription->from_string($OPTIONS->{fixed_font})); $APP->get_widget('toolbar')->set_style($OPTIONS->{toolbar_style}); ($OPTIONS->{toolbar_style} eq 'icons' ? $APP->get_widget('location_label')->hide : $APP->get_widget('location_label')->show); $viewer->get_buffer->get_tag_table->lookup('monospace')->set('font' => $OPTIONS->{fixed_font}); $viewer->get_buffer->get_tag_table->lookup('monospace')->set('foreground' => $OPTIONS->{preformat_color}); $viewer->get_buffer->get_tag_table->lookup('typewriter')->set('font' => $OPTIONS->{fixed_font}); $viewer->get_buffer->get_tag_table->lookup('head1')->set('foreground' => $OPTIONS->{header_color}); $viewer->get_buffer->get_tag_table->lookup('head2')->set('foreground' => $OPTIONS->{header_color}); $viewer->get_buffer->get_tag_table->lookup('head3')->set('foreground' => $OPTIONS->{header_color}); $viewer->get_buffer->get_tag_table->lookup('head4')->set('foreground' => $OPTIONS->{header_color}); } sub show_print_dialog { } sub generate_pod_index { my ($name, @docs) = @_; my $pod = sprintf("=pod\n\n=head1 %s\n\n=over\n\n%s\n\n", $name, sprintf(gettext('Documents under %s:'), $name)); foreach my $doc (sort(@docs)) { $pod .= sprintf("=item L<%s>\n\n", $doc); } return $pod . "=back\n\n=cut\n\n"; } sub set_status { $APP->get_widget('status')->push($APP->get_widget('status')->get_context_id('Default'), shift); } sub search_input_changed { my $text = $APP->get_widget('search_input')->get_text; if ($text =~ /^\s?$/) { $search_results->get_model->clear; return 1; } my @matches; foreach my $section (keys(%{$ITEMS})) { foreach my $doc (keys(%{$ITEMS->{$section}})) { next if ($doc =~ /^\s?$/); my $match = 0; $match++ if ($LEVENSTHEIN == 1 && distance($doc, $text) < 3); $match++ if ($doc =~ /$text/i); push(@matches, $doc) if ($match > 0); } } $search_results_building = 1; $search_results->get_model->clear; foreach my $match (sort(@matches)) { push(@{$search_results->{data}}, [ $PAGE_PBF, $match ]); } $search_results_building = 0; return 1; } __END__ =pod =head1 NAME podbrowser - a Perl documentation browser for GNOME PodBrowser is a more feature-complete version of podviewer, which comes with Gtk2::Ex::PodViewer. =head1 SYNTAX B<podbrowser> [F<location>] =head1 DESCRIPTION PodBrowser is a documentation browser for Perl. You can view the documentation for Perl's builtin functions, its "perldoc" pages, pragmatic modules and the default and user-installed modules. =head1 OPTIONS F<location> If an argument is specified this argument is loaded as location. =head1 PREREQUISITES In addition to a number of modules bundles with recent Perl releases, PodBrowser needs the following: =over =item L<Gtk2> and the C<gtk2> library (C<gtk2> E<gt>= 2.8.0 is required) =item The C<gnome-icon-theme> package (version E<gt>= 2.10.0 is required) =item L<Gtk2::GladeXML> and the C<libglade> library =item L<Locale::gettext> and the C<gettext> library =item L<Gtk2::Ex::PodViewer> =item L<Pod::Simple::Search> =item L<URI::Escape> =back =head1 AUTHOR (C) Gavin Brown. Original manpage by Florian Ragwitz. The C<html2ps-podbrowser> script is a copy of the original C<html2ps> script which is (C) Jan KE<auml>rrman. =cut �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/podbrowser.glade��������������������������������������������������������������������0000664�0000764�0000764�00000257051�10673744173�016040� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> <widget class="GtkWindow" id="main_window"> <property name="title" translatable="yes">Pod Browser</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <signal name="delete_event" handler="close_window"/> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> <widget class="GtkMenuBar" id="menubar1"> <property name="visible">True</property> <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property> <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property> <child> <widget class="GtkMenuItem" id="menuitem1"> <property name="visible">True</property> <property name="label" translatable="yes">_File</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="menuitem1_menu"> <child> <widget class="GtkImageMenuItem" id="new_window1"> <property name="visible">True</property> <property name="label" translatable="yes">_New Window</property> <property name="use_underline">True</property> <signal name="activate" handler="new_window"/> <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image838"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_new-window</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkImageMenuItem" id="open2"> <property name="visible">True</property> <property name="label" translatable="yes">_Open</property> <property name="use_underline">True</property> <signal name="activate" handler="open_dialog"/> <accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image839"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> <property name="visible">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="close1"> <property name="visible">True</property> <property name="label" translatable="yes">_Close Window</property> <property name="use_underline">True</property> <signal name="activate" handler="close_window"/> <accelerator key="W" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image841"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkImageMenuItem" id="quit1"> <property name="visible">True</property> <property name="label" translatable="yes">_Quit</property> <property name="use_underline">True</property> <signal name="activate" handler="close_program"/> <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image842"> <property name="visible">True</property> <property name="stock">gtk-quit</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="edit2"> <property name="visible">True</property> <property name="label" translatable="yes">_Edit</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="edit2_menu"> <child> <widget class="GtkImageMenuItem" id="copy3"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="label" translatable="yes">_Copy</property> <property name="use_underline">True</property> <signal name="activate" handler="copy_clipboard"/> <accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image843"> <property name="visible">True</property> <property name="stock">gtk-copy</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkImageMenuItem" id="select_all2"> <property name="visible">True</property> <property name="label" translatable="yes">Select _All</property> <property name="use_underline">True</property> <signal name="activate" handler="select_all"/> <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image844"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_select-all</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkSeparatorMenuItem" id="separator1"> <property name="visible">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="reload_index1"> <property name="visible">True</property> <property name="label" translatable="yes">Reload Index...</property> <property name="use_underline">True</property> <signal name="activate" handler="reload_index"/> <accelerator key="R" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image845"> <property name="visible">True</property> <property name="stock">gtk-refresh</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkSeparatorMenuItem" id="separator4"> <property name="visible">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="find2"> <property name="visible">True</property> <property name="label" translatable="yes">_Find...</property> <property name="use_underline">True</property> <signal name="activate" handler="search_dialog"/> <accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image846"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="find_next1"> <property name="visible">True</property> <property name="label" translatable="yes">Find _Next</property> <property name="use_underline">True</property> <signal name="activate" handler="search"/> <accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/> </widget> </child> <child> <widget class="GtkSeparatorMenuItem" id="separator6"> <property name="visible">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="font_preferences1"> <property name="visible">True</property> <property name="label" translatable="yes">Display _Preferences</property> <property name="use_underline">True</property> <signal name="activate" handler="show_display_preferences_dialog"/> <child internal-child="image"> <widget class="GtkImage" id="image847"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="bookmarks_menu"> <property name="visible">True</property> <property name="label" translatable="yes">_Bookmarks</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="bookmarks_menu_menu"> <child> <widget class="GtkImageMenuItem" id="add_bookmark_item"> <property name="visible">True</property> <property name="label" translatable="yes">_Add Bookmark</property> <property name="use_underline">True</property> <signal name="activate" handler="add_bookmark"/> <accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image848"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_add-bookmark</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkImageMenuItem" id="edit_bookmarks1"> <property name="visible">True</property> <property name="label" translatable="yes">_Edit Bookmarks...</property> <property name="use_underline">True</property> <signal name="activate" handler="edit_bookmarks_dialog"/> <accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image849"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_edit-bookmark</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkSeparatorMenuItem" id="separator3"> <property name="visible">True</property> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="menuitem3"> <property name="visible">True</property> <property name="label" translatable="yes">_View</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="menuitem3_menu"> <child> <widget class="GtkCheckMenuItem" id="show_index"> <property name="visible">True</property> <property name="label" translatable="yes">_Side Pane</property> <property name="use_underline">True</property> <property name="active">True</property> <signal name="activate" handler="toggle_index"/> <accelerator key="F9" modifiers="0" signal="activate"/> </widget> </child> <child> <widget class="GtkCheckMenuItem" id="mod_tree"> <property name="visible">True</property> <property name="label" translatable="yes">_Show module as tree</property> <property name="use_underline">True</property> <property name="active">False</property> <signal name="toggled" handler="toggle_mod_tree"/> </widget> </child> <child> <widget class="GtkCheckMenuItem" id="toggle_watch"> <property name="visible">True</property> <property name="label" translatable="yes">_Watch File For Changes</property> <property name="use_underline">True</property> <property name="active">True</property> <signal name="activate" handler="toggle_watch"/> </widget> </child> <child> <widget class="GtkImageMenuItem" id="view_source"> <property name="visible">True</property> <property name="label" translatable="yes">_View Source</property> <property name="use_underline">True</property> <signal name="activate" handler="view_source"/> <accelerator key="U" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image949"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_view-html-source</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="menuitem4"> <property name="visible">True</property> <property name="label" translatable="yes">_Help</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="menuitem4_menu"> <child> <widget class="GtkImageMenuItem" id="contents1"> <property name="visible">True</property> <property name="label" translatable="yes">_Contents</property> <property name="use_underline">True</property> <signal name="activate" handler="show_help"/> <accelerator key="F1" modifiers="0" signal="activate"/> <child internal-child="image"> <widget class="GtkImage" id="image850"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkImageMenuItem" id="about1"> <property name="visible">True</property> <property name="label" translatable="yes">_About</property> <property name="use_underline">True</property> <signal name="activate" handler="about"/> <child internal-child="image"> <widget class="GtkImage" id="image851"> <property name="visible">True</property> <property name="stock">gtk-about</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkToolbar" id="toolbar"> <property name="visible">True</property> <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property> <property name="toolbar_style">GTK_TOOLBAR_ICONS</property> <property name="tooltips">True</property> <property name="show_arrow">True</property> <child> <widget class="GtkMenuToolButton" id="back_button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="stock_id">gtk-go-back</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">True</property> <signal name="show_menu" handler="show_back_button_menu"/> <signal name="clicked" handler="go_back"/> <accelerator key="Left" modifiers="GDK_MOD1_MASK" signal="clicked"/> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkMenuToolButton" id="up_button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="stock_id">gtk-go-up</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">True</property> <signal name="show_menu" handler="show_up_button_menu"/> <signal name="clicked" handler="go_up"/> <accelerator key="Up" modifiers="GDK_MOD1_MASK" signal="clicked"/> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkMenuToolButton" id="forward_button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="stock_id">gtk-go-forward</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">True</property> <signal name="show_menu" handler="show_forward_button_menu"/> <signal name="clicked" handler="go_forward"/> <accelerator key="Right" modifiers="GDK_MOD1_MASK" signal="clicked"/> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkToolItem" id="toolitem8"> <property name="visible">True</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> <child> <widget class="GtkLabel" id="location_label"> <property name="visible">True</property> <property name="label" translatable="yes"> Document: </property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> </child> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkToolItem" id="location_toolitem"> <property name="visible">True</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> <child> <widget class="GtkCombo" id="location"> <property name="visible">True</property> <property name="value_in_list">False</property> <property name="allow_empty">True</property> <property name="case_sensitive">False</property> <property name="enable_arrow_keys">True</property> <property name="enable_arrows_always">False</property> <child internal-child="entry"> <widget class="GtkEntry" id="entry1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> <property name="invisible_char">•</property> <property name="activates_default">False</property> </widget> </child> <child internal-child="list"> <widget class="GtkList" id="list1"> <property name="visible">True</property> <property name="selection_mode">GTK_SELECTION_BROWSE</property> </widget> </child> </widget> </child> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkToolButton" id="go_button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="stock_id">gtk-jump-to</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">True</property> <signal name="clicked" handler="user_set_location"/> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkToolItem" id="toolitem12"> <property name="visible">True</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> <child> <widget class="GtkEntry" id="search_entry"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <signal name="changed" handler="search_entry_changed"/> <signal name="activate" handler="search"/> </widget> </child> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> <child> <widget class="GtkToolButton" id="search_button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="stock_id">gtk-find</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">True</property> <signal name="clicked" handler="search"/> </widget> <packing> <property name="expand">False</property> <property name="homogeneous">False</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkHPaned" id="pane"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="position">200</property> <child> <widget class="GtkNotebook" id="notebook"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="show_tabs">True</property> <property name="show_border">True</property> <property name="tab_pos">GTK_POS_TOP</property> <property name="scrollable">False</property> <property name="enable_popup">False</property> <child> <widget class="GtkScrolledWindow" id="scrolledwindow1"> <property name="border_width">6</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <widget class="GtkTreeView" id="index"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="headers_visible">False</property> <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> <property name="fixed_height_mode">False</property> <property name="hover_selection">False</property> <property name="hover_expand">False</property> </widget> </child> </widget> <packing> <property name="tab_expand">False</property> <property name="tab_fill">True</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox6"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">3</property> <child> <widget class="GtkImage" id="image444"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">gnome-fs-directory</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="label" translatable="yes">Index </property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="type">tab</property> </packing> </child> <child> <widget class="GtkScrolledWindow" id="index_scrwin"> <property name="border_width">6</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <widget class="GtkTreeView" id="document_index"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="headers_visible">False</property> <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> <property name="fixed_height_mode">False</property> <property name="hover_selection">False</property> <property name="hover_expand">False</property> </widget> </child> </widget> <packing> <property name="tab_expand">False</property> <property name="tab_fill">True</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox7"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">3</property> <child> <widget class="GtkImage" id="image445"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">stock_navigator-indexes</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkLabel" id="label9"> <property name="visible">True</property> <property name="label" translatable="yes">Document </property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="type">tab</property> </packing> </child> <child> <widget class="GtkVBox" id="vbox5"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <widget class="GtkEntry" id="search_input"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> <property name="invisible_char">•</property> <property name="activates_default">False</property> <signal name="changed" handler="search_input_changed" last_modification_time="Mon, 17 Sep 2007 17:43:32 GMT"/> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkScrolledWindow" id="scrolledwindow4"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <widget class="GtkTreeView" id="search_results"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="headers_visible">False</property> <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> <property name="fixed_height_mode">False</property> <property name="hover_selection">False</property> <property name="hover_expand">False</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> <packing> <property name="tab_expand">False</property> <property name="tab_fill">True</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox13"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">3</property> <child> <widget class="GtkImage" id="image954"> <property name="visible">True</property> <property name="icon_size">1</property> <property name="icon_name">gtk-find</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkLabel" id="label22"> <property name="visible">True</property> <property name="label" translatable="yes">Search</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="type">tab</property> </packing> </child> </widget> <packing> <property name="shrink">True</property> <property name="resize">False</property> </packing> </child> <child> <widget class="GtkScrolledWindow" id="viewer_scrwin"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <placeholder/> </child> </widget> <packing> <property name="shrink">True</property> <property name="resize">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkStatusbar" id="status"> <property name="visible">True</property> <property name="has_resize_grip">True</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="open_dialog"> <property name="title" translatable="yes">Open Document</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">True</property> <property name="resizable">False</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <property name="has_separator">False</property> <signal name="delete_event" handler="open_dialog_delete_event"/> <signal name="response" handler="open_dialog_response"/> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area1"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="cancelbutton1"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-cancel</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> </widget> </child> <child> <widget class="GtkButton" id="okbutton1"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-ok</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkTable" id="table1"> <property name="border_width">6</property> <property name="visible">True</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">12</property> <property name="column_spacing">12</property> <child> <widget class="GtkButton" id="browse_button"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="browse_button_clicked"/> <child> <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">0</property> <property name="right_padding">0</property> <child> <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image20"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">4</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label4"> <property name="visible">True</property> <property name="label" translatable="yes">_Browse...</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </child> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkAlignment" id="alignment2"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">1</property> <property name="yscale">1</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">0</property> <property name="right_padding">0</property> <child> <widget class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="label" translatable="yes">Enter the builtin function, perl module, or filename that you wish to view:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> </child> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">2</property> <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="x_options"></property> </packing> </child> <child> <widget class="GtkCombo" id="open_dialog_location"> <property name="visible">True</property> <property name="value_in_list">False</property> <property name="allow_empty">True</property> <property name="case_sensitive">False</property> <property name="enable_arrow_keys">True</property> <property name="enable_arrows_always">False</property> <child internal-child="entry"> <widget class="GtkEntry" id="entry2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> <property name="invisible_char">•</property> <property name="activates_default">False</property> </widget> </child> <child internal-child="list"> <widget class="GtkList" id="list2"> <property name="visible">True</property> <property name="selection_mode">GTK_SELECTION_BROWSE</property> </widget> </child> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="search_dialog"> <property name="title" translatable="yes">Search...</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">True</property> <property name="resizable">False</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <property name="has_separator">False</property> <signal name="close" handler="search_dialog_close"/> <signal name="delete_event" handler="search_dialog_close"/> <signal name="response" handler="search_dialog_response"/> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area2"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="button1"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-7</property> </widget> </child> <child> <widget class="GtkButton" id="button2"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-find</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox4"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">12</property> <child> <widget class="GtkLabel" id="label5"> <property name="visible">True</property> <property name="label" translatable="yes">Search for:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkEntry" id="search_dialog_entry"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> <signal name="activate" handler="search_dialog_entry_activate"/> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="bookmarks_dialog"> <property name="title" translatable="yes">Bookmarks</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="default_width">500</property> <property name="default_height">250</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <property name="has_separator">True</property> <signal name="close" handler="edit_bookmarks_dialog_close"/> <signal name="delete_event" handler="edit_bookmarks_dialog_delete_event"/> <signal name="response" handler="edit_bookmarks_dialog_response"/> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox3"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area3"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="closebutton1"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-7</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox5"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <widget class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <widget class="GtkTreeView" id="bookmarks_list"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="headers_visible">False</property> <property name="rules_hint">False</property> <property name="reorderable">False</property> <property name="enable_search">True</property> <property name="fixed_height_mode">False</property> <property name="hover_selection">False</property> <property name="hover_expand">False</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkVButtonBox" id="vbuttonbox1"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_START</property> <property name="spacing">6</property> <child> <widget class="GtkButton" id="bookmarks_dialog_remove_button"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-remove</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="remove_bookmark"/> </widget> </child> <child> <widget class="GtkButton" id="bookmarks_dialog_load_button"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="load_bookmark"/> <child> <widget class="GtkAlignment" id="alignment5"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">0</property> <property name="right_padding">0</property> <child> <widget class="GtkHBox" id="hbox9"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image950"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">4</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label17"> <property name="visible">True</property> <property name="label">_View</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </child> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> <widget class="GtkWindow" id="view_source_window"> <property name="title" translatable="yes">View Source</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="default_width">800</property> <property name="default_height">600</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <signal name="delete_event" handler="view_source_window_hide"/> <child> <widget class="GtkVBox" id="vbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> <widget class="GtkScrolledWindow" id="scrolledwindow3"> <property name="border_width">6</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <widget class="GtkTextView" id="view_source_text"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="overwrite">False</property> <property name="accepts_tab">True</property> <property name="justification">GTK_JUSTIFY_LEFT</property> <property name="wrap_mode">GTK_WRAP_NONE</property> <property name="cursor_visible">True</property> <property name="pixels_above_lines">0</property> <property name="pixels_below_lines">0</property> <property name="pixels_inside_wrap">0</property> <property name="left_margin">0</property> <property name="right_margin">0</property> <property name="indent">0</property> <property name="text" translatable="yes"></property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkHSeparator" id="hseparator1"> <property name="visible">True</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkHButtonBox" id="hbuttonbox1"> <property name="border_width">6</property> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <property name="spacing">0</property> <child> <widget class="GtkButton" id="button3"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="view_source_window_hide"/> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="display_preferences_dialog"> <property name="title" translatable="yes">Font Preferences</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">True</property> <property name="resizable">False</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <property name="has_separator">True</property> <signal name="close" handler="close_display_preferences_dialog"/> <signal name="delete_event" handler="close_display_preferences_dialog"/> <signal name="response" handler="display_preferences_dialog_response"/> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox4"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area4"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="cancelbutton2"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-cancel</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> </widget> </child> <child> <widget class="GtkButton" id="okbutton2"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-ok</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkVBox" id="vbox3"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <widget class="GtkLabel" id="label10"> <property name="visible">True</property> <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Font Preferences:&lt;/span&gt;</property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox8"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> <widget class="GtkLabel" id="label11"> <property name="visible">True</property> <property name="label" translatable="yes"> </property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkTable" id="prefs_table"> <property name="visible">True</property> <property name="n_rows">5</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">12</property> <property name="column_spacing">12</property> <child> <widget class="GtkLabel" id="label12"> <property name="visible">True</property> <property name="label" translatable="yes">Variable Width Font:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkLabel" id="label13"> <property name="visible">True</property> <property name="label" translatable="yes">Fixed Width Font:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkFontButton" id="variable_font_chooser"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="show_style">True</property> <property name="show_size">True</property> <property name="use_font">False</property> <property name="use_size">False</property> <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkFontButton" id="fixed_font_chooser"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="show_style">True</property> <property name="show_size">True</property> <property name="use_font">False</property> <property name="use_size">False</property> <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkLabel" id="label14"> <property name="visible">True</property> <property name="label" translatable="yes">Header Color:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkLabel" id="label15"> <property name="visible">True</property> <property name="label" translatable="yes">Preformatted Color:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkColorButton" id="header_color_chooser"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="use_alpha">False</property> <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkColorButton" id="monospace_color_chooser"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="use_alpha">False</property> <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> <child> <widget class="GtkLabel" id="label16"> <property name="visible">True</property> <property name="label" translatable="yes">Toolbar Style:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> <property name="top_attach">4</property> <property name="bottom_attach">5</property> <property name="x_options"></property> <property name="y_options"></property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="load_failed_dialog"> <property name="title" translatable="yes">Error</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">True</property> <property name="resizable">False</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> <property name="has_separator">True</property> <signal name="close" handler="close_load_failed_dialog"/> <signal name="delete_event" handler="close_load_failed_dialog"/> <signal name="response" handler="load_failed_dialog_response"/> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox5"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area5"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="button4"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">99</property> <child> <widget class="GtkAlignment" id="alignment6"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">0</property> <property name="right_padding">0</property> <child> <widget class="GtkHBox" id="hbox11"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image952"> <property name="visible">True</property> <property name="stock">gtk-refresh</property> <property name="icon_size">4</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label20"> <property name="visible">True</property> <property name="label" translatable="yes">_Reload Index</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkButton" id="button5"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">49</property> <child> <widget class="GtkAlignment" id="alignment7"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">0</property> <property name="right_padding">0</property> <child> <widget class="GtkHBox" id="hbox12"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <widget class="GtkImage" id="image953"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">4</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label21"> <property name="visible">True</property> <property name="label" translatable="yes">_Search on CPAN</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkButton" id="button6"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-cancel</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkHBox" id="hbox10"> <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">12</property> <child> <widget class="GtkImage" id="image951"> <property name="visible">True</property> <property name="icon_size">6</property> <property name="icon_name">gtk-dialog-error</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkVBox" id="vbox4"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">12</property> <child> <widget class="GtkLabel" id="load_failed_dialog_title_label"> <property name="visible">True</property> <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="load_failed_dialog_message_label"> <property name="visible">True</property> <property name="label" translatable="yes">Would you like to reload the document index and try again?</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> </glade-interface> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/podbrowser.svg����������������������������������������������������������������������0000664�0000764�0000764�00000035136�10476030542�015546� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="48px" height="48px" id="svg1256" sodipodi:version="0.32" inkscape:version="0.44" sodipodi:docbase="/home/gavin" sodipodi:docname="podbrowser.svg"> <defs id="defs3"> <linearGradient id="linearGradient12512"> <stop style="stop-color:#ffffff;stop-opacity:1.0000000;" offset="0.0000000" id="stop12513" /> <stop style="stop-color:#fff520;stop-opacity:0.89108908;" offset="0.50000000" id="stop12517" /> <stop style="stop-color:#fff300;stop-opacity:0.0000000;" offset="1.0000000" id="stop12514" /> </linearGradient> <linearGradient inkscape:collect="always" id="linearGradient21644"> <stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop21646" /> <stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop21648" /> </linearGradient> <linearGradient inkscape:collect="always" id="linearGradient2116"> <stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2118" /> <stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop2120" /> </linearGradient> <linearGradient id="linearGradient2094"> <stop style="stop-color:#d6e3f0;stop-opacity:1.0000000;" offset="0.0000000" id="stop2096" /> <stop style="stop-color:#95b1cf;stop-opacity:1.0000000;" offset="1.0000000" id="stop2098" /> </linearGradient> <linearGradient id="linearGradient2803"> <stop id="stop2805" offset="0" style="stop-color:#ffffff;stop-opacity:1;" /> <stop id="stop2807" offset="1.0000000" style="stop-color:#cbcbcb;stop-opacity:1.0000000;" /> </linearGradient> <linearGradient id="linearGradient2795"> <stop id="stop2797" offset="0.0000000" style="stop-color:#000000;stop-opacity:0.068627454;" /> <stop id="stop2799" offset="1.0000000" style="stop-color:#ffffff;stop-opacity:1.0000000;" /> </linearGradient> <linearGradient gradientUnits="userSpaceOnUse" y2="4.9530048" x2="41.219128" y1="4.9530050" x1="35.433035" gradientTransform="matrix(0.254000,0.000000,1.822151e-16,3.759813,0.788629,0.148567)" id="linearGradient2801" xlink:href="#linearGradient2795" inkscape:collect="always" /> <linearGradient gradientUnits="userSpaceOnUse" y2="84.287079" x2="10.219901" y1="93.338043" x1="10.496115" gradientTransform="matrix(2.262742,0.000000,0.000000,0.441942,1.000000,-0.875000)" id="linearGradient2813" xlink:href="#linearGradient2803" inkscape:collect="always" /> <linearGradient inkscape:collect="always" xlink:href="#linearGradient2094" id="linearGradient2100" gradientTransform="matrix(0.957750,0.000000,0.000000,1.027989,1.000000,-0.571911)" x1="6.5871811" y1="22.132999" x2="14.511404" y2="22.132999" gradientUnits="userSpaceOnUse" /> <linearGradient inkscape:collect="always" xlink:href="#linearGradient2116" id="linearGradient2112" gradientTransform="matrix(1.025428,0.000000,0.000000,0.957303,0.000000,-0.806758)" x1="73.361984" y1="26.652197" x2="-2.7582901" y2="21.270376" gradientUnits="userSpaceOnUse" /> <radialGradient inkscape:collect="always" xlink:href="#linearGradient21644" id="radialGradient21650" cx="25.125" cy="36.75" fx="25.125" fy="36.75" r="15.75" gradientTransform="matrix(1.000000,0.000000,0.000000,0.595238,-6.245005e-16,14.87500)" gradientUnits="userSpaceOnUse" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="0.27843137" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568542" inkscape:cx="23.757254" inkscape:cy="25.529515" inkscape:current-layer="layer1" showgrid="false" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="878" inkscape:window-height="651" inkscape:window-x="226" inkscape:window-y="93" fill="#ef2929" stroke="#cc0000" inkscape:showpageshadow="false" /> <metadata id="metadata4"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title>Addess Book - New</dc:title> <dc:date /> <dc:creator> <cc:Agent> <dc:title>Jakub Steiner</dc:title> </cc:Agent> </dc:creator> <dc:source>http://jimmac.musichall.cz</dc:source> <dc:subject> <rdf:Bag> <rdf:li>address</rdf:li> <rdf:li>contact</rdf:li> <rdf:li>book</rdf:li> </rdf:Bag> </dc:subject> <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> </cc:Work> <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /> <cc:requires rdf:resource="http://web.resource.org/cc/Notice" /> <cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /> <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /> </cc:License> </rdf:RDF> </metadata> <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> <path style="opacity:1;color:#000000;fill:#edd400;fill-opacity:1;fill-rule:evenodd;stroke:#c4a000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" d="M 33.096456,4.6520202 L 40.521077,4.6520202 C 41.228184,4.6520202 41.758513,4.8287969 41.93529,5.71268 L 42.819174,12.606972 C 42.907562,13.667632 42.443523,14.021185 41.493349,14.021185 L 32.919679,14.021185 L 33.096456,4.6520202 z " id="path21630" sodipodi:nodetypes="ccccccc" /> <path sodipodi:nodetypes="ccccccc" id="path21632" d="M 34.10295,5.638875 L 40.463507,5.638875 C 40.771656,5.638875 40.940266,5.669037 40.986054,5.960473 L 41.777489,12.344449 C 41.847258,12.775421 41.959897,13.019804 41.637211,13.034341 L 33.963412,13.034341 L 34.10295,5.638875 z " style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000006;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> <path sodipodi:nodetypes="ccccccc" id="path21634" d="M 35.596456,12.40202 L 43.021077,12.40202 C 43.728184,12.40202 44.258513,12.578797 44.43529,13.46268 L 45.319174,20.356972 C 45.407562,21.417632 44.943523,21.771185 43.993349,21.771185 L 35.419679,21.771185 L 35.596456,12.40202 z " style="opacity:1;color:#000000;fill:#9db029;fill-opacity:1;fill-rule:evenodd;stroke:#727e0a;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> <path style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000006;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" d="M 36.60295,13.388875 L 42.963507,13.388875 C 43.271656,13.388875 43.440266,13.419037 43.486054,13.710473 L 44.277489,20.094449 C 44.347258,20.525421 44.459897,20.769804 44.137211,20.784341 L 36.463412,20.784341 L 36.60295,13.388875 z " id="path21636" sodipodi:nodetypes="ccccccc" /> <path sodipodi:type="arc" style="opacity:1;color:#000000;fill:url(#radialGradient21650);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" id="path21642" sodipodi:cx="25.125" sodipodi:cy="36.75" sodipodi:rx="15.75" sodipodi:ry="9.375" d="M 40.875 36.75 A 15.75 9.375 0 1 1 9.375,36.75 A 15.75 9.375 0 1 1 40.875 36.75 z" transform="matrix(1.150794,0.000000,0.000000,1.000000,-4.913690,0.625000)" /> <path style="opacity:1;color:#000000;fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" d="M 36.06451,20.776498 L 44.50992,20.776498 C 45.314245,20.776498 45.917487,20.995896 46.118569,22.092882 L 47.123975,30.649381 C 47.224515,31.965765 46.696677,32.40456 45.615866,32.40456 L 35.863428,32.40456 L 36.06451,20.776498 z " id="path21638" sodipodi:nodetypes="ccccccc" /> <path sodipodi:nodetypes="ccccccc" id="path21640" d="M 37.209384,21.763574 L 44.444435,21.763574 C 44.79495,21.763574 44.986742,21.801928 45.038825,22.172513 L 45.939072,30.290267 C 46.018433,30.838284 46.146559,31.149038 45.779508,31.167522 L 37.050661,31.167522 L 37.209384,21.763574 z " style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000072;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> <path style="color:#000000;fill:#5b6b94;fill-opacity:1;fill-rule:nonzero;stroke:#364878;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" d="M 6.3643222,5.5185897 C 6.4551049,3.6036003 7.3719758,2.5542814 9.0788784,2.549044 L 38.405776,2.4590577 C 38.652361,2.4583011 38.974317,2.6592071 38.999012,2.9089888 L 42.257491,35.867228 L 40.942189,35.923862 L 41.571429,42.369516 C 41.632441,42.994499 41.390059,43.52882 40.5,43.533035 L 9.7893046,43.678474 C 7.25676,43.690468 4.6538454,41.59976 4.7759337,39.024403 L 6.3643222,5.5185897 z " id="rect1408" sodipodi:nodetypes="csssccsssss" /> <path id="path2489" d="M 40.125,34.875 L 10.9375,35 C 9.3809819,35.177868 8.125,36.39612 8.125,38 C 8.125,39.60388 9.3809819,40.822132 10.9375,41 L 40.125,41.125 L 40.125,41.0625 C 38.469378,40.984348 37.125,39.674851 37.125,38 C 37.125,36.325149 38.469378,35.015652 40.125,34.9375 L 40.125,34.875 z " style="color:#000000;fill:url(#linearGradient2813);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> <path sodipodi:nodetypes="ccccccssc" id="path2784" d="M 9.6875,2.8125 C 7.9805897,2.8125 7.050103,3.8215062 6.96875,5.6738658 L 5.3125,37.825772 C 5.22054,40.904199 7.1393732,42.654485 9.125,43.15625 C 4.875,41.525579 5.4375,34.164455 10.75,34.195222 L 41.648286,34.195222 L 38.335786,3.2432432 C 38.310025,3.0025304 37.987878,2.8125 37.742036,2.8125 L 9.6875,2.8125 z " style="color:#000000;fill:url(#linearGradient2100);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> <rect y="3.968539" x="9.7886267" height="29.604792" width="2" id="rect2793" style="opacity:0.48044691;color:#000000;fill:url(#linearGradient2801);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.60818715;visibility:visible;display:inline;overflow:visible" transform="matrix(1.000000,0.000000,-3.582731e-2,0.999358,0.000000,0.000000)" /> <path style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2112);stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:20;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" d="M 9.8751008,3.3336831 C 8.1912014,3.3336831 7.5384236,4.0658459 7.4581673,5.887831 L 6.1592633,35.777198 C 7.0925916,34.170451 8.5988591,33.594437 11.011665,33.594437 L 40.963081,33.594437 L 38.137179,3.7573631 C 38.114727,3.5203092 37.793961,3.3336831 37.551434,3.3336831 L 9.8751008,3.3336831 z " id="path2104" sodipodi:nodetypes="cccscssc" /> </g> </svg> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/COPYING�����������������������������������������������������������������������������0000664�0000764�0000764�00000043131�10476030542�013664� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/podbrowser.png����������������������������������������������������������������������0000664�0000764�0000764�00000007407�10476030542�015533� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���0���0���W���bKGD������ pHYs�� �� ����tIME&kc��IDATxY\ygg{͌ !YD`C Be\$618e'yW?$U~HbW8bBŒ0FB#HY4KO%3#e! +UO:;{w% ,iϥgャuW�Tn;VmU}y$7`s<F`箸xժ7~kjU }$IGsns`Z {58eԉQ:pbltv091FgWSLOM2S$_dA  p%< x*/~Sṧvw9!IPBR Ú5%\6l<XkO  ڗBoOg9+xOYB ; +5RrY>y ,xq:*:Z{+sקx�ÔJE{ܵϘ'06!ux*NgE7Rq\_k-RzO9(O<'[w)o/ ,Ko+9T*rp:tcC y k!wx֑)|7d! \o_ݼ25CQYZ:~b'v>#,n_Bj{ V!H48s~<sxRaEXoւL?χDLrUoVQz<cn6mo~o�rVxIF#ZWpq7~'7_,Q$1 *N,j MRQڐ%,RϞy8LWKgA \#=}|{'9*33%oqױ5$F1+Qޒk.'b)M"i+.Ę%^> da ,= *<OLOfU,m028-R)2!I$ZGNR1Ƨ&?1dq N06=vu,].^d劕t5sьёalJ`G?'ﺍޖӥCE6aE:lj VqHM<-Qo r1^ᑧa.Y<[6/ sbذ YW=oP߫\UʌNٳ>~Bh' mmMj6lf+Fr#EwIFM QXM钕(%i*Mg PTkW_.pH`ݪKUSEqhYg٢<BQ5X]Stvuq+>p C,\ C%É)SJo\Hi? p)>>pw= HM|,i@1ʣ'5"#YNQݳzx&nE1}T5rHuĜs�}!k/u [Yq2n#,y2z:8$#PA TF R96\}zr<jVBL64v%݅,{IƷy zalROl͖߿7GKiA@(י31YCj#IR)RysEݝDtvvQ=Hr}f 3Y@M8zwlׯ㕟Hir SGjAG`y1: :4Rń4zР%`zjI "8:2NZ=ɻ�X˅2mxBؤJTaX.Q][D;A=TIIS2(q^B�8"Pk]Ћwb}>.$6F\Ȧ52Q1l&RSIDBRz D,IA:4E 6H9d$?ڹ\ќw暠 [o P.MѻRi"5*7'K8ƊKijw{PJd j6Ip4:]m|BHAҰD&"m! FHHXnpe;Yf1\q /p#MRJ2JY Lid �z+/cp�Ds1;: IREi c{b <n^k;oeŒ%GY~RI8K<c NQ̠'Cjc*uOdZZ0[B8S='8yWGTfXy)|LL$ˁ p[:/<HT pb ](tt38<BgǺzi L<R~V�{ꫯb׋916J^-\GqBXkא$m�xIHV,{$Cg@n>mڵe* HF'>|b4[]A-:QȃOf ^fh͵\(I@ 1t&*Džœ �"ovrxW8:gX"[#II$ܾfa{;-~*Z3l+>ЙϠ V(Ϸf.6R$9lb`@o/6]naK/2x}$*ʡ9Kj$4$A nC<AYci'xߢ.fdL_':pLJ%%SUj)-PXqjz)B<')W!AB08h(B$uY<˗/ *b1(GTca.Tz=%hdDq+E" !&.t�nf2ZtwwcF*@ J*RX )AukWQ-‹P)Ȳ(4#?j7[|[#G"hJlR !BDFx!΅QFđzAaQ.bbcC:6H6(d31qdhmm! QSԥDk%qD"#a/YƁ1sTꩥV-aHᖫWRV}w5sԕɉ8FM.EIdzJKaRd! JJc@2SL굔$MG%7j}Y$ɻx[n('&QJaBJ)x.0'<(!<afRkE.PKJhzJ&1J`x�f/xY5Ms1q:⦅q()V%(6]d1\+atMq0SDI&|;yݿFog*qrS7 ?WXZk<n BI8fbdG7؍B8ÞjA5R2dBđ:6m~:_idΟ:}񴵶PsE!'2?jo"3TGʇ@ \Y,B)oMG>w6�R?֩+iéks8I<uJy&*d@)_˕;@\JzB#\L3wx-ɍC;>=0q&::C7s�[hjU����IENDB`���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/slack-desc��������������������������������������������������������������������������0000664�0000764�0000764�00000000556�10476030542�014571� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser: podbrowser (a Perl Documentation Browser) podbrowser: podbrowser: PodBrowser is a documentation browser for Perl. You can view the podbrowser: documentation for Perl's builtin functions, its "perldoc" pages, podbrowser: pragmatic modules and the default and user-installed modules. podbrowser: podbrowser: podbrowser: podbrowser: podbrowser: podbrowser: ��������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/Makefile����������������������������������������������������������������������������0000664�0000764�0000764�00000002316�10673535421�014276� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $Id: Makefile,v 1.4 2005/10/05 10:07:40 jodrell Exp $ NAME=podbrowser PREFIX=/usr/local BINDIR=$(PREFIX)/bin DATADIR=$(PREFIX)/share ICONDIR=$(DATADIR)/icons/hicolor/48x48/apps MANDIR=$(DATADIR)/man/man1 all: podbrowser podbrowser: @mkdir -p build perl -ne 's!\@PREFIX\@!$(PREFIX)!g ; s!\@LIBDIR\@!$(LIBDIR)!g ; print' < $(NAME).pl > build/$(NAME) pod2man $(NAME).pl | gzip -c > build/$(NAME).1.gz install: mkdir -p $(BINDIR) \ $(DATADIR)/$(NAME) \ $(DATADIR)/applications \ $(ICONDIR) \ $(MANDIR) install -m 0644 $(NAME).glade $(DATADIR)/$(NAME)/ install -m 0644 $(NAME).png $(ICONDIR)/ install -m 0644 $(NAME).desktop $(DATADIR)/applications/ install -m 0644 build/$(NAME).1.gz $(MANDIR)/ install -m 0755 build/$(NAME) $(BINDIR)/$(NAME) install -m 0755 html2ps-$(NAME) $(BINDIR)/html2ps-$(NAME) po: $(NAME).pl $(NAME).glade xgettext -kgettext -lperl $(NAME).pl sed -i s/charset=CHARSET/charset=UTF-8/ messages.po xgettext -lGlade -j $(NAME).glade mo: if test -d "locale/$$LANG/LC_MESSAGES"; then \ echo "locale/$$LANG/LC_MESSAGES exists"; \ else \ mkdir -p "locale/$$LANG/LC_MESSAGES"; \ fi msgfmt -o "locale/$$LANG/LC_MESSAGES/$(NAME).mo" "$(NAME).$$LANG.po" clean: rm -rf build ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������podbrowser-0.12/README������������������������������������������������������������������������������0000664�0000764�0000764�00000000701�10476030542�013505� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������README ====== PodBrowser is a documentation browser for Perl. You can view the documentation for Perl's builtin functions, its "perldoc" pages, pragmatic modules and the default and user-installed modules. You will need: Perl >= 5.8.0, Gtk+ >= 2.4.0, GNOME >= 2.4.0, GNU gettext and the following Perl libraries, available from CPAN: Gtk2 Gtk2::GladeXML Gtk2::PodViewer Locale::gettext -- $Id: README,v 1.1 2004/09/02 15:36:58 jodrell Exp $ ���������������������������������������������������������������podbrowser-0.12/podbrowser.desktop������������������������������������������������������������������0000664�0000764�0000764�00000000535�10476030542�016413� 0����������������������������������������������������������������������������������������������������ustar �gavin���������������������������gavin������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=Pod Browser Comment=Browse Perl Documentation Type=Application Exec=podbrowser TryExec= Icon=podbrowser.png X-GNOME-DocPath= Terminal=false Name[en_GB]=Pod Browser GenericName[en_GB]= Comment[en_GB]=Browse Perl Documentation StartupNotify=true Categories=GNOME;Application;Development;X-Red-Hat-Base; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������