- File tempdir = new File(modulepath + File.separator + "result" + File.separator);\r
- if (!tempdir.exists()) tempdir.mkdir();\r
- String[] list = new File(modulepath + File.separator + "temp").list(); //what I change is the non-local .h commented-out files\r
- for (int i = 0 ; i < list.length ; i++) {\r
- if (list[i].contains(".c")) {\r
- ui.println("\nModifying file : " + list[i]);\r
- outfile = new PrintWriter(new BufferedWriter(new FileWriter(modulepath + File.separator + "result" + File.separator + list[i])));\r
- outfile.append(sourcefilereplace(modulepath + File.separator + "temp" + File.separator + list[i]));\r
+ \r
+ Iterator<String> di = mi.localmodulesources.iterator();\r
+ while (di.hasNext()) {\r
+ inname = di.next();\r
+ if (inname.contains(".c") || inname.contains(".C")) {\r
+ if (inname.contains(".C")) {\r
+ outname = inname.replaceFirst(".C", ".c");\r
+ } else {\r
+ outname = inname;\r
+ }\r
+ ui.println("\nModifying file: " + inname);\r
+ Common.ensureDir(modulepath + File.separator + "result" + File.separator + outname);\r
+ outfile = new PrintWriter(new BufferedWriter(new FileWriter(modulepath + File.separator + "result" + File.separator + outname)));\r
+ outfile.append(sourcefilereplace(modulepath + File.separator + "temp" + File.separator + inname));\r