Don't reference removed files in Makefile
[python/dscho.git] / Mac / Modules / menu / menuscan.py
blobb120052c61c7fbd0105dc905d90a840889f607b7
1 # Scan <Menus.h>, generating menugen.py.
3 from scantools import Scanner
5 def main():
6 input = "Menus.h"
7 output = "menugen.py"
8 defsoutput = "Menus.py"
9 scanner = MyScanner(input, output, defsoutput)
10 scanner.scan()
11 scanner.close()
12 print "=== Done scanning and generating, now doing 'import menusupport' ==="
13 import menusupport
14 print "=== Done. It's up to you to compile Menumodule.c ==="
16 class MyScanner(Scanner):
18 def destination(self, type, name, arglist):
19 classname = "Function"
20 listname = "functions"
21 if arglist:
22 t, n, m = arglist[0]
23 if t == "MenuHandle" and m == "InMode":
24 classname = "Method"
25 listname = "methods"
26 return classname, listname
28 def makeblacklistnames(self):
29 return [
32 def makeblacklisttypes(self):
33 return [
34 'MCTableHandle',
35 'MCEntryPtr',
36 'MCTablePtr',
39 def makerepairinstructions(self):
40 return [
41 ([("Str255", "itemString", "InMode")],
42 [("*", "*", "OutMode")]),
44 ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
45 [("InBuffer", "*", "*")]),
47 ([("void", "*", "OutMode"), ("long", "*", "InMode"),
48 ("long", "*", "OutMode")],
49 [("VarVarOutBuffer", "*", "InOutMode")]),
52 if __name__ == "__main__":
53 main()