(input, output, genfn, definition)
| 39 | out.write("#endif\n") |
| 40 | |
| 41 | def CopyWithInsertion(input, output, genfn, definition): |
| 42 | copying = 1 |
| 43 | for line in input.readlines(): |
| 44 | if copying: |
| 45 | output.write(line) |
| 46 | if Contains(line, "/* ++Autogenerated"): |
| 47 | copying = 0 |
| 48 | genfn(definition, output) |
| 49 | if Contains(line, "/* --Autogenerated"): |
| 50 | copying = 1 |
| 51 | output.write(line) |
| 52 | |
| 53 | def contents(filename): |
| 54 | f = open(filename) |
no test coverage detected