diff --git a/ase/doc/ase.man b/ase/doc/ase.man index 8d4a0192..477d18f0 100644 --- a/ase/doc/ase.man +++ b/ase/doc/ase.man @@ -17,7 +17,19 @@ ase/etc - ase/doc - {{{ -hello -mr monkey... -#include +#if defined(__BORLANDC__) +#pragma hdrstop +#define Library +#endif + +#include + +static void __free_afn (void* awk, void* afn); + +ase_awk_t* ase_awk_open ( + const ase_awk_prmfns_t* prmfns, void* custom_data, int* errnum) +{ + ase_awk_t* awk; +} + }}} diff --git a/ase/rel/doc.awk b/ase/rel/doc.awk index b9da2e2f..24a1118f 100644 --- a/ase/rel/doc.awk +++ b/ase/rel/doc.awk @@ -1,13 +1,17 @@ global header, mode; +global empty_line_count; +global para_started; BEGIN { header = 1; mode = 0; + empty_line_count = 0; + para_started = 0; output=ARGV[0]; gsub (/\.man/, ".html", output); - print "OUTPUT TO: " output; + #print "OUTPUT TO: " output; print ""; print ""; @@ -32,37 +36,91 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ { if (mode == 0) { - if (/^== [^=]+ ==$/) + if (/^$/) { - text=substr($0, 3, length($0)-4); - print "

" text "

"; - } - else if (/^=== [^=]+ ===$/) - { - text=substr($0, 4, length($0)-6); - print "

" text "

"; - } - else if (/^\{\{\{$/) - { - print "
";
-			mode = 1;
-		}
-		else if (/^$/)
-		{
-			print "
"; + # empty line + if (para_started) + { + para_started = 0; + print "

"; + } + empty_line_count++; } else { - gsub ("<", "\\<"); - gsub (">", "\\>"); - print $0; - print "
"; + if (/^= [^=]+ =$/) + { + if (para_started) + { + print "

"; + para_started = 0; + } + text=substr($0, 2, length($0)-2); + print "

" text "

"; + } + else if (/^== [^=]+ ==$/) + { + if (para_started) + { + print "

"; + para_started = 0; + } + text=substr($0, 3, length($0)-4); + print "

" text "

"; + } + else if (/^=== [^=]+ ===$/) + { + if (para_started) + { + print "

"; + para_started = 0; + } + text=substr($0, 4, length($0)-6); + print "

" text "

"; + } + else if (/^==== [^=]+ ====$/) + { + if (para_started) + { + print "

"; + para_started = 0; + } + text=substr($0, 5, length($0)-8); + print ""; + } + else if (/^\{\{\{$/) + { + # {{{ + if (para_started) + { + print "

"; + para_started = 0; + } + print "
";
+				mode = 1;
+			}
+			else
+			{
+				if (!para_started > 0) 
+				{
+					print "

"; + para_started = 1; + } + + gsub ("<", "\\<"); + gsub (">", "\\>"); + print $0; + print "
"; + } + + empty_line_count = 0; } } else if (mode == 1) { if (/^}}}$/) { + # }}} print "

"; mode = 0; }