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