templine.append(line + "\n");\r
} else if (line.matches("\\*\\*\\/")) {\r
incomment = false;\r
- templine.append(line + "\n");\r
+ templine.append("\n" + line + "\n");\r
} else if (incomment) {\r
if (line.contains("Routine Description:")) {\r
description = true;\r
description = false;\r
arguments = true;\r
returns = false;\r
+ templine.append("\n");\r
} else if (line.contains("Returns:")) {\r
description = false;\r
arguments = false;\r
returns = true;\r
+ templine.append("\n");\r
} else if (description) {\r
if (line.trim().length() != 0) {\r
templine.append(" " + line.trim() + "\n");\r
templine.append(" @param " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");\r
} else if (inequation && line.trim().length() == 0) {\r
inequation = false;\r
- templine.append(line + "\n");\r
} else if (inequation && line.trim().length() != 0) {\r
templine.append("#%#%" + line + "\n");\r
} else {\r
- templine.append(" " + line.trim() + "\n");\r
+ if (line.trim().length() != 0) {\r
+ templine.append(" " + line.trim() + "\n");\r
+ }\r
}\r
} else if (returns) {\r
mtrcommentequation = ptncommentequation.matcher(line);\r
templine.append(" @retval " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");\r
} else if (inequation && line.trim().length() == 0) {\r
inequation = false;\r
- templine.append(line + "\n");\r
} else if (inequation && line.trim().length() != 0) {\r
templine.append("#%#%" + line + "\n");\r
} else {\r
- if (line.trim().length() == 0) {\r
- templine.append(" " + line.trim() + "\n");\r
- } else {\r
+ if (line.trim().length() != 0) {\r
templine.append(" @return " + line.trim() + "\n");\r
}\r
}\r
}\r
}\r
//---------------------------------------inner classes---------------------------------------//\r
- \r
+\r
+ //-------------------------------------process functions-------------------------------------//\r
private static final String addincludefile(String wholeline, String hfile) {\r
return wholeline.replaceFirst("(\\*/\\s)", "$1\n#include " + hfile + "\n");\r
}\r
mi.localmodulesources.add("R8Lib.h");\r
mi.localmodulesources.add("R8Lib.c");\r
}\r
+ //-------------------------------------process functions-------------------------------------//\r
\r
//-----------------------------------ForDoAll-----------------------------------//\r
public void run(String filepath) throws Exception {\r