From 1dfb0077a8130f0c83ccdaecd896fdb3d898ed78 Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Tue, 13 Dec 2005 00:23:29 +0000 Subject: [PATCH] fixed (.) --- docs/make-doc.pl | 8 +++++--- docs/make-doc.py | 12 +++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/make-doc.pl b/docs/make-doc.pl index c736001..89da2f6 100644 --- a/docs/make-doc.pl +++ b/docs/make-doc.pl @@ -1,5 +1,5 @@ -use strict "var"; +use strict "vars"; my $x; my $F; @@ -94,6 +94,7 @@ sub pre { # used for non-star lines in comment blocks } # per-file comment block handling +my $name; for $name (keys %file) { $file{$name}{comment} =~ s{<([\w\.\-]+\@[\w\.\-]+\w\w)>}{<$1>}sg; @@ -292,7 +293,7 @@ $htmlTXT =~ s/ \-\> /-\>\;<\/small>/gsx; # just sanitize # and finally print the html-formatted output open F, ">$o{libhtmlfile}" or die "could not open '$o{libhtmlfile}': $!"; -print F " ${package} autodoc documentation "; +print F " $o{package} autodoc documentation "; print F "\n\n"; print F "\n

",$o{package}," -", $o{version}; print F "

"; @@ -373,7 +374,7 @@ for $name (@headerlist) $fn{$into}{_refstart} .= '' if $me; $fn{$into}{_refends} .= "\n\n" if $me; - $fn{$nane}{_title_} = $name; + $fn{$name}{_title_} = $name; $fn{$name}{_title_} =~ s{\s*}{}gs; $fn{$name}{_refentryinfo} .= "\n ".$fn{$name}{_title_}."" if $me; @@ -532,6 +533,7 @@ for $name (@namelist) } } +my $H; for $H (keys %header) # second pass { next if not length $header{$H}{_refstart}; diff --git a/docs/make-doc.py b/docs/make-doc.py index 7e81a08..c58427c 100644 --- a/docs/make-doc.py +++ b/docs/make-doc.py @@ -1,3 +1,5 @@ +#! /usr/bin/python +# -*- coding: UTF-8 -*- import sys import re import string @@ -201,9 +203,9 @@ class InputFiles: def scan_options (options, list): def encode(text): - return s(s(text, r"¬", r"&#AC;"), r"\*/",r"¬") + return s(s(text, r"¬", r"&#AC;"), r"\*/",r"¬") def decode(text): - return s(text, r"¬", r"*/") + return s(text, r"¬", r"*/") for name in options: found = m(name, r"^(\w+)=(.*)") @@ -223,12 +225,12 @@ def scan_options (options, list): file = list.new_File(name) # cut per-function comment block - text = s(text, r"(?x) [/][*][*](?=\s) ([^¬]+) ¬ ([^\{\}\;\#]+) [\{\;]", + text = s(text, r"(?x) [/][*][*](?=\s) ([^¬]+) ¬ ([^\{\}\;\#]+) [\{\;]", lambda x : list.add_function_declaration( decode(x.group(1)), decode(x.group(2)))) # cut per-file comment block - found = m(text, r"(?sx) [/][*]+(?=\s) ([^¬]+) ¬ " + found = m(text, r"(?sx) [/][*]+(?=\s) ([^¬]+) ¬ " r"(?:\s*\#define\s*\S+)*" r"(\s*\#include\s*<[^<>]*>(?:\s*//[^\n]*)?)") if found: @@ -237,7 +239,7 @@ def scan_options (options, list): else: file.comment = None file.include = None - found = m(text, r"(?sx) ^ [/][*]+(?=\s) ([^¬]+) ¬ ") + found = m(text, r"(?sx) ^ [/][*]+(?=\s) ([^¬]+) ¬ ") if found: file.comment = decode(found.group(1)) #fi -- 2.40.0