*** 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 - ase/doc -
{{{ {{{
hello #if defined(__BORLANDC__)
mr monkey... #pragma hdrstop
#include <stdio.h> #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 header, mode;
global empty_line_count;
global para_started;
BEGIN { BEGIN {
header = 1; header = 1;
mode = 0; mode = 0;
empty_line_count = 0;
para_started = 0;
output=ARGV[0]; output=ARGV[0];
gsub (/\.man/, ".html", output); gsub (/\.man/, ".html", output);
print "OUTPUT TO: " output; #print "OUTPUT TO: " output;
print "</html>"; print "</html>";
print "</head>"; print "</head>";
@ -32,37 +36,91 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ {
if (mode == 0) 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); text=substr($0, 3, length($0)-4);
print "<h2>" text "</h2>"; print "<h2>" text "</h2>";
} }
else if (/^=== [^=]+ ===$/) else if (/^=== [^=]+ ===$/)
{ {
if (para_started)
{
print "</p>";
para_started = 0;
}
text=substr($0, 4, length($0)-6); text=substr($0, 4, length($0)-6);
print "<h3>" text "</h3>"; 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 (/^\{\{\{$/) else if (/^\{\{\{$/)
{ {
# {{{
if (para_started)
{
print "</p>";
para_started = 0;
}
print "<pre>"; print "<pre>";
mode = 1; mode = 1;
} }
else if (/^$/)
{
print "<br>";
}
else else
{ {
if (!para_started > 0)
{
print "<p>";
para_started = 1;
}
gsub ("<", "\\&lt;"); gsub ("<", "\\&lt;");
gsub (">", "\\&gt;"); gsub (">", "\\&gt;");
print $0; print $0;
print "<br>"; print "<br>";
} }
empty_line_count = 0;
}
} }
else if (mode == 1) else if (mode == 1)
{ {
if (/^}}}$/) if (/^}}}$/)
{ {
# }}}
print "</pre>"; print "</pre>";
mode = 0; mode = 0;
} }