| 242 | return source |
| 243 | |
| 244 | def removeBuiltinFunctions(source): |
| 245 | lines = LineQueue() |
| 246 | def LookingForBuiltinFunctions(line): |
| 247 | if line.strip() == '/* Builtin functions */': |
| 248 | return InBuiltInFunctions |
| 249 | else: |
| 250 | lines.add(line) |
| 251 | return LookingForBuiltinFunctions |
| 252 | |
| 253 | def InBuiltInFunctions(line): |
| 254 | if line.strip() == '': |
| 255 | return LookingForBuiltinFunctions |
| 256 | else: |
| 257 | return InBuiltInFunctions |
| 258 | |
| 259 | state = LookingForBuiltinFunctions |
| 260 | for line in UStringIO(source): |
| 261 | state = state(line) |
| 262 | return lines.getValue() |
| 263 | |
| 264 | def replaceDlamch(source): |
| 265 | """Replace dlamch_ calls with appropriate macros""" |