From b9caaa8e4b66817dbc66d0e79b567b3285869fea Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Sat, 7 Feb 2004 19:31:13 +0000 Subject: Deleted file --- html/elispmarkup.php3 | 137 -------------------------------------------------- 1 file changed, 137 deletions(-) delete mode 100644 html/elispmarkup.php3 (limited to 'html/elispmarkup.php3') diff --git a/html/elispmarkup.php3 b/html/elispmarkup.php3 deleted file mode 100644 index e2b47367..00000000 --- a/html/elispmarkup.php3 +++ /dev/null @@ -1,137 +0,0 @@ -" . $text . "\n"; -} - -// FIXME: this is a nonsense really. Might be okay if it -// used dynamic HTML but it's too much of a faff at the moment. -// Also, we should use the tree structure properly and keep a stack! - -function outline_markup($filename,$thispage,$expanded) { - if ($title=="") { $title=$filename; }; - $outline = false; - $file = file($filename); - $i = 0; - $level=0; - $headingno=0; - /* Now parse file, watching for outline headers */ - for (;$i < count($file);$i++) { - $line = $file[$i]; - // HTML escapes - $line = htmlentities($line); - // Anchors for URLs - $line = ereg_replace("((http://|mailto:)[^ \n\t]+)","\\1",$line); - // Assume a heading - $multipar=false; - if (ereg("-\*- (mode:)?outline -\*-",$line)) { - // Found line with outline mode header, set flag - // and print message - $outline = true; - print "

"; - print "This is a flattened outline file: click on a title to hide/reveal the leaf underneath it."; - print "
Click "; - print "here to show whole body, or "; - print "here to hide whole body."; - print "

\n"; - } elseif ($outline) { - if (ereg("^ *\n",$line)) { - // if (!newpara) { print "

\n"; }; - $newpara = true; - } elseif (ereg("^([\*]+) (.*)\n",$line,$heading)) { - $newlevel = strlen($heading[1])+1; - // if ($newlevel < $level) { - // Up a level - // $p = strpos($path,"-"); - // $path = substr($path,0,$p-1); - if ($newpara && - $level<=$newlevel && - isexpanded($headingno,$expanded)) { print "

\n"; } - $headingno++; - $level=$newlevel; - $text="$heading[2]"; - link_toggle($headingno,$text,$thispage,$filename,$expanded); - } elseif (isexpanded($headingno,$expanded)) { - if ($newpara && $level==0) { print "

\n"; } - print $line; - $newpara=false; - $level=0; - } - } else { - print $line; - } - } -} - -// -// For browsing source. Unfinished. -// - -function elisp_markup($filename,$thispage,$title="") { - if ($title=="") { $title=$filename; }; - $file = file($filename); - $i = 0; - $level=0; - $headingno=0; - /* Now parse file, watching for outline headers */ - for (;$i < count($file);$i++) { - $line = $file[$i]; - // HTML escapes - $line = htmlentities($line); - // Pagebreaks - // ??? - // Anchors for URLs - $line = ereg_replace("((http://|mailto:)[-a-zA-Z0-9\.~/_@]+)","\\1",$line); - // Font-lock equivalents... - // 1. comments. Strings roughly done: ignore if quote appears after ; -// seems buggy:

breaks line in pre formatting. Only do for whole-lines. -// $line = ereg_replace("^([^;]*)(;+[^\"^\n]+)\n$", - $line = ereg_replace("^(;+[^\"^\n]+)\n$", - "\\1\n", - $line); - // 2. keywords - $line = ereg_replace("^\(def(macro|un|var|custom|const|group|face)", - "(def\\1", - $line); - // FIXME: add hrefs for keywords, looking up in TAGS file. - // FIXME: add line numbers - // FIXME: parse strings - print $line; - } -} -- cgit v1.2.3