*** empty log message ***

This commit is contained in:
hyung-hwan 2007-02-04 05:03:01 +00:00
parent f41ff496b1
commit 455522e89e
2 changed files with 95 additions and 25 deletions

View File

@ -17,7 +17,19 @@ ase/etc -
ase/doc -
{{{
hello
mr monkey...
#include <stdio.h>
#if defined(__BORLANDC__)
#pragma hdrstop
#define Library
#endif
#include <ase/awk/awk_i.h>
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;
}
}}}

View File

@ -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 "</html>";
print "</head>";
@ -32,37 +36,91 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ {
if (mode == 0)
{
if (/^== [^=]+ ==$/)
if (/^$/)
{
# empty line
if (para_started)
{
para_started = 0;
print "</p>";
}
empty_line_count++;
}
else
{
if (/^= [^=]+ =$/)
{
if (para_started)
{
print "</p>";
para_started = 0;
}
text=substr($0, 2, length($0)-2);
print "<h1>" text "</h1>";
}
else if (/^== [^=]+ ==$/)
{
if (para_started)
{
print "</p>";
para_started = 0;
}
text=substr($0, 3, length($0)-4);
print "<h2>" text "</h2>";
}
else if (/^=== [^=]+ ===$/)
{
if (para_started)
{
print "</p>";
para_started = 0;
}
text=substr($0, 4, length($0)-6);
print "<h3>" text "</h3>";
}
else if (/^==== [^=]+ ====$/)
{
if (para_started)
{
print "</p>";
para_started = 0;
}
text=substr($0, 5, length($0)-8);
print "<h34" text "</h4>";
}
else if (/^\{\{\{$/)
{
# {{{
if (para_started)
{
print "</p>";
para_started = 0;
}
print "<pre>";
mode = 1;
}
else if (/^$/)
{
print "<br>";
}
else
{
if (!para_started > 0)
{
print "<p>";
para_started = 1;
}
gsub ("<", "\\&lt;");
gsub (">", "\\&gt;");
print $0;
print "<br>";
}
empty_line_count = 0;
}
}
else if (mode == 1)
{
if (/^}}}$/)
{
# }}}
print "</pre>";
mode = 0;
}