Skip to content

Commit

Permalink
Changed labels
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@369 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x97davka committed Aug 14, 1998
1 parent e47ca4b commit 1c4562a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions modeq/tools/rmldoc
Expand Up @@ -32,7 +32,9 @@ string tex_escape(string s)
void convert(string f)
{
array(string) lines = Stdio.read_file(f) / "\n";
string state = "start", buf = "", fn = (f/"/")[-1], desc = "";
string state = "start", buf = "", desc = "";
string fn = (f/"/")[-1];
string module = fn - ".rml";
array a;
int ignorecode = 0, lno = 0;
string outbuf = "";
Expand Down Expand Up @@ -104,21 +106,29 @@ void convert(string f)
switch(lower_case(a[0])) {
case "file":
if(a[1] != fn)
{
werror("Filename mismatch in file "+f+
": claims to be '"+a[0]+"'\n");
": claims to be '"+a[1]+"'\n");
fn = (a[1]/"/")[-1];
module = fn - ".rml";
}
break;
case "description":
desc = a[1];
break;
case "relation":
OUT("\\subsubsection{Relation \\code{"+a[1]+"}}\n");
OUT("\\subsubsection{Relation \\code{"+a[1]+"}}\n"
"\\label{src:"+module+":"+lower_case(a[1]-"\\_")+"}\n");
break;
case "purpose":
OUT("\\textbf{Purpose:} "+a[1]+"\n\\vspace{1ex}\n");
break;
case "fixme":
OUT("\\fixme{"+a[1]+"}\n");
break;
case "rcs":
OUT("% "+a[1]+"\n");
break;
default:
werror(sprintf("%s:%d: Warning: ignored header %s\n",
f,lno,a[0]));
Expand Down Expand Up @@ -168,7 +178,7 @@ void convert(string f)
// OUT("\\end{verbatim}}\n");
OUT("\\end{boxedverbatim}\n\n");

write("\\sourcefile{"+fn+"}{"+desc+"}\n"+outbuf);
write("\\sourcefile{"+module+"}{"+desc+"}\n"+outbuf);
}

int main(int argc, array argv)
Expand Down

0 comments on commit 1c4562a

Please sign in to comment.