/* $OpenXM: OpenXM/src/k097/Doc/genhelp.k,v 1.1 2001/01/04 12:29:32 takayama Exp $ */ /* Todo * Helplist should be sorted. * Ex. should be removed. * Args and references should be given in the Helplist. */ def foo() { local n,i,key,s,aaa,ref; Println("DO NOT EDIT THIS FILE. "); Println("It is AUTHOMATICALLY GENERATED."); sm1(" (cat standard-0.texi) system "); n = Length(Helplist); Println("/*&C "); Println("@menu "); for (i=0; i 2) { aaa = Helplist[i,2]; ref = Helplist[i,3]; }else{ aaa = " (?) "; ref = "Not yet written."; } printItem(key,s,aaa,ref); } sm1(" (cat standard-1.texi) system "); } def printItem(key,s,aaa,ref) { local desc,example; desc = splitExample(s); Println("/*&en "); Print("@c "); Print(" ------------- start of "); Print(key); Println(" --------------"); Println("@menu"); Print("* "); Print(key); Println("::"); Println("@end menu"); Print("@node "); Print(key); Println(",,, STANDARD function"); Print("@subsection @code{"); Print(key); Println("}"); Print("@findex "); Println(key); Println("@table @t"); Print("@item "); Print(key); Println(aaa); Print(":: "); Println(desc[0]); Println("@end table"); Ln(); Println(" */"); Println("/*&en "); Println("@itemize @bullet"); Print("@item "); Println(desc[0]); Println("@end itemize"); Println(" */ "); if (Length(desc) == 2) { Println("/*&C "); Println("@example"); Println(desc[1]); Println("@end example"); Ln(); Println(" */ "); } Println("/*&C "); Println("@table @t"); Println("@item Reference"); Println(ref); Println("@end table"); Ln(); Println(" */ "); } def findKey(keys,s) { local n,m,i,j,r,k,ii,II; s = StringToAsciiArray(s); II = Length(keys); for (ii=0; ii 0) { tt = Map(tt,"AsciiToString"); tt = AddString(tt); }else{ tt = AsciiToString(10); } news = Append(news,tt); tt = [ ]; } } if (Length(tt) > 0) { tt = Map(tt,"AsciiToString"); tt = AddString(tt); news = Append(news, tt); } s = news; } n = Length(s); inExample = false; newl = AsciiToString(10); desc = " "; example = " "; i = 0; while (i