Bläddra i källkod

Rebase to revision 16728

git-svn-id: branches/svenbarth/classhelpers@16732 -
svenbarth 14 år sedan
förälder
incheckning
a9b64c80ad
100 ändrade filer med 2766 tillägg och 2366 borttagningar
  1. 34 7
      .gitattributes
  2. 9 9
      .gitignore
  3. 1 1
      compiler/cfileutl.pas
  4. 30 21
      compiler/dbgdwarf.pas
  5. 5 5
      compiler/defcmp.pas
  6. 1 1
      compiler/defutil.pas
  7. 2 2
      compiler/fmodule.pas
  8. 5 5
      compiler/globals.pas
  9. 3 5
      compiler/globtype.pas
  10. 13 10
      compiler/htypechk.pas
  11. 2 2
      compiler/msg/errord.msg
  12. 2 2
      compiler/msg/errordu.msg
  13. 18 3
      compiler/msg/errore.msg
  14. 9 3
      compiler/msgidx.inc
  15. 318 308
      compiler/msgtxt.inc
  16. 14 10
      compiler/nadd.pas
  17. 3 4
      compiler/ncal.pas
  18. 8 14
      compiler/ncgadd.pas
  19. 2 2
      compiler/ncgmem.pas
  20. 1 0
      compiler/ncgrtti.pas
  21. 76 0
      compiler/nmat.pas
  22. 8 7
      compiler/nmem.pas
  23. 4 4
      compiler/nobj.pas
  24. 2 0
      compiler/node.pas
  25. 3 3
      compiler/nutils.pas
  26. 1 0
      compiler/options.pas
  27. 3 7
      compiler/parser.pas
  28. 1 0
      compiler/pass_2.pas
  29. 70 107
      compiler/pdecl.pas
  30. 200 163
      compiler/pdecobj.pas
  31. 132 49
      compiler/pdecsub.pas
  32. 26 22
      compiler/pdecvar.pas
  33. 13 10
      compiler/pexpr.pas
  34. 2 0
      compiler/powerpc/nppcmat.pas
  35. 2 0
      compiler/powerpc64/nppcmat.pas
  36. 1 1
      compiler/ppu.pas
  37. 2 2
      compiler/pstatmnt.pas
  38. 18 18
      compiler/psub.pas
  39. 1 0
      compiler/psystem.pas
  40. 2 2
      compiler/ptconst.pas
  41. 266 128
      compiler/ptype.pas
  42. 2 2
      compiler/rautils.pas
  43. 6 0
      compiler/scandir.pas
  44. 33 17
      compiler/scanner.pas
  45. 18 10
      compiler/symconst.pas
  46. 47 39
      compiler/symdef.pas
  47. 70 19
      compiler/symtable.pas
  48. 1 0
      compiler/symtype.pas
  49. 17 12
      compiler/utils/ppudump.pp
  50. 6 6
      compiler/utils/samplecfg
  51. 6 0
      compiler/x86/aasmcpu.pas
  52. 3 8
      compiler/x86/cgx86.pas
  53. 5 0
      ide/fpdebug.pas
  54. 15 9
      installer/install.pas
  55. 211 211
      packages/cocoaint/src/AnonClassDefinitionsCoredata.pas
  56. 409 409
      packages/cocoaint/src/AnonClassDefinitionsQuartzcore.pas
  57. 329 329
      packages/cocoaint/src/AnonClassDefinitionsWebkit.pas
  58. 11 13
      packages/cocoaint/src/appkit/NSATSTypesetter.inc
  59. 5 5
      packages/cocoaint/src/appkit/NSAccessibility.inc
  60. 3 5
      packages/cocoaint/src/appkit/NSActionCell.inc
  61. 5 7
      packages/cocoaint/src/appkit/NSAffineTransform.inc
  62. 5 7
      packages/cocoaint/src/appkit/NSAlert.inc
  63. 9 13
      packages/cocoaint/src/appkit/NSAnimation.inc
  64. 3 5
      packages/cocoaint/src/appkit/NSAnimationContext.inc
  65. 3 3
      packages/cocoaint/src/appkit/NSAppleScriptExtensions.inc
  66. 21 23
      packages/cocoaint/src/appkit/NSApplication.inc
  67. 5 5
      packages/cocoaint/src/appkit/NSApplicationScripting.inc
  68. 3 5
      packages/cocoaint/src/appkit/NSArrayController.inc
  69. 15 19
      packages/cocoaint/src/appkit/NSAttributedString.inc
  70. 5 7
      packages/cocoaint/src/appkit/NSBezierPath.inc
  71. 5 7
      packages/cocoaint/src/appkit/NSBitmapImageRep.inc
  72. 7 9
      packages/cocoaint/src/appkit/NSBox.inc
  73. 7 9
      packages/cocoaint/src/appkit/NSBrowser.inc
  74. 3 5
      packages/cocoaint/src/appkit/NSBrowserCell.inc
  75. 15 17
      packages/cocoaint/src/appkit/NSButton.inc
  76. 13 15
      packages/cocoaint/src/appkit/NSButtonCell.inc
  77. 5 7
      packages/cocoaint/src/appkit/NSCIImageRep.inc
  78. 3 5
      packages/cocoaint/src/appkit/NSCachedImageRep.inc
  79. 17 19
      packages/cocoaint/src/appkit/NSCell.inc
  80. 5 7
      packages/cocoaint/src/appkit/NSClipView.inc
  81. 7 11
      packages/cocoaint/src/appkit/NSCollectionView.inc
  82. 9 11
      packages/cocoaint/src/appkit/NSColor.inc
  83. 3 5
      packages/cocoaint/src/appkit/NSColorList.inc
  84. 7 9
      packages/cocoaint/src/appkit/NSColorPanel.inc
  85. 3 5
      packages/cocoaint/src/appkit/NSColorPicker.inc
  86. 5 5
      packages/cocoaint/src/appkit/NSColorPicking.inc
  87. 3 5
      packages/cocoaint/src/appkit/NSColorSpace.inc
  88. 3 5
      packages/cocoaint/src/appkit/NSColorWell.inc
  89. 7 9
      packages/cocoaint/src/appkit/NSComboBox.inc
  90. 5 6
      packages/cocoaint/src/appkit/NSComboBoxCell.inc
  91. 13 15
      packages/cocoaint/src/appkit/NSControl.inc
  92. 3 5
      packages/cocoaint/src/appkit/NSController.inc
  93. 3 5
      packages/cocoaint/src/appkit/NSCursor.inc
  94. 3 5
      packages/cocoaint/src/appkit/NSCustomImageRep.inc
  95. 3 5
      packages/cocoaint/src/appkit/NSDatePicker.inc
  96. 5 7
      packages/cocoaint/src/appkit/NSDatePickerCell.inc
  97. 5 7
      packages/cocoaint/src/appkit/NSDictionaryController.inc
  98. 5 7
      packages/cocoaint/src/appkit/NSDockTile.inc
  99. 5 7
      packages/cocoaint/src/appkit/NSDocument.inc
  100. 5 7
      packages/cocoaint/src/appkit/NSDocumentController.inc

+ 34 - 7
.gitattributes

@@ -1343,8 +1343,6 @@ packages/cocoaint/src/foundation/NSXMLNodeOptions.inc svneol=native#text/plain
 packages/cocoaint/src/foundation/NSXMLParser.inc svneol=native#text/plain
 packages/cocoaint/src/foundation/NSXMLParser.inc svneol=native#text/plain
 packages/cocoaint/src/foundation/NSZone.inc svneol=native#text/plain
 packages/cocoaint/src/foundation/NSZone.inc svneol=native#text/plain
 packages/cocoaint/src/iPhoneAll.pas svneol=native#text/plain
 packages/cocoaint/src/iPhoneAll.pas svneol=native#text/plain
-packages/cocoaint/src/patches/NSBundle.patch svneol=native#text/plain
-packages/cocoaint/src/patches/NSObjCRuntime.patch svneol=native#text/plain
 packages/cocoaint/src/quartzcore/AnonIncludeClassDefinitionsQuartzcore.inc svneol=native#text/plain
 packages/cocoaint/src/quartzcore/AnonIncludeClassDefinitionsQuartzcore.inc svneol=native#text/plain
 packages/cocoaint/src/quartzcore/CAAnimation.inc svneol=native#text/plain
 packages/cocoaint/src/quartzcore/CAAnimation.inc svneol=native#text/plain
 packages/cocoaint/src/quartzcore/CABase.inc svneol=native#text/plain
 packages/cocoaint/src/quartzcore/CABase.inc svneol=native#text/plain
@@ -1559,6 +1557,8 @@ packages/cocoaint/src/webkit/WebView.inc svneol=native#text/plain
 packages/cocoaint/utils/Make[!!-~]Cocoa[!!-~]Headers.txt svneol=native#text/plain
 packages/cocoaint/utils/Make[!!-~]Cocoa[!!-~]Headers.txt svneol=native#text/plain
 packages/cocoaint/utils/Make[!!-~]iPhone[!!-~]Headers.txt svneol=native#text/plain
 packages/cocoaint/utils/Make[!!-~]iPhone[!!-~]Headers.txt svneol=native#text/plain
 packages/cocoaint/utils/Using[!!-~]Installer[!!-~]Script.txt svneol=native#text/plain
 packages/cocoaint/utils/Using[!!-~]Installer[!!-~]Script.txt svneol=native#text/plain
+packages/cocoaint/utils/cocoa-skel/patches/NSBundle.patch svneol=native#text/plain
+packages/cocoaint/utils/cocoa-skel/patches/NSObjCRuntime.patch svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/CocoaAll.pas svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/CocoaAll.pas svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/CoreData.pas svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/CoreData.pas svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/InlineFunctions.inc svneol=native#text/plain
 packages/cocoaint/utils/cocoa-skel/src/InlineFunctions.inc svneol=native#text/plain
@@ -1578,8 +1578,9 @@ packages/cocoaint/utils/make-ios-headers.sh svneol=native#text/plain
 packages/cocoaint/utils/parser.php svneol=native#text/plain
 packages/cocoaint/utils/parser.php svneol=native#text/plain
 packages/cocoaint/utils/patches/cocoa-coredata-webkit.patch svneol=native#text/plain
 packages/cocoaint/utils/patches/cocoa-coredata-webkit.patch svneol=native#text/plain
 packages/cocoaint/utils/patches/uikit.patch svneol=native#text/plain
 packages/cocoaint/utils/patches/uikit.patch svneol=native#text/plain
-packages/cocoaint/utils/source/objp_parser.php svneol=native#text/plain
-packages/cocoaint/utils/source/pascocoa_parser.php svneol=native#text/plain
+packages/cocoaint/utils/source/objp.php svneol=native#text/plain
+packages/cocoaint/utils/source/objp_base.php svneol=native#text/plain
+packages/cocoaint/utils/source/utilities.php svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/InlineFunctions.inc svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/InlineFunctions.inc svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/UndefinedTypes.inc svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/UndefinedTypes.inc svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/foundation/Foundation.inc svneol=native#text/plain
 packages/cocoaint/utils/uikit-skel/src/foundation/Foundation.inc svneol=native#text/plain
@@ -2111,6 +2112,7 @@ packages/fcl-json/Makefile.fpc svneol=native#text/plain
 packages/fcl-json/examples/confdemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/confdemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/confdemo.pp svneol=native#text/plain
 packages/fcl-json/examples/confdemo.pp svneol=native#text/plain
 packages/fcl-json/examples/demoformat.pp svneol=native#text/plain
 packages/fcl-json/examples/demoformat.pp svneol=native#text/plain
+packages/fcl-json/examples/demortti.pp svneol=native#text/plain
 packages/fcl-json/examples/parsedemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/parsedemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/parsedemo.pp svneol=native#text/plain
 packages/fcl-json/examples/parsedemo.pp svneol=native#text/plain
 packages/fcl-json/examples/simpledemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/simpledemo.lpi svneol=native#text/plain
@@ -2118,6 +2120,7 @@ packages/fcl-json/examples/simpledemo.pp svneol=native#text/plain
 packages/fcl-json/fpmake.pp svneol=native#text/plain
 packages/fcl-json/fpmake.pp svneol=native#text/plain
 packages/fcl-json/src/README.txt svneol=native#text/plain
 packages/fcl-json/src/README.txt svneol=native#text/plain
 packages/fcl-json/src/fpjson.pp svneol=native#text/plain
 packages/fcl-json/src/fpjson.pp svneol=native#text/plain
+packages/fcl-json/src/fpjsonrtti.pp svneol=native#text/plain
 packages/fcl-json/src/jsonconf.pp svneol=native#text/plain
 packages/fcl-json/src/jsonconf.pp svneol=native#text/plain
 packages/fcl-json/src/jsonparser.pp svneol=native#text/plain
 packages/fcl-json/src/jsonparser.pp svneol=native#text/plain
 packages/fcl-json/src/jsonscanner.pp svneol=native#text/plain
 packages/fcl-json/src/jsonscanner.pp svneol=native#text/plain
@@ -2128,6 +2131,7 @@ packages/fcl-json/tests/testjsonconf.lpi svneol=native#text/plain
 packages/fcl-json/tests/testjsonconf.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsonconf.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsondata.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsondata.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsonparser.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsonparser.pp svneol=native#text/plain
+packages/fcl-json/tests/testjsonrtti.pp svneol=native#text/plain
 packages/fcl-net/Makefile svneol=native#text/plain
 packages/fcl-net/Makefile svneol=native#text/plain
 packages/fcl-net/Makefile.fpc svneol=native#text/plain
 packages/fcl-net/Makefile.fpc svneol=native#text/plain
 packages/fcl-net/README.txt svneol=native#text/plain
 packages/fcl-net/README.txt svneol=native#text/plain
@@ -7316,6 +7320,7 @@ rtl/openbsd/Makefile svneol=native#text/plain
 rtl/openbsd/Makefile.fpc svneol=native#text/plain
 rtl/openbsd/Makefile.fpc svneol=native#text/plain
 rtl/openbsd/classes.pp svneol=native#text/plain
 rtl/openbsd/classes.pp svneol=native#text/plain
 rtl/openbsd/errno.inc svneol=native#text/plain
 rtl/openbsd/errno.inc svneol=native#text/plain
+rtl/openbsd/errnostr.inc svneol=native#text/plain
 rtl/openbsd/i386/cprt0.as svneol=native#text/plain
 rtl/openbsd/i386/cprt0.as svneol=native#text/plain
 rtl/openbsd/i386/prt0.as svneol=native#text/plain
 rtl/openbsd/i386/prt0.as svneol=native#text/plain
 rtl/openbsd/i386/sighnd.inc svneol=native#text/plain
 rtl/openbsd/i386/sighnd.inc svneol=native#text/plain
@@ -7890,7 +7895,6 @@ tests/tbf/tb0066.pp svneol=native#text/plain
 tests/tbf/tb0067.pp svneol=native#text/plain
 tests/tbf/tb0067.pp svneol=native#text/plain
 tests/tbf/tb0068.pp svneol=native#text/plain
 tests/tbf/tb0068.pp svneol=native#text/plain
 tests/tbf/tb0069.pp svneol=native#text/plain
 tests/tbf/tb0069.pp svneol=native#text/plain
-tests/tbf/tb0070.pp svneol=native#text/plain
 tests/tbf/tb0071.pp svneol=native#text/plain
 tests/tbf/tb0071.pp svneol=native#text/plain
 tests/tbf/tb0072.pp svneol=native#text/plain
 tests/tbf/tb0072.pp svneol=native#text/plain
 tests/tbf/tb0073.pp svneol=native#text/plain
 tests/tbf/tb0073.pp svneol=native#text/plain
@@ -8009,7 +8013,6 @@ tests/tbf/tb0184.pp svneol=native#text/plain
 tests/tbf/tb0185.pp svneol=native#text/plain
 tests/tbf/tb0185.pp svneol=native#text/plain
 tests/tbf/tb0186.pp svneol=native#text/plain
 tests/tbf/tb0186.pp svneol=native#text/plain
 tests/tbf/tb0187.pp svneol=native#text/plain
 tests/tbf/tb0187.pp svneol=native#text/plain
-tests/tbf/tb0188.pp svneol=native#text/plain
 tests/tbf/tb0189.pp svneol=native#text/plain
 tests/tbf/tb0189.pp svneol=native#text/plain
 tests/tbf/tb0190.pp svneol=native#text/plain
 tests/tbf/tb0190.pp svneol=native#text/plain
 tests/tbf/tb0191.pp svneol=native#text/plain
 tests/tbf/tb0191.pp svneol=native#text/plain
@@ -8123,6 +8126,7 @@ tests/tbs/tb0066.pp svneol=native#text/plain
 tests/tbs/tb0067.pp svneol=native#text/plain
 tests/tbs/tb0067.pp svneol=native#text/plain
 tests/tbs/tb0068.pp svneol=native#text/plain
 tests/tbs/tb0068.pp svneol=native#text/plain
 tests/tbs/tb0069.pp svneol=native#text/plain
 tests/tbs/tb0069.pp svneol=native#text/plain
+tests/tbs/tb0070.pp svneol=native#text/plain
 tests/tbs/tb0071.pp svneol=native#text/plain
 tests/tbs/tb0071.pp svneol=native#text/plain
 tests/tbs/tb0072.pp svneol=native#text/plain
 tests/tbs/tb0072.pp svneol=native#text/plain
 tests/tbs/tb0073.pp svneol=native#text/plain
 tests/tbs/tb0073.pp svneol=native#text/plain
@@ -8238,6 +8242,7 @@ tests/tbs/tb0185.pp svneol=native#text/plain
 tests/tbs/tb0186.pp svneol=native#text/plain
 tests/tbs/tb0186.pp svneol=native#text/plain
 tests/tbs/tb0187.pp svneol=native#text/plain
 tests/tbs/tb0187.pp svneol=native#text/plain
 tests/tbs/tb0188.pp svneol=native#text/plain
 tests/tbs/tb0188.pp svneol=native#text/plain
+tests/tbs/tb0188a.pp svneol=native#text/plain
 tests/tbs/tb0189.pp svneol=native#text/plain
 tests/tbs/tb0189.pp svneol=native#text/plain
 tests/tbs/tb0190.pp svneol=native#text/plain
 tests/tbs/tb0190.pp svneol=native#text/plain
 tests/tbs/tb0191.pp svneol=native#text/plain
 tests/tbs/tb0191.pp svneol=native#text/plain
@@ -9365,6 +9370,9 @@ tests/test/terecs3.pp svneol=native#text/pascal
 tests/test/terecs4.pp svneol=native#text/pascal
 tests/test/terecs4.pp svneol=native#text/pascal
 tests/test/terecs5.pp svneol=native#text/pascal
 tests/test/terecs5.pp svneol=native#text/pascal
 tests/test/terecs6.pp svneol=native#text/pascal
 tests/test/terecs6.pp svneol=native#text/pascal
+tests/test/terecs7.pp svneol=native#text/pascal
+tests/test/terecs8.pp svneol=native#text/pascal
+tests/test/terecs9.pp svneol=native#text/pascal
 tests/test/terecs_u1.pp svneol=native#text/pascal
 tests/test/terecs_u1.pp svneol=native#text/pascal
 tests/test/testcmem.pp svneol=native#text/plain
 tests/test/testcmem.pp svneol=native#text/plain
 tests/test/testda1.pp svneol=native#text/plain
 tests/test/testda1.pp svneol=native#text/plain
@@ -9444,7 +9452,18 @@ tests/test/tgeneric20.pp svneol=native#text/pascal
 tests/test/tgeneric21.pp svneol=native#text/pascal
 tests/test/tgeneric21.pp svneol=native#text/pascal
 tests/test/tgeneric22.pp svneol=native#text/pascal
 tests/test/tgeneric22.pp svneol=native#text/pascal
 tests/test/tgeneric23.pp svneol=native#text/pascal
 tests/test/tgeneric23.pp svneol=native#text/pascal
+tests/test/tgeneric24.pp svneol=native#text/pascal
+tests/test/tgeneric25.pp svneol=native#text/pascal
+tests/test/tgeneric26.pp svneol=native#text/pascal
+tests/test/tgeneric27.pp svneol=native#text/pascal
+tests/test/tgeneric28.pp svneol=native#text/pascal
+tests/test/tgeneric29.pp svneol=native#text/pascal
 tests/test/tgeneric3.pp svneol=native#text/plain
 tests/test/tgeneric3.pp svneol=native#text/plain
+tests/test/tgeneric30.pp svneol=native#text/pascal
+tests/test/tgeneric31.pp svneol=native#text/pascal
+tests/test/tgeneric32.pp svneol=native#text/pascal
+tests/test/tgeneric33.pp svneol=native#text/pascal
+tests/test/tgeneric34.pp svneol=native#text/pascal
 tests/test/tgeneric4.pp svneol=native#text/plain
 tests/test/tgeneric4.pp svneol=native#text/plain
 tests/test/tgeneric5.pp svneol=native#text/plain
 tests/test/tgeneric5.pp svneol=native#text/plain
 tests/test/tgeneric6.pp svneol=native#text/plain
 tests/test/tgeneric6.pp svneol=native#text/plain
@@ -9674,6 +9693,9 @@ tests/test/tparray7.pp svneol=native#text/plain
 tests/test/tparray8.pp svneol=native#text/plain
 tests/test/tparray8.pp svneol=native#text/plain
 tests/test/tparray9.pp svneol=native#text/plain
 tests/test/tparray9.pp svneol=native#text/plain
 tests/test/tpftch1.pp svneol=native#text/plain
 tests/test/tpftch1.pp svneol=native#text/plain
+tests/test/tpointermath1.pp svneol=native#text/pascal
+tests/test/tpointermath2.pp svneol=native#text/pascal
+tests/test/tpointermath3.pp svneol=native#text/pascal
 tests/test/tpoll.pp svneol=native#text/plain
 tests/test/tpoll.pp svneol=native#text/plain
 tests/test/tprec1.pp svneol=native#text/plain
 tests/test/tprec1.pp svneol=native#text/plain
 tests/test/tprec10.pp svneol=native#text/plain
 tests/test/tprec10.pp svneol=native#text/plain
@@ -9997,6 +10019,7 @@ tests/test/uobjc30c.pp svneol=native#text/plain
 tests/test/uobjc35d.pp svneol=native#text/plain
 tests/test/uobjc35d.pp svneol=native#text/plain
 tests/test/uobjc35e.pp svneol=native#text/plain
 tests/test/uobjc35e.pp svneol=native#text/plain
 tests/test/uobjc35f.pp svneol=native#text/plain
 tests/test/uobjc35f.pp svneol=native#text/plain
+tests/test/uobjc35g.pp svneol=native#text/plain
 tests/test/uobjc7.pp svneol=native#text/plain
 tests/test/uobjc7.pp svneol=native#text/plain
 tests/test/uobjcl1.pp svneol=native#text/plain
 tests/test/uobjcl1.pp svneol=native#text/plain
 tests/test/uprec6.pp svneol=native#text/plain
 tests/test/uprec6.pp svneol=native#text/plain
@@ -10362,6 +10385,7 @@ tests/webtbf/tw9225.pp svneol=native#text/plain
 tests/webtbf/tw9306c.pp svneol=native#text/plain
 tests/webtbf/tw9306c.pp svneol=native#text/plain
 tests/webtbf/tw9499.pp svneol=native#text/plain
 tests/webtbf/tw9499.pp svneol=native#text/plain
 tests/webtbf/tw9499a.pp svneol=native#text/plain
 tests/webtbf/tw9499a.pp svneol=native#text/plain
+tests/webtbf/tw9509.pp svneol=native#text/plain
 tests/webtbf/tw9522.pp svneol=native#text/plain
 tests/webtbf/tw9522.pp svneol=native#text/plain
 tests/webtbf/tw9522a.pp svneol=native#text/plain
 tests/webtbf/tw9522a.pp svneol=native#text/plain
 tests/webtbf/tw9522b.pp svneol=native#text/plain
 tests/webtbf/tw9522b.pp svneol=native#text/plain
@@ -11771,7 +11795,6 @@ tests/webtbs/tw9419.pp svneol=native#text/plain
 tests/webtbs/tw9450.pp svneol=native#text/plain
 tests/webtbs/tw9450.pp svneol=native#text/plain
 tests/webtbs/tw9450a.pp svneol=native#text/plain
 tests/webtbs/tw9450a.pp svneol=native#text/plain
 tests/webtbs/tw9461.pp svneol=native#text/plain
 tests/webtbs/tw9461.pp svneol=native#text/plain
-tests/webtbs/tw9509.pp svneol=native#text/plain
 tests/webtbs/tw9551a.pp svneol=native#text/plain
 tests/webtbs/tw9551a.pp svneol=native#text/plain
 tests/webtbs/tw9601.pp svneol=native#text/plain
 tests/webtbs/tw9601.pp svneol=native#text/plain
 tests/webtbs/tw9667.pp svneol=native#text/plain
 tests/webtbs/tw9667.pp svneol=native#text/plain
@@ -11995,6 +12018,8 @@ utils/fpdoc/fpde/xpms.pp svneol=native#text/plain
 utils/fpdoc/fpdoc.css -text
 utils/fpdoc/fpdoc.css -text
 utils/fpdoc/fpdoc.lpi svneol=native#text/plain
 utils/fpdoc/fpdoc.lpi svneol=native#text/plain
 utils/fpdoc/fpdoc.pp svneol=native#text/plain
 utils/fpdoc/fpdoc.pp svneol=native#text/plain
+utils/fpdoc/fpdocproj.pas svneol=native#text/plain
+utils/fpdoc/fpdocxmlopts.pas svneol=native#text/plain
 utils/fpdoc/intl/Makefile svneol=native#text/plain
 utils/fpdoc/intl/Makefile svneol=native#text/plain
 utils/fpdoc/intl/dglobals.de.po svneol=native#text/plain
 utils/fpdoc/intl/dglobals.de.po svneol=native#text/plain
 utils/fpdoc/intl/dglobals.sk.po svneol=native#text/plain
 utils/fpdoc/intl/dglobals.sk.po svneol=native#text/plain
@@ -12005,6 +12030,7 @@ utils/fpdoc/intl/fpdocstr.de.po svneol=native#text/plain
 utils/fpdoc/intl/makeskel.de.po svneol=native#text/plain
 utils/fpdoc/intl/makeskel.de.po svneol=native#text/plain
 utils/fpdoc/makeskel.lpi svneol=native#text/plain
 utils/fpdoc/makeskel.lpi svneol=native#text/plain
 utils/fpdoc/makeskel.pp svneol=native#text/plain
 utils/fpdoc/makeskel.pp svneol=native#text/plain
+utils/fpdoc/sample-project.xml svneol=native#text/plain
 utils/fpdoc/sh_pas.pp svneol=native#text/plain
 utils/fpdoc/sh_pas.pp svneol=native#text/plain
 utils/fpdoc/testunit.pp svneol=native#text/plain
 utils/fpdoc/testunit.pp svneol=native#text/plain
 utils/fpdoc/testunit.xml svneol=native#text/plain
 utils/fpdoc/testunit.xml svneol=native#text/plain
@@ -12124,6 +12150,7 @@ utils/ppdep.pp svneol=native#text/plain
 utils/ptop.pp svneol=native#text/plain
 utils/ptop.pp svneol=native#text/plain
 utils/ptopu.pp svneol=native#text/plain
 utils/ptopu.pp svneol=native#text/plain
 utils/rmcvsdir.pp svneol=native#text/plain
 utils/rmcvsdir.pp svneol=native#text/plain
+utils/rmwait/Makefile svneol=native#text/plain
 utils/rmwait/Makefile.fpc svneol=native#text/plain
 utils/rmwait/Makefile.fpc svneol=native#text/plain
 utils/rmwait/rmwait.pas svneol=native#text/plain
 utils/rmwait/rmwait.pas svneol=native#text/plain
 utils/rstconv.pp svneol=native#text/plain
 utils/rstconv.pp svneol=native#text/plain

+ 9 - 9
.gitignore

@@ -658,15 +658,6 @@ packages/cocoaint/src/foundation/build-stamp.*
 packages/cocoaint/src/foundation/fpcmade.*
 packages/cocoaint/src/foundation/fpcmade.*
 packages/cocoaint/src/foundation/units
 packages/cocoaint/src/foundation/units
 packages/cocoaint/src/fpcmade.*
 packages/cocoaint/src/fpcmade.*
-packages/cocoaint/src/patches/*.bak
-packages/cocoaint/src/patches/*.exe
-packages/cocoaint/src/patches/*.o
-packages/cocoaint/src/patches/*.ppu
-packages/cocoaint/src/patches/*.s
-packages/cocoaint/src/patches/Package.fpc
-packages/cocoaint/src/patches/build-stamp.*
-packages/cocoaint/src/patches/fpcmade.*
-packages/cocoaint/src/patches/units
 packages/cocoaint/src/uikit/*.bak
 packages/cocoaint/src/uikit/*.bak
 packages/cocoaint/src/uikit/*.exe
 packages/cocoaint/src/uikit/*.exe
 packages/cocoaint/src/uikit/*.o
 packages/cocoaint/src/uikit/*.o
@@ -694,6 +685,15 @@ packages/cocoaint/utils/*.ppu
 packages/cocoaint/utils/*.s
 packages/cocoaint/utils/*.s
 packages/cocoaint/utils/Package.fpc
 packages/cocoaint/utils/Package.fpc
 packages/cocoaint/utils/build-stamp.*
 packages/cocoaint/utils/build-stamp.*
+packages/cocoaint/utils/cocoa-skel/patches/*.bak
+packages/cocoaint/utils/cocoa-skel/patches/*.exe
+packages/cocoaint/utils/cocoa-skel/patches/*.o
+packages/cocoaint/utils/cocoa-skel/patches/*.ppu
+packages/cocoaint/utils/cocoa-skel/patches/*.s
+packages/cocoaint/utils/cocoa-skel/patches/Package.fpc
+packages/cocoaint/utils/cocoa-skel/patches/build-stamp.*
+packages/cocoaint/utils/cocoa-skel/patches/fpcmade.*
+packages/cocoaint/utils/cocoa-skel/patches/units
 packages/cocoaint/utils/fpcmade.*
 packages/cocoaint/utils/fpcmade.*
 packages/cocoaint/utils/units
 packages/cocoaint/utils/units
 packages/dbus/*.bak
 packages/dbus/*.bak

+ 1 - 1
compiler/cfileutl.pas

@@ -1238,7 +1238,7 @@ end;
        Path : TCmdStr;
        Path : TCmdStr;
        found : boolean;
        found : boolean;
      begin
      begin
-       found:=FindFile(FixFileName(ChangeFileExt(bin,source_info.exeext)),'.;'+exepath,allowcache,foundfile);
+       found:=FindFile(FixFileName(ChangeFileExt(bin,source_info.exeext)),exepath,allowcache,foundfile);
        if not found then
        if not found then
         begin
         begin
 {$ifdef macos}
 {$ifdef macos}

+ 30 - 21
compiler/dbgdwarf.pas

@@ -941,7 +941,7 @@ implementation
                           on when the typecast is changed to 'as' }
                           on when the typecast is changed to 'as' }
                         current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_lab)));
                         current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_lab)));
                         current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
                         current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
-                        if is_class_or_interface_or_dispinterface_or_objc(def) then
+                        if is_implicit_pointer_object_type(def) then
                           current_asmdata.getdatalabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
                           current_asmdata.getdatalabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
                       end;
                       end;
                   end;
                   end;
@@ -953,7 +953,7 @@ implementation
                 { addrlabel instead of datalabel because it must be a local one }
                 { addrlabel instead of datalabel because it must be a local one }
                 current_asmdata.getaddrlabel(TAsmLabel(pointer(def.dwarf_lab)));
                 current_asmdata.getaddrlabel(TAsmLabel(pointer(def.dwarf_lab)));
                 current_asmdata.getaddrlabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
                 current_asmdata.getaddrlabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
-                if is_class_or_interface_or_dispinterface_or_objc(def) then
+                if is_implicit_pointer_object_type(def) then
                   current_asmdata.getaddrlabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
                   current_asmdata.getaddrlabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
               end;
               end;
             if def.dbg_state=dbg_state_used then
             if def.dbg_state=dbg_state_used then
@@ -2310,6 +2310,20 @@ implementation
                         templist.concat(tai_const.create_8bit(ord(DW_OP_breg0)+dreg));
                         templist.concat(tai_const.create_8bit(ord(DW_OP_breg0)+dreg));
                         templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
                         templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
                         blocksize:=1+Lengthsleb128(sym.localloc.reference.offset);
                         blocksize:=1+Lengthsleb128(sym.localloc.reference.offset);
+{$ifndef gdb_supports_DW_AT_variable_parameter}
+                        { Parameters which are passed by reference. (var and the like)
+                          Hide the reference-pointer and dereference the pointer
+                          in the DW_AT_location block.
+                        }
+                        if (sym.typ=paravarsym) and
+                            paramanager.push_addr_param(sym.varspez,sym.vardef,tprocdef(sym.owner.defowner).proccalloption) and
+                            not(vo_has_local_copy in sym.varoptions) and
+                            not is_open_string(sym.vardef) then
+                          begin
+                            templist.concat(tai_const.create_8bit(ord(DW_OP_deref)));
+                            inc(blocksize);
+                          end
+{$endif not gdb_supports_DW_AT_variable_parameter}
                       end;
                       end;
                   end
                   end
                 else
                 else
@@ -2396,15 +2410,7 @@ implementation
           that).  }
           that).  }
         if (vo_is_self in sym.varoptions) then
         if (vo_is_self in sym.varoptions) then
           append_attribute(DW_AT_artificial,DW_FORM_flag,[true]);
           append_attribute(DW_AT_artificial,DW_FORM_flag,[true]);
-{$ifndef gdb_supports_DW_AT_variable_parameter}
-        if (sym.typ=paravarsym) and
-            paramanager.push_addr_param(sym.varspez,sym.vardef,tprocdef(sym.owner.defowner).proccalloption) and
-            not(vo_has_local_copy in sym.varoptions) and
-            not is_open_string(sym.vardef) then
-          append_labelentry_ref(DW_AT_type,def_dwarf_ref_lab(def))
-        else
-{$endif not gdb_supports_DW_AT_variable_parameter}
-          append_labelentry_ref(DW_AT_type,def_dwarf_lab(def));
+        append_labelentry_ref(DW_AT_type,def_dwarf_lab(def));
 
 
         templist.free;
         templist.free;
 
 
@@ -3419,7 +3425,7 @@ implementation
               current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_uleb128bit(0));
               current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_uleb128bit(0));
               if (def.childof.dbg_state=dbg_state_unused) then
               if (def.childof.dbg_state=dbg_state_unused) then
                 def.childof.dbg_state:=dbg_state_used;
                 def.childof.dbg_state:=dbg_state_used;
-              if is_class_or_interface_or_dispinterface_or_objc(def) then
+              if is_implicit_pointer_object_type(def) then
                 append_labelentry_ref(DW_AT_type,def_dwarf_class_struct_lab(def.childof))
                 append_labelentry_ref(DW_AT_type,def_dwarf_class_struct_lab(def.childof))
               else
               else
                 append_labelentry_ref(DW_AT_type,def_dwarf_lab(def.childof));
                 append_labelentry_ref(DW_AT_type,def_dwarf_lab(def.childof));
@@ -3801,13 +3807,20 @@ implementation
         begin
         begin
           if assigned(def.objname) then
           if assigned(def.objname) then
             append_entry(tag,true,[
             append_entry(tag,true,[
-              DW_AT_name,DW_FORM_string,def.objrealname^+#0,
-              DW_AT_byte_size,DW_FORM_udata,def.size
+              DW_AT_name,DW_FORM_string,def.objrealname^+#0
               ])
               ])
           else
           else
-            append_entry(DW_TAG_structure_type,true,[
-              DW_AT_byte_size,DW_FORM_udata,def.size
-              ]);
+            append_entry(DW_TAG_structure_type,true,[]);
+          append_attribute(DW_AT_byte_size,DW_FORM_udata,[tobjectsymtable(def.symtable).datasize]);
+          // The pointer to the class-structure is hidden. The debug-information
+          // does not contain an implicit pointer, but the data-adress is dereferenced here.
+          // In case of a nil-pointer, report the class as being unallocated.
+          append_block1(DW_AT_allocated,2);
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_push_object_address)));
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_deref)));
+          append_block1(DW_AT_data_location,2);
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_push_object_address)));
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_deref)));
           finish_entry;
           finish_entry;
         end;
         end;
 
 
@@ -3869,10 +3882,6 @@ implementation
             end;
             end;
           odt_class:
           odt_class:
             begin
             begin
-              { not sure if the implicit pointer is needed for tag_class (MWE)}
-              {
-              doimplicitpointer;
-              }
               dostruct(DW_TAG_class_type);
               dostruct(DW_TAG_class_type);
               doparent(false);
               doparent(false);
             end;
             end;

+ 5 - 5
compiler/defcmp.pas

@@ -282,7 +282,7 @@ implementation
                  objectdef:
                  objectdef:
                    begin
                    begin
                      if (m_delphi in current_settings.modeswitches) and
                      if (m_delphi in current_settings.modeswitches) and
-                        is_class_or_interface_or_dispinterface_or_objc(def_from) and
+                        is_implicit_pointer_object_type(def_from) and
                         (cdo_explicit in cdoptions) then
                         (cdo_explicit in cdoptions) then
                       begin
                       begin
                         eq:=te_convert_l1;
                         eq:=te_convert_l1;
@@ -1131,11 +1131,11 @@ implementation
                  classrefdef,
                  classrefdef,
                  objectdef :
                  objectdef :
                    begin
                    begin
-                     { class types and class reference type
+                     { implicit pointer object and class reference types
                        can be assigned to void pointers, but it is less
                        can be assigned to void pointers, but it is less
                        preferred than assigning to a related objectdef }
                        preferred than assigning to a related objectdef }
                      if (
                      if (
-                         is_class_or_interface_or_dispinterface_or_objc(def_from) or
+                         is_implicit_pointer_object_type(def_from) or
                          (def_from.typ=classrefdef)
                          (def_from.typ=classrefdef)
                         ) and
                         ) and
                         (tpointerdef(def_to).pointeddef.typ=orddef) and
                         (tpointerdef(def_to).pointeddef.typ=orddef) and
@@ -1268,8 +1268,8 @@ implementation
                   eq:=te_convert_l1;
                   eq:=te_convert_l1;
                 end
                 end
                else
                else
-               { Class/interface specific }
-                if is_class_or_interface_or_dispinterface_or_objc(def_to) then
+               { specific to implicit pointer object types }
+                if is_implicit_pointer_object_type(def_to) then
                  begin
                  begin
                    { void pointer also for delphi mode }
                    { void pointer also for delphi mode }
                    if (m_delphi in current_settings.modeswitches) and
                    if (m_delphi in current_settings.modeswitches) and

+ 1 - 1
compiler/defutil.pas

@@ -1003,7 +1003,7 @@ implementation
             end;
             end;
           objectdef :
           objectdef :
             begin
             begin
-              if is_class_or_interface_or_dispinterface_or_objc(def) then
+              if is_implicit_pointer_object_type(def) then
                 result := OS_ADDR
                 result := OS_ADDR
               else
               else
                 result:=int_cgsize(def.size);
                 result:=int_cgsize(def.size);

+ 2 - 2
compiler/fmodule.pas

@@ -577,7 +577,7 @@ implementation
             if current_procinfo=tprocinfo(procinfo) then
             if current_procinfo=tprocinfo(procinfo) then
               begin
               begin
                 current_procinfo:=nil;
                 current_procinfo:=nil;
-                current_objectdef:=nil;
+                current_structdef:=nil;
                 current_genericdef:=nil;
                 current_genericdef:=nil;
                 current_specializedef:=nil;
                 current_specializedef:=nil;
               end;
               end;
@@ -659,7 +659,7 @@ implementation
             if current_procinfo=tprocinfo(procinfo) then
             if current_procinfo=tprocinfo(procinfo) then
               begin
               begin
                 current_procinfo:=nil;
                 current_procinfo:=nil;
-                current_objectdef:=nil;
+                current_structdef:=nil;
                 current_genericdef:=nil;
                 current_genericdef:=nil;
                 current_specializedef:=nil;
                 current_specializedef:=nil;
               end;
               end;

+ 5 - 5
compiler/globals.pas

@@ -51,15 +51,15 @@ interface
        delphimodeswitches =
        delphimodeswitches =
          [m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
          [m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
           m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
           m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
-          m_out,m_default_para,m_duplicate_names,m_hintdirective,m_add_pointer,
-          m_property,m_default_inline,m_except,m_extended_records];
+          m_out,m_default_para,m_duplicate_names,m_hintdirective,
+          m_property,m_default_inline,m_except,m_advanced_records];
        fpcmodeswitches =
        fpcmodeswitches =
          [m_fpc,m_all,m_string_pchar,m_nested_comment,m_repeat_forward,
          [m_fpc,m_all,m_string_pchar,m_nested_comment,m_repeat_forward,
-          m_cvar_support,m_initfinal,m_add_pointer,m_hintdirective,
+          m_cvar_support,m_initfinal,m_hintdirective,
           m_property,m_default_inline];
           m_property,m_default_inline];
        objfpcmodeswitches =
        objfpcmodeswitches =
          [m_objfpc,m_fpc,m_all,m_class,m_objpas,m_result,m_string_pchar,m_nested_comment,
          [m_objfpc,m_fpc,m_all,m_class,m_objpas,m_result,m_string_pchar,m_nested_comment,
-          m_repeat_forward,m_cvar_support,m_initfinal,m_add_pointer,m_out,m_default_para,m_hintdirective,
+          m_repeat_forward,m_cvar_support,m_initfinal,m_out,m_default_para,m_hintdirective,
           m_property,m_default_inline,m_except];
           m_property,m_default_inline,m_except];
        tpmodeswitches =
        tpmodeswitches =
          [m_tp7,m_all,m_tp_procvar,m_duplicate_names];
          [m_tp7,m_all,m_tp_procvar,m_duplicate_names];
@@ -350,7 +350,7 @@ interface
         );
         );
         globalswitches : [cs_check_unit_name,cs_link_static];
         globalswitches : [cs_check_unit_name,cs_link_static];
         moduleswitches : [cs_extsyntax,cs_implicit_exceptions];
         moduleswitches : [cs_extsyntax,cs_implicit_exceptions];
-        localswitches : [cs_check_io,cs_typed_const_writable];
+        localswitches : [cs_check_io,cs_typed_const_writable,cs_pointermath];
         modeswitches : fpcmodeswitches;
         modeswitches : fpcmodeswitches;
         optimizerswitches : [];
         optimizerswitches : [];
         genwpoptimizerswitches : [];
         genwpoptimizerswitches : [];

+ 3 - 5
compiler/globtype.pas

@@ -110,7 +110,7 @@ interface
          cs_mmx,cs_mmx_saturation,
          cs_mmx,cs_mmx_saturation,
          { parser }
          { parser }
          cs_typed_addresses,cs_strict_var_strings,cs_ansistrings,cs_bitpacking,
          cs_typed_addresses,cs_strict_var_strings,cs_ansistrings,cs_bitpacking,
-         cs_varpropsetter,cs_scopedenums,
+         cs_varpropsetter,cs_scopedenums,cs_pointermath,
          { macpas specific}
          { macpas specific}
          cs_external_var, cs_externally_visible
          cs_external_var, cs_externally_visible
        );
        );
@@ -261,7 +261,6 @@ interface
                                   procedure variables                     }
                                   procedure variables                     }
          m_autoderef,           { does auto dereferencing of struct. vars }
          m_autoderef,           { does auto dereferencing of struct. vars }
          m_initfinal,           { initialization/finalization for units }
          m_initfinal,           { initialization/finalization for units }
-         m_add_pointer,         { allow pointer add/sub operations }
          m_default_ansistring,  { ansistring turned on by default }
          m_default_ansistring,  { ansistring turned on by default }
          m_out,                 { support the calling convention OUT }
          m_out,                 { support the calling convention OUT }
          m_default_para,        { support default parameters }
          m_default_para,        { support default parameters }
@@ -274,7 +273,7 @@ interface
          m_objectivec2,         { support interfacing with Objective-C (2.0) }
          m_objectivec2,         { support interfacing with Objective-C (2.0) }
          m_nested_procvars,     { support nested procedural variables }
          m_nested_procvars,     { support nested procedural variables }
          m_non_local_goto,      { support non local gotos (like iso pascal) }
          m_non_local_goto,      { support non local gotos (like iso pascal) }
-         m_extended_records     { extended record syntax with visibility sections, methods and properties }
+         m_advanced_records     { advanced record syntax with visibility sections, methods and properties }
        );
        );
        tmodeswitches = set of tmodeswitch;
        tmodeswitches = set of tmodeswitch;
 
 
@@ -382,7 +381,6 @@ interface
          'POINTERTOPROCVAR',
          'POINTERTOPROCVAR',
          'AUTODEREF',
          'AUTODEREF',
          'INITFINAL',
          'INITFINAL',
-         'POINTERARITHMETICS',
          'ANSISTRINGS',
          'ANSISTRINGS',
          'OUT',
          'OUT',
          'DEFAULTPARAMETERS',
          'DEFAULTPARAMETERS',
@@ -395,7 +393,7 @@ interface
          'OBJECTIVEC2',
          'OBJECTIVEC2',
          'NESTEDPROCVARS',
          'NESTEDPROCVARS',
          'NONLOCALGOTO',
          'NONLOCALGOTO',
-         'EXTENDEDRECORDS');
+         'ADVANCEDRECORDS');
 
 
 
 
      type
      type

+ 13 - 10
compiler/htypechk.pas

@@ -229,7 +229,7 @@ implementation
             pointerdef :
             pointerdef :
               begin
               begin
                 if ((rd.typ in [orddef,enumdef,pointerdef,classrefdef,procvardef]) or
                 if ((rd.typ in [orddef,enumdef,pointerdef,classrefdef,procvardef]) or
-                    is_class_or_interface_or_dispinterface_or_objc(rd)) then
+                    is_implicit_pointer_object_type(rd)) then
                  begin
                  begin
                    allowed:=false;
                    allowed:=false;
                    exit;
                    exit;
@@ -289,9 +289,9 @@ implementation
               end;
               end;
             objectdef :
             objectdef :
               begin
               begin
-                { <> and = are defined for classes }
+                { <> and = are defined for implicit pointer object types }
                 if (treetyp in [equaln,unequaln]) and
                 if (treetyp in [equaln,unequaln]) and
-                   is_class_or_interface_or_dispinterface_or_objc(ld) then
+                   is_implicit_pointer_object_type(ld) then
                  begin
                  begin
                    allowed:=false;
                    allowed:=false;
                    exit;
                    exit;
@@ -341,7 +341,9 @@ implementation
         result:=false;
         result:=false;
         case treetyp of
         case treetyp of
           subn,
           subn,
+          addn,
           unaryminusn,
           unaryminusn,
+          unaryplusn,
           inlinen:
           inlinen:
             begin
             begin
               { only Inc, Dec inline functions are supported for now, so skip check inlinenumber }
               { only Inc, Dec inline functions are supported for now, so skip check inlinenumber }
@@ -506,6 +508,8 @@ implementation
              optoken:=_OP_NOT;
              optoken:=_OP_NOT;
            unaryminusn:
            unaryminusn:
              optoken:=_MINUS;
              optoken:=_MINUS;
+           unaryplusn:
+             optoken:=_PLUS;
            inlinen:
            inlinen:
              case inlinenumber of
              case inlinenumber of
                 in_inc_x:
                 in_inc_x:
@@ -940,7 +944,7 @@ implementation
                end;
                end;
              subscriptn :
              subscriptn :
                begin
                begin
-                 if is_class_or_interface_or_dispinterface_or_objc(tunarynode(p).left.resultdef) then
+                 if is_implicit_pointer_object_type(tunarynode(p).left.resultdef) then
                    newstate := vs_read;
                    newstate := vs_read;
                  p:=tunarynode(p).left;
                  p:=tunarynode(p).left;
                end;
                end;
@@ -1094,7 +1098,7 @@ implementation
                  pointerdef :
                  pointerdef :
                    gotpointer:=true;
                    gotpointer:=true;
                  objectdef :
                  objectdef :
-                   gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
+                   gotclass:=is_implicit_pointer_object_type(hp.resultdef);
                  recorddef :
                  recorddef :
                    gotrecord:=true;
                    gotrecord:=true;
                  classrefdef :
                  classrefdef :
@@ -1211,7 +1215,7 @@ implementation
                    pointerdef :
                    pointerdef :
                      gotpointer:=true;
                      gotpointer:=true;
                    objectdef :
                    objectdef :
-                     gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
+                     gotclass:=is_implicit_pointer_object_type(hp.resultdef);
                    classrefdef :
                    classrefdef :
                      gotclass:=true;
                      gotclass:=true;
                    arraydef :
                    arraydef :
@@ -1305,10 +1309,9 @@ implementation
                      else
                      else
                        exit;
                        exit;
                    end;
                    end;
-                 { a class/interface access is an implicit }
-                 { dereferencing                           }
+                 { implicit pointer object types result in dereferencing }
                  hp:=tsubscriptnode(hp).left;
                  hp:=tsubscriptnode(hp).left;
-                 if is_class_or_interface_or_dispinterface_or_objc(hp.resultdef) then
+                 if is_implicit_pointer_object_type(hp.resultdef) then
                    gotderef:=true;
                    gotderef:=true;
                end;
                end;
              muln,
              muln,
@@ -1397,7 +1400,7 @@ implementation
                    pointerdef :
                    pointerdef :
                      gotpointer:=true;
                      gotpointer:=true;
                    objectdef :
                    objectdef :
-                     gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
+                     gotclass:=is_implicit_pointer_object_type(hp.resultdef);
                    recorddef, { handle record like class it needs a subscription }
                    recorddef, { handle record like class it needs a subscription }
                    classrefdef :
                    classrefdef :
                      gotclass:=true;
                      gotclass:=true;

+ 2 - 2
compiler/msg/errord.msg

@@ -1117,9 +1117,9 @@ parser_e_packed_element_no_loop=03223_E_Bit packed Array-Elemente und Record-Fel
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % be packed at the bit level. For performance reasons, they cannot be
 % be packed at the bit level. For performance reasons, they cannot be
 % used as loop variables.
 % used as loop variables.
-parser_e_type_var_const_only_in_generics_and_classes=03224_E_VAR, TYPE und CONST sind nur innerhalb "generics" und Klassen erlaubt
+parser_e_type_var_const_only_in_records_and_classes=03224_E_VAR, TYPE und CONST sind nur innerhalb records, objects und Klassen erlaubt
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
-% generics and classes.
+% records, objects and classes.
 parser_e_cant_create_generics_of_this_type=03225_E_Dieser Typ kann nicht "generic" sein
 parser_e_cant_create_generics_of_this_type=03225_E_Dieser Typ kann nicht "generic" sein
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 parser_w_no_lineinfo_use_switch=03226_W_Die LINEINFO Unit nicht manuell laden. Verwende statt dessen den Compilerschalter -gl
 parser_w_no_lineinfo_use_switch=03226_W_Die LINEINFO Unit nicht manuell laden. Verwende statt dessen den Compilerschalter -gl

+ 2 - 2
compiler/msg/errordu.msg

@@ -1117,9 +1117,9 @@ parser_e_packed_element_no_loop=03223_E_Bit packed Array-Elemente und Record-Fel
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % be packed at the bit level. For performance reasons, they cannot be
 % be packed at the bit level. For performance reasons, they cannot be
 % used as loop variables.
 % used as loop variables.
-parser_e_type_var_const_only_in_generics_and_classes=03224_E_VAR, TYPE und CONST sind nur innerhalb "generics" und Klassen erlaubt
+parser_e_type_var_const_only_in_records_and_classes=03224_E_VAR, TYPE und CONST sind nur innerhalb records, objects und Klassen erlaubt
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
-% generics and classes.
+% records, objects and classes.
 parser_e_cant_create_generics_of_this_type=03225_E_Dieser Typ kann nicht "generic" sein
 parser_e_cant_create_generics_of_this_type=03225_E_Dieser Typ kann nicht "generic" sein
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 parser_w_no_lineinfo_use_switch=03226_W_Die LINEINFO Unit nicht manuell laden. Verwende statt dessen den Compilerschalter -gl
 parser_w_no_lineinfo_use_switch=03226_W_Die LINEINFO Unit nicht manuell laden. Verwende statt dessen den Compilerschalter -gl

+ 18 - 3
compiler/msg/errore.msg

@@ -368,7 +368,7 @@ scanner_w_illegal_warn_identifier=02087_W_Illegal identifier "$1" for $WARN dire
 #
 #
 # Parser
 # Parser
 #
 #
-# 03302 is the last used one
+# 03304 is the last used one
 #
 #
 % \section{Parser messages}
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
 % This section lists all parser messages. The parser takes care of the
@@ -1106,9 +1106,9 @@ parser_e_packed_element_no_loop=03223_E_Bit packed array elements and record fie
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
 % be packed at the bit level. For performance reasons, they cannot be
 % be packed at the bit level. For performance reasons, they cannot be
 % used as loop variables.
 % used as loop variables.
-parser_e_type_var_const_only_in_generics_and_classes=03224_E_VAR, TYPE and CONST are allowed only in generics and classes
+parser_e_type_var_const_only_in_records_and_classes=03224_E_VAR, TYPE and CONST are allowed only in records, objects and classes
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
 % The usage of VAR, TYPE and CONST to declare new types inside an object is allowed only inside
-% generics and classes.
+% records, objects and classes.
 parser_e_cant_create_generics_of_this_type=03225_E_This type can't be a generic
 parser_e_cant_create_generics_of_this_type=03225_E_This type can't be a generic
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 % Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
 parser_w_no_lineinfo_use_switch=03226_W_Don't load LINEINFO unit manually, Use the -gl compiler switch instead
 parser_w_no_lineinfo_use_switch=03226_W_Don't load LINEINFO unit manually, Use the -gl compiler switch instead
@@ -1360,6 +1360,12 @@ parser_e_class_methods_only_static_in_records=03301_E_Class methods must be stat
 parser_e_no_constructor_in_records=03302_E_Constructors aren't allowed in records
 parser_e_no_constructor_in_records=03302_E_Constructors aren't allowed in records
 % Constructor declarations aren't allowed in records.
 % Constructor declarations aren't allowed in records.
 % \end{description}
 % \end{description}
+parser_e_at_least_one_argument_must_be_of_type=03303_E_At least one argument must be of type "$1"
+% It is required that at least one argument be of type of structure where this method is defined.
+% For example class operators must contain at least one argument of the structure where they are defined.
+parser_e_cant_use_type_parameters_here=03304_E_Type parameters may require initialization/finalization - can't be used in variant records
+% Type parameters may be specialized with types which (e.g. \var{ansistring}) need initialization/finalization
+% code which is implicitly generated by the compiler. 
 #
 #
 # Type Checking
 # Type Checking
 #
 #
@@ -1707,6 +1713,10 @@ type_w_procvar_univ_conflicting_para=04095_W_Coerced univ parameter type in proc
 % when \var{test} returns.
 % when \var{test} returns.
 type_e_generics_cannot_reference_itself=04096_E_Type parameters of specializations of generics cannot reference the currently specialized type
 type_e_generics_cannot_reference_itself=04096_E_Type parameters of specializations of generics cannot reference the currently specialized type
 % Recursive specializations of generics like \var{Type MyType = specialize MyGeneric<MyType>;} are not possible.
 % Recursive specializations of generics like \var{Type MyType = specialize MyGeneric<MyType>;} are not possible.
+type_e_type_parameters_are_not_allowed_here=04097_E_Type parameters are not allowed on non-generic class/record/object procedure or function
+% Type parameters are only allowed for methods of generic classes, records or objects
+type_e_generic_declaration_does_not_match=04098_E_Generic declaration of "$1" differs from previous declaration
+% Generic declaration does not match the previous declaration
 %
 %
 % \end{description}
 % \end{description}
 #
 #
@@ -1951,6 +1961,11 @@ sym_e_objc_formal_class_not_resolved=05080_E_No complete definition of the forma
 % of the class to be in scope.
 % of the class to be in scope.
 sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos into initialization or finalization blocks of units are not allowed
 sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos into initialization or finalization blocks of units are not allowed
 % Gotos into initialization or finalization blockse of units are not allowed.
 % Gotos into initialization or finalization blockse of units are not allowed.
+sym_e_external_class_name_mismatch1=05082=E_Invalid external name "$1" for formal class "$2"
+sym_e_external_class_name_mismatch2=05083=E_Complete class definition with external name "$1" here
+% When a class is declared using a formal external definition, the actual external
+% definition (if any) must specify the same external name as the formal definition
+% (since both definitions refer to the same actual class type).
 %
 %
 % \end{description}
 % \end{description}
 #
 #

+ 9 - 3
compiler/msgidx.inc

@@ -313,7 +313,7 @@ const
   parser_e_packed_element_no_var_addr=03221;
   parser_e_packed_element_no_var_addr=03221;
   parser_e_packed_dynamic_open_array=03222;
   parser_e_packed_dynamic_open_array=03222;
   parser_e_packed_element_no_loop=03223;
   parser_e_packed_element_no_loop=03223;
-  parser_e_type_var_const_only_in_generics_and_classes=03224;
+  parser_e_type_var_const_only_in_records_and_classes=03224;
   parser_e_cant_create_generics_of_this_type=03225;
   parser_e_cant_create_generics_of_this_type=03225;
   parser_w_no_lineinfo_use_switch=03226;
   parser_w_no_lineinfo_use_switch=03226;
   parser_e_no_funcret_specified=03227;
   parser_e_no_funcret_specified=03227;
@@ -391,6 +391,8 @@ const
   parser_e_no_destructor_in_records=03300;
   parser_e_no_destructor_in_records=03300;
   parser_e_class_methods_only_static_in_records=03301;
   parser_e_class_methods_only_static_in_records=03301;
   parser_e_no_constructor_in_records=03302;
   parser_e_no_constructor_in_records=03302;
+  parser_e_at_least_one_argument_must_be_of_type=03303;
+  parser_e_cant_use_type_parameters_here=03304;
   type_e_mismatch=04000;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
   type_e_not_equal_types=04002;
@@ -478,6 +480,8 @@ const
   type_e_objcclass_type_expected=04094;
   type_e_objcclass_type_expected=04094;
   type_w_procvar_univ_conflicting_para=04095;
   type_w_procvar_univ_conflicting_para=04095;
   type_e_generics_cannot_reference_itself=04096;
   type_e_generics_cannot_reference_itself=04096;
+  type_e_type_parameters_are_not_allowed_here=04097;
+  type_e_generic_declaration_does_not_match=04098;
   sym_e_id_not_found=05000;
   sym_e_id_not_found=05000;
   sym_f_internal_error_in_symtablestack=05001;
   sym_f_internal_error_in_symtablestack=05001;
   sym_e_duplicate_id=05002;
   sym_e_duplicate_id=05002;
@@ -546,6 +550,8 @@ const
   sym_w_experimental_unit=05079;
   sym_w_experimental_unit=05079;
   sym_e_objc_formal_class_not_resolved=05080;
   sym_e_objc_formal_class_not_resolved=05080;
   sym_e_interprocgoto_into_init_final_code_not_allowed=05081;
   sym_e_interprocgoto_into_init_final_code_not_allowed=05081;
+  sym_e_external_class_name_mismatch1=05082;
+  sym_e_external_class_name_mismatch2=05083;
   cg_e_parasize_too_big=06009;
   cg_e_parasize_too_big=06009;
   cg_e_file_must_call_by_reference=06012;
   cg_e_file_must_call_by_reference=06012;
   cg_e_cant_use_far_pointer_there=06013;
   cg_e_cant_use_far_pointer_there=06013;
@@ -876,9 +882,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 58219;
+  MsgTxtSize = 58664;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    24,88,303,97,82,54,111,22,202,63,
+    24,88,305,99,84,54,111,22,202,63,
     49,20,1,1,1,1,1,1,1,1
     49,20,1,1,1,1,1,1,1,1
   );
   );

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 318 - 308
compiler/msgtxt.inc


+ 14 - 10
compiler/nadd.pas

@@ -1598,19 +1598,19 @@ implementation
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
           end
           end
 
 
-         { class or interface equation }
-         else if is_class_or_interface_or_dispinterface_or_objc(rd) or is_class_or_interface_or_dispinterface_or_objc(ld) then
+         { implicit pointer object type comparison }
+         else if is_implicit_pointer_object_type(rd) or is_implicit_pointer_object_type(ld) then
           begin
           begin
             if (nodetype in [equaln,unequaln]) then
             if (nodetype in [equaln,unequaln]) then
               begin
               begin
-                if is_class_or_interface_or_dispinterface_or_objc(rd) and is_class_or_interface_or_dispinterface_or_objc(ld) then
+                if is_implicit_pointer_object_type(rd) and is_implicit_pointer_object_type(ld) then
                  begin
                  begin
                    if tobjectdef(rd).is_related(tobjectdef(ld)) then
                    if tobjectdef(rd).is_related(tobjectdef(ld)) then
                     inserttypeconv(right,left.resultdef)
                     inserttypeconv(right,left.resultdef)
                    else
                    else
                     inserttypeconv(left,right.resultdef);
                     inserttypeconv(left,right.resultdef);
                  end
                  end
-                else if is_class_or_interface_or_dispinterface_or_objc(rd) then
+                else if is_implicit_pointer_object_type(rd) then
                   inserttypeconv(left,right.resultdef)
                   inserttypeconv(left,right.resultdef)
                 else
                 else
                   inserttypeconv(right,left.resultdef);
                   inserttypeconv(right,left.resultdef);
@@ -1633,8 +1633,8 @@ implementation
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
           end
           end
 
 
-         { allows comperasion with nil pointer }
-         else if is_class_or_interface_or_dispinterface_or_objc(rd) or (rd.typ=classrefdef) then
+         { allow comparison with nil pointer }
+         else if is_implicit_pointer_object_type(rd) or (rd.typ=classrefdef) then
           begin
           begin
             if (nodetype in [equaln,unequaln]) then
             if (nodetype in [equaln,unequaln]) then
               inserttypeconv(left,right.resultdef)
               inserttypeconv(left,right.resultdef)
@@ -1642,7 +1642,7 @@ implementation
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
           end
           end
 
 
-         else if is_class_or_interface_or_dispinterface_or_objc(ld) or (ld.typ=classrefdef) then
+         else if is_implicit_pointer_object_type(ld) or (ld.typ=classrefdef) then
           begin
           begin
             if (nodetype in [equaln,unequaln]) then
             if (nodetype in [equaln,unequaln]) then
               inserttypeconv(right,left.resultdef)
               inserttypeconv(right,left.resultdef)
@@ -1737,7 +1737,9 @@ implementation
             if nodetype=addn then
             if nodetype=addn then
               begin
               begin
                 if not(cs_extsyntax in current_settings.moduleswitches) or
                 if not(cs_extsyntax in current_settings.moduleswitches) or
-                   (not(is_pchar(ld)) and not(m_add_pointer in current_settings.modeswitches)) then
+                   (not (is_pchar(ld) or is_chararray(ld) or is_open_chararray(ld) or is_widechar(ld) or is_widechararray(ld) or is_open_widechararray(ld)) and
+                    not(cs_pointermath in current_settings.localswitches) and
+                    not((ld.typ=pointerdef) and tpointerdef(ld).has_pointer_math)) then
                   CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
                   CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
                 if (rd.typ=pointerdef) and
                 if (rd.typ=pointerdef) and
                    (tpointerdef(rd).pointeddef.size>1) then
                    (tpointerdef(rd).pointeddef.size>1) then
@@ -1768,7 +1770,9 @@ implementation
                  if (lt=niln) then
                  if (lt=niln) then
                    CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),'NIL',rd.typename);
                    CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),'NIL',rd.typename);
                  if not(cs_extsyntax in current_settings.moduleswitches) or
                  if not(cs_extsyntax in current_settings.moduleswitches) or
-                    (not(is_pchar(ld)) and not(m_add_pointer in current_settings.modeswitches)) then
+                   (not (is_pchar(ld) or is_chararray(ld) or is_open_chararray(ld) or is_widechar(ld) or is_widechararray(ld) or is_open_widechararray(ld)) and
+                    not(cs_pointermath in current_settings.localswitches) and
+                    not((ld.typ=pointerdef) and tpointerdef(ld).has_pointer_math)) then
                    CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
                    CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
                  if (ld.typ=pointerdef) then
                  if (ld.typ=pointerdef) then
                  begin
                  begin
@@ -2710,7 +2714,7 @@ implementation
                 expectloc:=LOC_FLAGS;
                 expectloc:=LOC_FLAGS;
            end
            end
 
 
-         else if is_class_or_interface_or_dispinterface_or_objc(ld) then
+         else if is_implicit_pointer_object_type(ld) then
             begin
             begin
               expectloc:=LOC_FLAGS;
               expectloc:=LOC_FLAGS;
             end
             end

+ 3 - 4
compiler/ncal.pas

@@ -1671,8 +1671,7 @@ implementation
             begin
             begin
               if (procdefinition.typ<>procdef) then
               if (procdefinition.typ<>procdef) then
                 internalerror(200305062);
                 internalerror(200305062);
-              if (tprocdef(procdefinition).struct.typ=objectdef) and
-                 (oo_has_vmt in tprocdef(procdefinition).struct.objectoptions) then
+              if (oo_has_vmt in tprocdef(procdefinition).struct.objectoptions) then
                 begin
                 begin
                   { we only need the vmt, loading self is not required and there is no
                   { we only need the vmt, loading self is not required and there is no
                     need to check for typen, because that will always get the
                     need to check for typen, because that will always get the
@@ -2876,8 +2875,8 @@ implementation
                  assigned(methodpointer) and
                  assigned(methodpointer) and
                  (nf_is_self in methodpointer.flags) then
                  (nf_is_self in methodpointer.flags) then
                 resultdef:=voidtype
                 resultdef:=voidtype
-            else
-              resultdef:=procdefinition.returndef;
+              else
+                resultdef:=procdefinition.returndef;
            end
            end
          else
          else
            resultdef:=typedef;
            resultdef:=typedef;

+ 8 - 14
compiler/ncgadd.pas

@@ -269,7 +269,6 @@ interface
 
 
     procedure tcgaddnode.second_addsmallset;
     procedure tcgaddnode.second_addsmallset;
       var
       var
-        tmpreg : tregister;
         cgop    : TOpCg;
         cgop    : TOpCg;
         opdone  : boolean;
         opdone  : boolean;
       begin
       begin
@@ -301,21 +300,16 @@ interface
                  end;
                  end;
               if opdone then
               if opdone then
                 begin
                 begin
+                  if (right.location.size<>left.location.size) or
+                     (location.size<>left.location.size) then
+                    internalerror(2010123001);
+                  { make sure we don't modify left/right.location, because we told
+                    force_reg_left_right above that they can be constant }
+                  cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,location.size,right.location.register,location.register);
                   if left.location.loc = LOC_CONSTANT then
                   if left.location.loc = LOC_CONSTANT then
-                    begin
-                      tmpreg := cg.getintregister(current_asmdata.CurrAsmList,location.size);
-                      cg.a_load_const_reg(current_asmdata.CurrAsmList,location.size,
-                        left.location.value,tmpreg);
-                      cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,location.size,right.location.register,right.location.register);
-                      cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_AND,location.size,right.location.register,tmpreg);
-                      cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,location.size,tmpreg,location.register);
-                    end
+                    cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_AND,location.size,left.location.value,location.register)
                   else
                   else
-                    begin
-                      cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,right.location.size,right.location.register,right.location.register);
-                      cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_AND,left.location.size,right.location.register,left.location.register);
-                      cg.a_load_reg_reg(current_asmdata.CurrAsmList,left.location.size,location.size,left.location.register,location.register);
-                    end;
+                    cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_AND,location.size,left.location.register,location.register);
                 end;
                 end;
             end;
             end;
           else
           else

+ 2 - 2
compiler/ncgmem.pas

@@ -291,8 +291,8 @@ implementation
          if codegenerror then
          if codegenerror then
            exit;
            exit;
          paraloc1.init;
          paraloc1.init;
-         { classes and interfaces must be dereferenced implicitly }
-         if is_class_or_interface_or_dispinterface_or_objc(left.resultdef) then
+         { several object types must be dereferenced implicitly }
+         if is_implicit_pointer_object_type(left.resultdef) then
            begin
            begin
              { the contents of a class are aligned to a sizeof(pointer) }
              { the contents of a class are aligned to a sizeof(pointer) }
              location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));
              location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));

+ 1 - 0
compiler/ncgrtti.pas

@@ -693,6 +693,7 @@ implementation
                  potype_destructor: methodkind:=mkDestructor;
                  potype_destructor: methodkind:=mkDestructor;
                  potype_class_constructor: methodkind:=mkClassConstructor;
                  potype_class_constructor: methodkind:=mkClassConstructor;
                  potype_class_destructor: methodkind:=mkClassDestructor;
                  potype_class_destructor: methodkind:=mkClassDestructor;
+                 potype_operator: methodkind:=mkOperatorOverload;
                  potype_procedure: 
                  potype_procedure: 
                    if po_classmethod in def.procoptions then 
                    if po_classmethod in def.procoptions then 
                      methodkind:=mkClassProcedure
                      methodkind:=mkClassProcedure

+ 76 - 0
compiler/nmat.pas

@@ -67,6 +67,13 @@ interface
        end;
        end;
        tunaryminusnodeclass = class of tunaryminusnode;
        tunaryminusnodeclass = class of tunaryminusnode;
 
 
+       tunaryplusnode = class(tunarynode)
+         constructor create(expr : tnode);virtual;
+         function pass_1 : tnode;override;
+         function pass_typecheck:tnode;override;
+       end;
+       tunaryplusnodeclass = class of tunaryplusnode;
+
        tnotnode = class(tunarynode)
        tnotnode = class(tunarynode)
           constructor create(expr : tnode);virtual;
           constructor create(expr : tnode);virtual;
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
@@ -82,6 +89,7 @@ interface
        cmoddivnode : tmoddivnodeclass = tmoddivnode;
        cmoddivnode : tmoddivnodeclass = tmoddivnode;
        cshlshrnode : tshlshrnodeclass = tshlshrnode;
        cshlshrnode : tshlshrnodeclass = tshlshrnode;
        cunaryminusnode : tunaryminusnodeclass = tunaryminusnode;
        cunaryminusnode : tunaryminusnodeclass = tunaryminusnode;
+       cunaryplusnode : tunaryplusnodeclass = tunaryplusnode;
        cnotnode : tnotnodeclass = tnotnode;
        cnotnode : tnotnodeclass = tnotnode;
 
 
 implementation
 implementation
@@ -730,6 +738,74 @@ implementation
           end;
           end;
       end;
       end;
 
 
+{****************************************************************************
+                             TUNARYPLUSNODE
+ ****************************************************************************}
+
+    constructor tunaryplusnode.create(expr: tnode);
+      begin
+        inherited create(unaryplusn,expr);
+      end;
+
+    function tunaryplusnode.pass_1: tnode;
+      begin
+        result:=nil;
+        { can never happen because all the conversions happen
+          in pass_typecheck }
+        internalerror(201012250);
+      end;
+
+    function tunaryplusnode.pass_typecheck: tnode;
+      var
+        t:tnode;
+      begin
+        result:=nil;
+        typecheckpass(left);
+        set_varstate(left,vs_read,[vsf_must_be_valid]);
+        if codegenerror then
+          exit;
+
+        if is_constintnode(left) or
+           is_constrealnode(left) or
+           (left.resultdef.typ=floatdef) or
+           is_currency(left.resultdef)
+{$ifdef SUPPORT_MMX}
+           or ((cs_mmx in current_settings.localswitches) and
+                is_mmx_able_array(left.resultdef))
+{$endif SUPPORT_MMX}
+        then
+          begin
+            result:=left;
+            left:=nil;
+          end
+{$ifndef cpu64bitaddr}
+        else if is_64bit(left.resultdef) then
+          begin
+            inserttypeconv(left,s64inttype);
+            result:=left;
+            left:=nil;
+          end
+{$endif not cpu64bitaddr}
+        else if (left.resultdef.typ=orddef) then
+          begin
+            inserttypeconv(left,sinttype);
+            result:=left;
+            left:=nil;
+          end
+        else
+          begin
+            { allow operator overloading }
+            t:=self;
+            if isunaryoverloaded(t) then
+              begin
+                result:=t;
+                exit;
+             end;
+
+             CGMessage(type_e_mismatch);
+           end;
+      end;
+
 
 
 {****************************************************************************
 {****************************************************************************
                                TNOTNODE
                                TNOTNODE

+ 8 - 7
compiler/nmem.pas

@@ -166,12 +166,12 @@ implementation
             if (df_generic in left.resultdef.defoptions) then
             if (df_generic in left.resultdef.defoptions) then
               begin
               begin
                 defaultresultdef:=true;
                 defaultresultdef:=true;
-                if assigned(current_objectdef) then
+                if assigned(current_structdef) then
                   begin
                   begin
-                    if assigned(current_objectdef.genericdef) then
-                      if current_objectdef.genericdef=left.resultdef then
+                    if assigned(current_structdef.genericdef) then
+                      if current_structdef.genericdef=left.resultdef then
                         begin
                         begin
-                          resultdef:=tclassrefdef.create(current_objectdef);
+                          resultdef:=tclassrefdef.create(current_structdef);
                           defaultresultdef:=false;
                           defaultresultdef:=false;
                         end
                         end
                       else
                       else
@@ -687,8 +687,8 @@ implementation
          if codegenerror then
          if codegenerror then
           exit;
           exit;
 
 
-         { classes must be dereferenced implicitly }
-         if is_class_or_interface_or_dispinterface_or_objc(left.resultdef) then
+         { several object types must be dereferenced implicitly }
+         if is_implicit_pointer_object_type(left.resultdef) then
            expectloc:=LOC_REFERENCE
            expectloc:=LOC_REFERENCE
          else
          else
            begin
            begin
@@ -863,7 +863,8 @@ implementation
                  (except voidpointer) in delphi/tp7 it's only allowed for pchars. }
                  (except voidpointer) in delphi/tp7 it's only allowed for pchars. }
                if not is_voidpointer(left.resultdef) and
                if not is_voidpointer(left.resultdef) and
                   (
                   (
-                   (m_fpc in current_settings.modeswitches) or
+                   (cs_pointermath in current_settings.localswitches) or
+                   tpointerdef(left.resultdef).has_pointer_math or
                    is_pchar(left.resultdef) or
                    is_pchar(left.resultdef) or
                    is_pwidechar(left.resultdef)
                    is_pwidechar(left.resultdef)
                   ) then
                   ) then

+ 4 - 4
compiler/nobj.pas

@@ -731,11 +731,11 @@ implementation
       var
       var
         i : longint;
         i : longint;
         def : tdef;
         def : tdef;
-        old_current_objectdef : tobjectdef;
+        old_current_structdef : tabstractrecorddef;
         overridesclasshelper : boolean;
         overridesclasshelper : boolean;
       begin
       begin
-        old_current_objectdef:=current_objectdef;
-        current_objectdef:=_class;
+        old_current_structdef:=current_structdef;
+        current_structdef:=_class;
 
 
         _class.resetvmtentries;
         _class.resetvmtentries;
 
 
@@ -770,7 +770,7 @@ implementation
             intf_allocate_vtbls;
             intf_allocate_vtbls;
           end;
           end;
 
 
-        current_objectdef:=old_current_objectdef;
+        current_structdef:=old_current_structdef;
       end;
       end;
 
 
 
 

+ 2 - 0
compiler/node.pas

@@ -67,6 +67,7 @@ interface
           callparan,        {Represents a parameter}
           callparan,        {Represents a parameter}
           realconstn,       {Represents a real value}
           realconstn,       {Represents a real value}
           unaryminusn,      {Represents a sign change (i.e. -2)}
           unaryminusn,      {Represents a sign change (i.e. -2)}
+          unaryplusn,       {Represents a check for +Value}
           asmn,             {Represents an assembler node }
           asmn,             {Represents an assembler node }
           vecn,             {Represents array indexing}
           vecn,             {Represents array indexing}
           pointerconstn,    {Represents a pointer constant}
           pointerconstn,    {Represents a pointer constant}
@@ -151,6 +152,7 @@ interface
           'callparan',
           'callparan',
           'realconstn',
           'realconstn',
           'unaryminusn',
           'unaryminusn',
+          'unaryplusn',
           'asmn',
           'asmn',
           'vecn',
           'vecn',
           'pointerconstn',
           'pointerconstn',

+ 3 - 3
compiler/nutils.pas

@@ -536,7 +536,7 @@ implementation
         { call fail helper and exit normal }
         { call fail helper and exit normal }
         if is_class(current_structdef) then
         if is_class(current_structdef) then
           begin
           begin
-            srsym:=search_struct_member(current_objectdef,'FREEINSTANCE');
+            srsym:=search_struct_member(current_structdef,'FREEINSTANCE');
             if assigned(srsym) and
             if assigned(srsym) and
                (srsym.typ=procsym) then
                (srsym.typ=procsym) then
               begin
               begin
@@ -562,7 +562,7 @@ implementation
               { parameter 2 : pointer to vmt }
               { parameter 2 : pointer to vmt }
               { parameter 1 : self pointer }
               { parameter 1 : self pointer }
               para:=ccallparanode.create(
               para:=ccallparanode.create(
-                        cordconstnode.create(current_objectdef.vmt_offset,s32inttype,false),
+                        cordconstnode.create(tobjectdef(current_structdef).vmt_offset,s32inttype,false),
                     ccallparanode.create(
                     ccallparanode.create(
                         ctypeconvnode.create_internal(
                         ctypeconvnode.create_internal(
                             load_vmt_pointer_node,
                             load_vmt_pointer_node,
@@ -725,7 +725,7 @@ implementation
                 end;
                 end;
               subscriptn:
               subscriptn:
                 begin
                 begin
-                  if is_class_or_interface_or_dispinterface_or_objc(tunarynode(p).left.resultdef) then
+                  if is_implicit_pointer_object_type(tunarynode(p).left.resultdef) then
                     inc(result,2);
                     inc(result,2);
                   if (result = NODE_COMPLEXITY_INF) then
                   if (result = NODE_COMPLEXITY_INF) then
                     exit;
                     exit;

+ 1 - 0
compiler/options.pas

@@ -2413,6 +2413,7 @@ begin
   def_system_macro('FPC_OBJFPC_EXTENDED_IF');
   def_system_macro('FPC_OBJFPC_EXTENDED_IF');
   def_system_macro('FPC_HAS_OPERATOR_ENUMERATOR');
   def_system_macro('FPC_HAS_OPERATOR_ENUMERATOR');
   def_system_macro('FPC_HAS_CONSTREF');
   def_system_macro('FPC_HAS_CONSTREF');
+  def_system_macro('FPC_STATICRIPFIXED');
 {$if defined(x86) or defined(powerpc) or defined(powerpc64)}
 {$if defined(x86) or defined(powerpc) or defined(powerpc64)}
   def_system_macro('FPC_HAS_INTERNAL_ABS_LONG');
   def_system_macro('FPC_HAS_INTERNAL_ABS_LONG');
 {$endif}
 {$endif}

+ 3 - 7
compiler/parser.pas

@@ -55,16 +55,12 @@ implementation
 
 
     procedure initparser;
     procedure initparser;
       begin
       begin
-         { we didn't parse a object or class declaration }
-         { and no function header                        }
-         testcurobject:=0;
-
          { Current compiled module/proc }
          { Current compiled module/proc }
          set_current_module(nil);
          set_current_module(nil);
          current_module:=nil;
          current_module:=nil;
          current_asmdata:=nil;
          current_asmdata:=nil;
          current_procinfo:=nil;
          current_procinfo:=nil;
-         current_objectdef:=nil;
+         current_structdef:=nil;
          current_genericdef:=nil;
          current_genericdef:=nil;
          current_specializedef:=nil;
          current_specializedef:=nil;
 
 
@@ -138,7 +134,7 @@ implementation
          current_module:=nil;
          current_module:=nil;
          current_procinfo:=nil;
          current_procinfo:=nil;
          current_asmdata:=nil;
          current_asmdata:=nil;
-         current_objectdef:=nil;
+         current_structdef:=nil;
          current_genericdef:=nil;
          current_genericdef:=nil;
          current_specializedef:=nil;
          current_specializedef:=nil;
 
 
@@ -297,7 +293,7 @@ implementation
          { parsing a procedure or declaration should be finished }
          { parsing a procedure or declaration should be finished }
          if assigned(current_procinfo) then
          if assigned(current_procinfo) then
            internalerror(200811121);
            internalerror(200811121);
-         if assigned(current_objectdef) then
+         if assigned(current_structdef) then
            internalerror(200811122);
            internalerror(200811122);
          inc(compile_level);
          inc(compile_level);
          parser_current_file:=filename;
          parser_current_file:=filename;

+ 1 - 0
compiler/pass_2.pas

@@ -105,6 +105,7 @@ implementation
              'noth-callpar',{callparan}
              'noth-callpar',{callparan}
              'realconst',   {realconstn}
              'realconst',   {realconstn}
              'unaryminus',  {unaryminusn}
              'unaryminus',  {unaryminusn}
+             'unaryplus',   {unaryplusn}
              'asm',         {asmn}
              'asm',         {asmn}
              'vecn',        {vecn}
              'vecn',        {vecn}
              'pointerconst',{pointerconstn}
              'pointerconst',{pointerconstn}

+ 70 - 107
compiler/pdecl.pas

@@ -26,10 +26,12 @@ unit pdecl;
 interface
 interface
 
 
     uses
     uses
+      { common }
+      cclasses,
       { global }
       { global }
       globtype,
       globtype,
       { symtable }
       { symtable }
-      symsym,
+      symsym,symdef,
       { pass_1 }
       { pass_1 }
       node;
       node;
 
 
@@ -45,19 +47,23 @@ interface
     procedure property_dec(is_classpropery: boolean);
     procedure property_dec(is_classpropery: boolean);
     procedure resourcestring_dec;
     procedure resourcestring_dec;
 
 
+    { generics support }
+    function parse_generic_parameters:TFPObjectList;
+    procedure insert_generic_parameter_types(def:tstoreddef;genericdef:tstoreddef;genericlist:TFPObjectList);
+
 implementation
 implementation
 
 
     uses
     uses
        SysUtils,
        SysUtils,
        { common }
        { common }
-       cutils,cclasses,
+       cutils,
        { global }
        { global }
        globals,tokens,verbose,widestr,constexp,
        globals,tokens,verbose,widestr,constexp,
        systems,
        systems,
        { aasm }
        { aasm }
        aasmbase,aasmtai,aasmdata,fmodule,
        aasmbase,aasmtai,aasmdata,fmodule,
        { symtable }
        { symtable }
-       symconst,symbase,symtype,symdef,symtable,paramgr,defutil,
+       symconst,symbase,symtype,symtable,paramgr,defutil,
        { pass 1 }
        { pass 1 }
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,nobj,
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,nobj,
        { codegen }
        { codegen }
@@ -330,105 +336,61 @@ implementation
          consume(_SEMICOLON);
          consume(_SEMICOLON);
       end;
       end;
 
 
-
-    procedure types_dec(in_structure: boolean);
-
-      procedure get_cpp_class_external_status(od: tobjectdef);
-        var
-          hs: string;
-
-        begin
-          { C++ classes can be external -> all methods inside are external
-           (defined at the class level instead of per method, so that you cannot
-           define some methods as external and some not)
-          }
-          if (token=_ID) and
-             (idtoken=_EXTERNAL) then
-            begin
-              consume(_EXTERNAL);
-              { copied from pdecsub.pd_external }
-              if not(token=_SEMICOLON) and not(idtoken=_NAME) then
-                begin
-                  { Always add library prefix and suffix to create an uniform name }
-                  hs:=get_stringconst;
-                  if ExtractFileExt(hs)='' then
-                    hs:=ChangeFileExt(hs,target_info.sharedlibext);
-                  if Copy(hs,1,length(target_info.sharedlibprefix))<>target_info.sharedlibprefix then
-                    hs:=target_info.sharedlibprefix+hs;
-                  od.import_lib:=stringdup(hs);
-                end;
-              include(od.objectoptions, oo_is_external);
-              { check if we shall use another name for the class }
-              if (token=_ID) and
-                 (idtoken=_NAME) then
-                begin
-                  consume(_NAME);
-                  od.objextname:=stringdup(get_stringconst);
-                end
-              else
-                od.objextname:=stringdup(od.objrealname^);
-              consume(_SEMICOLON);
-              { now all methods need to be external }
-              od.make_all_methods_external;
-              include(od.objectoptions,oo_is_external);
-            end
+    function parse_generic_parameters:TFPObjectList;
+    var
+      generictype : ttypesym;
+    begin
+      result:=TFPObjectList.Create(false);
+      repeat
+        if token=_ID then
+          begin
+            generictype:=ttypesym.create(orgpattern,cundefinedtype);
+            include(generictype.symoptions,sp_generic_para);
+            result.add(generictype);
+          end;
+        consume(_ID);
+      until not try_to_consume(_COMMA) ;
+    end;
+
+    procedure insert_generic_parameter_types(def:tstoreddef;genericdef:tstoreddef;genericlist:TFPObjectList);
+      var
+        i: longint;
+        generictype: ttypesym;
+        st: tsymtable;
+      begin
+        def.genericdef:=genericdef;
+        if not assigned(genericlist) then
+          exit;
+
+        case def.typ of
+          recorddef,objectdef: st:=tabstractrecorddef(def).symtable;
+          arraydef: st:=tarraydef(def).symtable;
+          procvardef,procdef: st:=tabstractprocdef(def).parast;
           else
           else
-            od.objextname:=stringdup(od.objrealname^);
-          { ToDo: read the namespace of the class (influences the mangled name)}
+            internalerror(201101020);
         end;
         end;
 
 
-      procedure get_objc_class_or_protocol_external_status(od: tobjectdef);
-        begin
-          { Objective-C classes can be external -> all messages inside are
-            external (defined at the class level instead of per method, so
-            that you cannot define some methods as external and some not)
-          }
-          if (token=_ID) and
-             (idtoken=_EXTERNAL) then
-            begin
-              consume(_EXTERNAL);
-              if (token=_ID) and
-                 (idtoken=_NAME) and
-                 not(oo_is_forward in od.objectoptions) then
-                begin
-                  consume(_NAME);
-                  od.objextname:=stringdup(get_stringconst);
-                end
-              else
-                { the external name doesn't matter for formally declared
-                  classes, and allowing to specify one would mean that we would
-                  have to check it for consistency with the actual definition
-                  later on }
-                od.objextname:=stringdup(od.objrealname^);
-              consume(_SEMICOLON);
-              od.make_all_methods_external;
-              include(od.objectoptions,oo_is_external);
-              if (oo_is_forward in od.objectoptions) then
-                begin
-                  { formal definition: x = objcclass; external; }
-                  exclude(od.objectoptions,oo_is_forward);
-                  include(od.objectoptions,oo_is_formal);
-                end;
-            end
-          else { or also allow "public name 'x'"? }
-            od.objextname:=stringdup(od.objrealname^);
-        end;
+        for i:=0 to genericlist.count-1 do
+          begin
+            generictype:=ttypesym(genericlist[i]);
+            if generictype.typedef.typ=undefineddef then
+              include(def.defoptions,df_generic)
+            else
+              include(def.defoptions,df_specialization);
+            st.insert(generictype);
+          end;
+       end;
 
 
+    procedure types_dec(in_structure: boolean);
 
 
-        function parse_generic_parameters:TFPObjectList;
-        var
-          generictype : ttypesym;
+      procedure finalize_objc_class_or_protocol_external_status(od: tobjectdef);
         begin
         begin
-          result:=TFPObjectList.Create(false);
-          repeat
-            if token=_ID then
-              begin
-                generictype:=ttypesym.create(orgpattern,cundefinedtype);
-                include(generictype.symoptions,sp_generic_para);
-                result.add(generictype);
-              end;
-            consume(_ID);
-          until not try_to_consume(_COMMA) ;
+          if  [oo_is_external,oo_is_forward] <= od.objectoptions then
+            begin
+              { formal definition: x = objcclass external; }
+              exclude(od.objectoptions,oo_is_forward);
+              include(od.objectoptions,oo_is_formal);
+            end;
         end;
         end;
 
 
       var
       var
@@ -460,13 +422,17 @@ implementation
            generictypelist:=nil;
            generictypelist:=nil;
            generictokenbuf:=nil;
            generictokenbuf:=nil;
 
 
-           { generic declaration? }
-           isgeneric:=try_to_consume(_GENERIC);
+           { fpc generic declaration? }
+           isgeneric:=not(m_delphi in current_settings.modeswitches) and try_to_consume(_GENERIC);
 
 
            typename:=pattern;
            typename:=pattern;
            orgtypename:=orgpattern;
            orgtypename:=orgpattern;
            consume(_ID);
            consume(_ID);
 
 
+           { delphi generic declaration? }
+           if (m_delphi in current_settings.modeswitches) then
+             isgeneric:=token=_LSHARPBRACKET;
+
            { Generic type declaration? }
            { Generic type declaration? }
            if isgeneric then
            if isgeneric then
              begin
              begin
@@ -511,7 +477,7 @@ implementation
                      (token=_OBJCPROTOCOL) or
                      (token=_OBJCPROTOCOL) or
                      (token=_OBJCCATEGORY)) and
                      (token=_OBJCCATEGORY)) and
                     (assigned(ttypesym(sym).typedef)) and
                     (assigned(ttypesym(sym).typedef)) and
-                    is_class_or_interface_or_dispinterface_or_objc(ttypesym(sym).typedef) and
+                    is_implicit_pointer_object_type(ttypesym(sym).typedef) and
                     (oo_is_forward in tobjectdef(ttypesym(sym).typedef).objectoptions) then
                     (oo_is_forward in tobjectdef(ttypesym(sym).typedef).objectoptions) then
                   begin
                   begin
                     case token of
                     case token of
@@ -633,14 +599,11 @@ implementation
                     try_consume_hintdirective(newtype.symoptions,newtype.deprecatedmsg);
                     try_consume_hintdirective(newtype.symoptions,newtype.deprecatedmsg);
                     consume(_SEMICOLON);
                     consume(_SEMICOLON);
 
 
-                    { we have to know whether the class or protocol is
-                      external before the vmt is built, because some errors/
-                      hints depend on this  }
+                    { change a forward and external objcclass declaration into
+                      formal external definition, so the compiler does not
+                      expect an real definition later }
                     if is_objc_class_or_protocol(hdef) then
                     if is_objc_class_or_protocol(hdef) then
-                      get_objc_class_or_protocol_external_status(tobjectdef(hdef));
-
-                    if is_cppclass(hdef) then
-                      get_cpp_class_external_status(tobjectdef(hdef));
+                      finalize_objc_class_or_protocol_external_status(tobjectdef(hdef));
 
 
                     { Build VMT indexes, skip for type renaming and forward classes }
                     { Build VMT indexes, skip for type renaming and forward classes }
                     if (hdef.typesym=newtype) and
                     if (hdef.typesym=newtype) and
@@ -684,7 +647,7 @@ implementation
               end;
               end;
             end;
             end;
 
 
-           if isgeneric and not(hdef.typ in [objectdef,recorddef]) then
+           if isgeneric and not(hdef.typ in [objectdef,recorddef,arraydef,procvardef]) then
              message(parser_e_cant_create_generics_of_this_type);
              message(parser_e_cant_create_generics_of_this_type);
 
 
            { Stop recording a generic template }
            { Stop recording a generic template }

+ 200 - 163
compiler/pdecobj.pas

@@ -41,7 +41,7 @@ interface
 implementation
 implementation
 
 
     uses
     uses
-      cutils,
+      sysutils,cutils,
       globals,verbose,systems,tokens,
       globals,verbose,systems,tokens,
       symbase,symsym,symtable,
       symbase,symsym,symtable,
       node,nld,nmem,ncon,ncnv,ncal,
       node,nld,nmem,ncon,ncnv,ncal,
@@ -55,6 +55,8 @@ implementation
         Declaring it as string here results in an error when compiling (PFV) }
         Declaring it as string here results in an error when compiling (PFV) }
       current_procinfo = 'error';
       current_procinfo = 'error';
 
 
+    var
+      current_objectdef : tobjectdef absolute current_structdef;
 
 
     function class_constructor_head:tprocdef;
     function class_constructor_head:tprocdef;
       var
       var
@@ -225,10 +227,10 @@ implementation
         i   : longint;
         i   : longint;
         def : tdef;
         def : tdef;
       begin
       begin
-        include(current_objectdef.objectoptions,oo_has_virtual);
-        for i:=0 to current_objectdef.symtable.DefList.count-1 do
+        include(current_structdef.objectoptions,oo_has_virtual);
+        for i:=0 to current_structdef.symtable.DefList.count-1 do
           begin
           begin
-            def:=tdef(current_objectdef.symtable.DefList[i]);
+            def:=tdef(current_structdef.symtable.DefList[i]);
             if assigned(def) and
             if assigned(def) and
                (def.typ=procdef) then
                (def.typ=procdef) then
               begin
               begin
@@ -244,9 +246,9 @@ implementation
         i   : longint;
         i   : longint;
         def : tdef;
         def : tdef;
       begin
       begin
-        for i:=0 to current_objectdef.symtable.DefList.count-1 do
+        for i:=0 to current_structdef.symtable.DefList.count-1 do
           begin
           begin
-            def:=tdef(current_objectdef.symtable.DefList[i]);
+            def:=tdef(current_structdef.symtable.DefList[i]);
             if assigned(def) and
             if assigned(def) and
                (def.typ=procdef) then
                (def.typ=procdef) then
               begin
               begin
@@ -303,7 +305,8 @@ implementation
       begin
       begin
         while try_to_consume(_COMMA) do
         while try_to_consume(_COMMA) do
           begin
           begin
-             id_type(hdef,false);
+             { use single_type instead of id_type for specialize support }
+             single_type(hdef,[stoAllowTypeDef,stoParseClassParent]);
              if (hdef.typ<>objectdef) then
              if (hdef.typ<>objectdef) then
                begin
                begin
                   if intf then
                   if intf then
@@ -334,30 +337,92 @@ implementation
             if (current_objectdef.objecttype in [odt_interfacecom,odt_dispinterface]) and
             if (current_objectdef.objecttype in [odt_interfacecom,odt_dispinterface]) and
                not valid then
                not valid then
               Message(parser_e_improper_guid_syntax);
               Message(parser_e_improper_guid_syntax);
-            include(current_objectdef.objectoptions,oo_has_valid_guid);
+            include(current_structdef.objectoptions,oo_has_valid_guid);
           end
           end
         else
         else
           Message(parser_e_illegal_expression);
           Message(parser_e_illegal_expression);
         p.free;
         p.free;
       end;
       end;
 
 
-    procedure parse_object_options;
+    procedure get_cpp_class_external_status(od: tobjectdef);
+      var
+        hs: string;
       begin
       begin
-        if current_objectdef.objecttype in [odt_object,odt_class] then
+        { C++ classes can be external -> all methods inside are external
+         (defined at the class level instead of per method, so that you cannot
+         define some methods as external and some not)
+        }
+        if try_to_consume(_EXTERNAL) then
           begin
           begin
-            while true do
+            if token in [_CSTRING,_CWSTRING,_CCHAR,_CWCHAR] then
               begin
               begin
-                if try_to_consume(_ABSTRACT) then
-                  include(current_objectdef.objectoptions,oo_is_abstract)
-                else
-                if try_to_consume(_SEALED) then
-                  include(current_objectdef.objectoptions,oo_is_sealed)
-                else
-                  break;
+                { Always add library prefix and suffix to create an uniform name }
+                hs:=get_stringconst;
+                if ExtractFileExt(hs)='' then
+                  hs:=ChangeFileExt(hs,target_info.sharedlibext);
+                if Copy(hs,1,length(target_info.sharedlibprefix))<>target_info.sharedlibprefix then
+                  hs:=target_info.sharedlibprefix+hs;
+                od.import_lib:=stringdup(hs);
               end;
               end;
-            if [oo_is_abstract, oo_is_sealed] * current_objectdef.objectoptions = [oo_is_abstract, oo_is_sealed] then
-              Message(parser_e_abstract_and_sealed_conflict);
-          end;
+            include(od.objectoptions, oo_is_external);
+            { check if we shall use another name for the class }
+            if try_to_consume(_NAME) then
+              od.objextname:=stringdup(get_stringconst)
+            else
+              od.objextname:=stringdup(od.objrealname^);
+            include(od.objectoptions,oo_is_external);
+          end
+        else
+          od.objextname:=stringdup(od.objrealname^);
+        { ToDo: read the namespace of the class (influences the mangled name)}
+      end;
+
+    procedure get_objc_class_or_protocol_external_status(od: tobjectdef);
+      begin
+        { Objective-C classes can be external -> all messages inside are
+          external (defined at the class level instead of per method, so
+          that you cannot define some methods as external and some not)
+        }
+        if try_to_consume(_EXTERNAL) then
+          begin
+            if try_to_consume(_NAME) then
+              od.objextname:=stringdup(get_stringconst)
+            else
+              { the external name doesn't matter for formally declared
+                classes, and allowing to specify one would mean that we would
+                have to check it for consistency with the actual definition
+                later on }
+              od.objextname:=stringdup(od.objrealname^);
+            include(od.objectoptions,oo_is_external);
+          end
+        else
+          od.objextname:=stringdup(od.objrealname^);
+      end;
+
+
+    procedure parse_object_options;
+      begin
+        case current_objectdef.objecttype of
+          odt_object,odt_class:
+            begin
+              while true do
+                begin
+                  if try_to_consume(_ABSTRACT) then
+                    include(current_structdef.objectoptions,oo_is_abstract)
+                  else
+                  if try_to_consume(_SEALED) then
+                    include(current_structdef.objectoptions,oo_is_sealed)
+                  else
+                    break;
+                end;
+              if [oo_is_abstract, oo_is_sealed] * current_structdef.objectoptions = [oo_is_abstract, oo_is_sealed] then
+                Message(parser_e_abstract_and_sealed_conflict);
+            end;
+          odt_cppclass:
+            get_cpp_class_external_status(current_objectdef);
+          odt_objcclass,odt_objcprotocol,odt_objccategory:
+            get_objc_class_or_protocol_external_status(current_objectdef);
+        end;
       end;
       end;
 
 
     procedure parse_parent_classes;
     procedure parse_parent_classes;
@@ -373,19 +438,19 @@ implementation
 
 
         { reads the parent class }
         { reads the parent class }
         if (token=_LKLAMMER) or
         if (token=_LKLAMMER) or
-           is_objccategory(current_objectdef) or
-           is_objectpascal_classhelper(current_objectdef) then
+           is_objccategory(current_structdef) or
+           is_objectpascal_classhelper(current_structdef) then
           begin
           begin
             if not is_objectpascal_classhelper(current_objectdef) then
             if not is_objectpascal_classhelper(current_objectdef) then
               consume(_LKLAMMER);
               consume(_LKLAMMER);
             { use single_type instead of id_type for specialize support }
             { use single_type instead of id_type for specialize support }
-            single_type(hdef,false,false);
+            single_type(hdef,[stoAllowTypeDef, stoParseClassParent]);
             if (not assigned(hdef)) or
             if (not assigned(hdef)) or
                (hdef.typ<>objectdef) then
                (hdef.typ<>objectdef) then
               begin
               begin
                 if assigned(hdef) then
                 if assigned(hdef) then
                   Message1(type_e_class_type_expected,hdef.typename)
                   Message1(type_e_class_type_expected,hdef.typename)
-                else if is_objccategory(current_objectdef) then
+                else if is_objccategory(current_structdef) then
                   { a category must specify the class to extend }
                   { a category must specify the class to extend }
                   Message(type_e_objcclass_type_expected)
                   Message(type_e_objcclass_type_expected)
                 else if is_objectpascal_classhelper(current_objectdef) then
                 else if is_objectpascal_classhelper(current_objectdef) then
@@ -432,7 +497,7 @@ implementation
                        begin
                        begin
                          if is_objcprotocol(childof) then
                          if is_objcprotocol(childof) then
                            begin
                            begin
-                             if not(oo_is_classhelper in current_objectdef.objectoptions) then
+                             if not(oo_is_classhelper in current_structdef.objectoptions) then
                                begin
                                begin
                                  intfchildof:=childof;
                                  intfchildof:=childof;
                                  childof:=nil;
                                  childof:=nil;
@@ -467,14 +532,6 @@ implementation
             hasparentdefined:=true;
             hasparentdefined:=true;
           end;
           end;
 
 
-        { no generic as parents }
-        if assigned(childof) and
-           (df_generic in childof.defoptions) then
-          begin
-            Message(parser_e_no_generics_as_types);
-            childof:=nil;
-          end;
-
         { if no parent class, then a class get tobject as parent }
         { if no parent class, then a class get tobject as parent }
         if not assigned(childof) then
         if not assigned(childof) then
           begin
           begin
@@ -505,7 +562,7 @@ implementation
           end;
           end;
 
 
         { remove forward flag, is resolved }
         { remove forward flag, is resolved }
-        exclude(current_objectdef.objectoptions,oo_is_forward);
+        exclude(current_structdef.objectoptions,oo_is_forward);
 
 
         if hasparentdefined then
         if hasparentdefined then
           begin
           begin
@@ -537,27 +594,6 @@ implementation
           message(parser_e_dispinterface_needs_a_guid);
           message(parser_e_dispinterface_needs_a_guid);
       end;
       end;
 
 
-
-    procedure insert_generic_parameter_types(genericdef:tstoreddef;genericlist:TFPObjectList);
-      var
-        i : longint;
-        generictype : ttypesym;
-      begin
-        current_objectdef.genericdef:=genericdef;
-        if not assigned(genericlist) then
-          exit;
-        for i:=0 to genericlist.count-1 do
-          begin
-            generictype:=ttypesym(genericlist[i]);
-            if generictype.typedef.typ=undefineddef then
-              include(current_objectdef.defoptions,df_generic)
-            else
-              include(current_objectdef.defoptions,df_specialization);
-            symtablestack.top.insert(generictype);
-          end;
-       end;
-
-
     procedure parse_object_members;
     procedure parse_object_members;
 
 
       procedure chkobjc(pd: tprocdef);
       procedure chkobjc(pd: tprocdef);
@@ -595,8 +631,7 @@ implementation
       var
       var
         pd : tprocdef;
         pd : tprocdef;
         has_destructor,
         has_destructor,
-        oldparse_only,
-        old_parse_generic : boolean;
+        oldparse_only: boolean;
         object_member_blocktype : tblock_type;
         object_member_blocktype : tblock_type;
         fields_allowed, is_classdef, classfields: boolean;
         fields_allowed, is_classdef, classfields: boolean;
         vdoptions: tvar_dec_options;
         vdoptions: tvar_dec_options;
@@ -606,15 +641,11 @@ implementation
            (token=_SEMICOLON) then
            (token=_SEMICOLON) then
           exit;
           exit;
 
 
-        old_parse_generic:=parse_generic;
-
-        parse_generic:=(df_generic in current_objectdef.defoptions);
         { in "publishable" classes the default access type is published }
         { in "publishable" classes the default access type is published }
-        if (oo_can_have_published in current_objectdef.objectoptions) then
-          current_objectdef.symtable.currentvisibility:=vis_published
+        if (oo_can_have_published in current_structdef.objectoptions) then
+          current_structdef.symtable.currentvisibility:=vis_published
         else
         else
-          current_objectdef.symtable.currentvisibility:=vis_public;
-        testcurobject:=1;
+          current_structdef.symtable.currentvisibility:=vis_public;
         has_destructor:=false;
         has_destructor:=false;
         fields_allowed:=true;
         fields_allowed:=true;
         is_classdef:=false;
         is_classdef:=false;
@@ -624,17 +655,15 @@ implementation
           case token of
           case token of
             _TYPE :
             _TYPE :
               begin
               begin
-                if (([df_generic,df_specialization]*current_objectdef.defoptions)=[]) and
-                   not(current_objectdef.objecttype in [odt_class,odt_object]) then
-                  Message(parser_e_type_var_const_only_in_generics_and_classes);
-                 consume(_TYPE);
-                 object_member_blocktype:=bt_type;
+                if not(current_objectdef.objecttype in [odt_class,odt_object]) then
+                  Message(parser_e_type_var_const_only_in_records_and_classes);
+                consume(_TYPE);
+                object_member_blocktype:=bt_type;
               end;
               end;
             _VAR :
             _VAR :
               begin
               begin
-                if (([df_generic,df_specialization]*current_objectdef.defoptions)=[]) and
-                   not(current_objectdef.objecttype in [odt_class,odt_object]) then
-                  Message(parser_e_type_var_const_only_in_generics_and_classes);
+                if not(current_objectdef.objecttype in [odt_class,odt_object]) then
+                  Message(parser_e_type_var_const_only_in_records_and_classes);
                 consume(_VAR);
                 consume(_VAR);
                 fields_allowed:=true;
                 fields_allowed:=true;
                 object_member_blocktype:=bt_general;
                 object_member_blocktype:=bt_general;
@@ -643,30 +672,29 @@ implementation
               end;
               end;
             _CONST:
             _CONST:
               begin
               begin
-                if (([df_generic,df_specialization]*current_objectdef.defoptions)=[]) and
-                   not(current_objectdef.objecttype in [odt_class,odt_object]) then
-                  Message(parser_e_type_var_const_only_in_generics_and_classes);
+                if not(current_objectdef.objecttype in [odt_class,odt_object]) then
+                  Message(parser_e_type_var_const_only_in_records_and_classes);
                 consume(_CONST);
                 consume(_CONST);
                 object_member_blocktype:=bt_const;
                 object_member_blocktype:=bt_const;
               end;
               end;
             _ID :
             _ID :
               begin
               begin
-                if is_objcprotocol(current_objectdef) and
+                if is_objcprotocol(current_structdef) and
                    ((idtoken=_REQUIRED) or
                    ((idtoken=_REQUIRED) or
                     (idtoken=_OPTIONAL)) then
                     (idtoken=_OPTIONAL)) then
                   begin
                   begin
-                    current_objectdef.symtable.currentlyoptional:=(idtoken=_OPTIONAL);
+                    current_structdef.symtable.currentlyoptional:=(idtoken=_OPTIONAL);
                     consume(idtoken)
                     consume(idtoken)
                   end
                   end
                 else case idtoken of
                 else case idtoken of
                   _PRIVATE :
                   _PRIVATE :
                     begin
                     begin
-                      if is_interface(current_objectdef) or
-                         is_objc_protocol_or_category(current_objectdef) then
+                      if is_interface(current_structdef) or
+                         is_objc_protocol_or_category(current_structdef) then
                         Message(parser_e_no_access_specifier_in_interfaces);
                         Message(parser_e_no_access_specifier_in_interfaces);
                        consume(_PRIVATE);
                        consume(_PRIVATE);
-                       current_objectdef.symtable.currentvisibility:=vis_private;
-                       include(current_objectdef.objectoptions,oo_has_private);
+                       current_structdef.symtable.currentvisibility:=vis_private;
+                       include(current_structdef.objectoptions,oo_has_private);
                        fields_allowed:=true;
                        fields_allowed:=true;
                        is_classdef:=false;
                        is_classdef:=false;
                        classfields:=false;
                        classfields:=false;
@@ -674,12 +702,12 @@ implementation
                      end;
                      end;
                    _PROTECTED :
                    _PROTECTED :
                      begin
                      begin
-                       if is_interface(current_objectdef) or
-                          is_objc_protocol_or_category(current_objectdef) then
+                       if is_interface(current_structdef) or
+                          is_objc_protocol_or_category(current_structdef) then
                          Message(parser_e_no_access_specifier_in_interfaces);
                          Message(parser_e_no_access_specifier_in_interfaces);
                        consume(_PROTECTED);
                        consume(_PROTECTED);
-                       current_objectdef.symtable.currentvisibility:=vis_protected;
-                       include(current_objectdef.objectoptions,oo_has_protected);
+                       current_structdef.symtable.currentvisibility:=vis_protected;
+                       include(current_structdef.objectoptions,oo_has_protected);
                        fields_allowed:=true;
                        fields_allowed:=true;
                        is_classdef:=false;
                        is_classdef:=false;
                        classfields:=false;
                        classfields:=false;
@@ -687,11 +715,11 @@ implementation
                      end;
                      end;
                    _PUBLIC :
                    _PUBLIC :
                      begin
                      begin
-                       if is_interface(current_objectdef) or
-                          is_objc_protocol_or_category(current_objectdef) then
+                       if is_interface(current_structdef) or
+                          is_objc_protocol_or_category(current_structdef) then
                          Message(parser_e_no_access_specifier_in_interfaces);
                          Message(parser_e_no_access_specifier_in_interfaces);
                        consume(_PUBLIC);
                        consume(_PUBLIC);
-                       current_objectdef.symtable.currentvisibility:=vis_public;
+                       current_structdef.symtable.currentvisibility:=vis_public;
                        fields_allowed:=true;
                        fields_allowed:=true;
                        is_classdef:=false;
                        is_classdef:=false;
                        classfields:=false;
                        classfields:=false;
@@ -702,14 +730,14 @@ implementation
                        { we've to check for a pushlished section in non-  }
                        { we've to check for a pushlished section in non-  }
                        { publishable classes later, if a real declaration }
                        { publishable classes later, if a real declaration }
                        { this is the way, delphi does it                  }
                        { this is the way, delphi does it                  }
-                       if is_interface(current_objectdef) then
+                       if is_interface(current_structdef) then
                          Message(parser_e_no_access_specifier_in_interfaces);
                          Message(parser_e_no_access_specifier_in_interfaces);
                        { Objective-C classes do not support "published",
                        { Objective-C classes do not support "published",
                          as basically everything is published.  }
                          as basically everything is published.  }
-                       if is_objc_class_or_protocol(current_objectdef) then
+                       if is_objc_class_or_protocol(current_structdef) then
                          Message(parser_e_no_objc_published);
                          Message(parser_e_no_objc_published);
                        consume(_PUBLISHED);
                        consume(_PUBLISHED);
-                       current_objectdef.symtable.currentvisibility:=vis_published;
+                       current_structdef.symtable.currentvisibility:=vis_published;
                        fields_allowed:=true;
                        fields_allowed:=true;
                        is_classdef:=false;
                        is_classdef:=false;
                        classfields:=false;
                        classfields:=false;
@@ -717,8 +745,8 @@ implementation
                      end;
                      end;
                    _STRICT :
                    _STRICT :
                      begin
                      begin
-                       if is_interface(current_objectdef) or
-                          is_objc_protocol_or_category(current_objectdef) then
+                       if is_interface(current_structdef) or
+                          is_objc_protocol_or_category(current_structdef) then
                           Message(parser_e_no_access_specifier_in_interfaces);
                           Message(parser_e_no_access_specifier_in_interfaces);
                         consume(_STRICT);
                         consume(_STRICT);
                         if token=_ID then
                         if token=_ID then
@@ -727,14 +755,14 @@ implementation
                               _PRIVATE:
                               _PRIVATE:
                                 begin
                                 begin
                                   consume(_PRIVATE);
                                   consume(_PRIVATE);
-                                  current_objectdef.symtable.currentvisibility:=vis_strictprivate;
-                                  include(current_objectdef.objectoptions,oo_has_strictprivate);
+                                  current_structdef.symtable.currentvisibility:=vis_strictprivate;
+                                  include(current_structdef.objectoptions,oo_has_strictprivate);
                                 end;
                                 end;
                               _PROTECTED:
                               _PROTECTED:
                                 begin
                                 begin
                                   consume(_PROTECTED);
                                   consume(_PROTECTED);
-                                  current_objectdef.symtable.currentvisibility:=vis_strictprotected;
-                                  include(current_objectdef.objectoptions,oo_has_strictprotected);
+                                  current_structdef.symtable.currentvisibility:=vis_strictprotected;
+                                  include(current_structdef.objectoptions,oo_has_strictprotected);
                                 end;
                                 end;
                               else
                               else
                                 message(parser_e_protected_or_private_expected);
                                 message(parser_e_protected_or_private_expected);
@@ -751,12 +779,12 @@ implementation
                       begin
                       begin
                         if object_member_blocktype=bt_general then
                         if object_member_blocktype=bt_general then
                           begin
                           begin
-                            if is_interface(current_objectdef) or
-                               is_objc_protocol_or_category(current_objectdef) then
+                            if is_interface(current_structdef) or
+                               is_objc_protocol_or_category(current_structdef) then
                               Message(parser_e_no_vars_in_interfaces);
                               Message(parser_e_no_vars_in_interfaces);
 
 
-                            if (current_objectdef.symtable.currentvisibility=vis_published) and
-                               not(oo_can_have_published in current_objectdef.objectoptions) then
+                            if (current_structdef.symtable.currentvisibility=vis_published) and
+                               not(oo_can_have_published in current_structdef.objectoptions) then
                               Message(parser_e_cant_have_published);
                               Message(parser_e_cant_have_published);
                             if (not fields_allowed) then
                             if (not fields_allowed) then
                               Message(parser_e_field_not_allowed_here);
                               Message(parser_e_field_not_allowed_here);
@@ -792,7 +820,7 @@ implementation
                    if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
                    if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
                      Message(parser_e_procedure_or_function_expected);
                      Message(parser_e_procedure_or_function_expected);
 
 
-                   if is_interface(current_objectdef) then
+                   if is_interface(current_structdef) then
                      Message(parser_e_no_static_method_in_interfaces)
                      Message(parser_e_no_static_method_in_interfaces)
                    else
                    else
                      { class methods are also allowed for Objective-C protocols }
                      { class methods are also allowed for Objective-C protocols }
@@ -802,13 +830,13 @@ implementation
             _PROCEDURE,
             _PROCEDURE,
             _FUNCTION:
             _FUNCTION:
               begin
               begin
-                if (current_objectdef.symtable.currentvisibility=vis_published) and
-                   not(oo_can_have_published in current_objectdef.objectoptions) then
+                if (current_structdef.symtable.currentvisibility=vis_published) and
+                   not(oo_can_have_published in current_structdef.objectoptions) then
                   Message(parser_e_cant_have_published);
                   Message(parser_e_cant_have_published);
 
 
                 oldparse_only:=parse_only;
                 oldparse_only:=parse_only;
                 parse_only:=true;
                 parse_only:=true;
-                pd:=parse_proc_dec(is_classdef,current_objectdef);
+                pd:=parse_proc_dec(is_classdef,current_structdef);
 
 
                 { this is for error recovery as well as forward }
                 { this is for error recovery as well as forward }
                 { interface mappings, i.e. mapping to a method  }
                 { interface mappings, i.e. mapping to a method  }
@@ -837,11 +865,11 @@ implementation
 
 
                     { add procdef options to objectdef options }
                     { add procdef options to objectdef options }
                     if (po_msgint in pd.procoptions) then
                     if (po_msgint in pd.procoptions) then
-                      include(current_objectdef.objectoptions,oo_has_msgint);
+                      include(current_structdef.objectoptions,oo_has_msgint);
                     if (po_msgstr in pd.procoptions) then
                     if (po_msgstr in pd.procoptions) then
-                      include(current_objectdef.objectoptions,oo_has_msgstr);
+                      include(current_structdef.objectoptions,oo_has_msgstr);
                     if (po_virtualmethod in pd.procoptions) then
                     if (po_virtualmethod in pd.procoptions) then
-                      include(current_objectdef.objectoptions,oo_has_virtual);
+                      include(current_structdef.objectoptions,oo_has_virtual);
 
 
                     chkcpp(pd);
                     chkcpp(pd);
                     chkobjc(pd);
                     chkobjc(pd);
@@ -855,23 +883,23 @@ implementation
               end;
               end;
             _CONSTRUCTOR :
             _CONSTRUCTOR :
               begin
               begin
-                if (current_objectdef.symtable.currentvisibility=vis_published) and
-                  not(oo_can_have_published in current_objectdef.objectoptions) then
+                if (current_structdef.symtable.currentvisibility=vis_published) and
+                  not(oo_can_have_published in current_structdef.objectoptions) then
                   Message(parser_e_cant_have_published);
                   Message(parser_e_cant_have_published);
 
 
-                if not is_classdef and not(current_objectdef.symtable.currentvisibility in [vis_public,vis_published]) then
+                if not is_classdef and not(current_structdef.symtable.currentvisibility in [vis_public,vis_published]) then
                   Message(parser_w_constructor_should_be_public);
                   Message(parser_w_constructor_should_be_public);
 
 
-                if is_interface(current_objectdef) then
+                if is_interface(current_structdef) then
                   Message(parser_e_no_con_des_in_interfaces);
                   Message(parser_e_no_con_des_in_interfaces);
 
 
                 { Objective-C does not know the concept of a constructor }
                 { Objective-C does not know the concept of a constructor }
-                if is_objc_class_or_protocol(current_objectdef) then
+                if is_objc_class_or_protocol(current_structdef) then
                   Message(parser_e_objc_no_constructor_destructor);
                   Message(parser_e_objc_no_constructor_destructor);
 
 
                 { only 1 class constructor is allowed }
                 { only 1 class constructor is allowed }
-                if is_classdef and (oo_has_class_constructor in current_objectdef.objectoptions) then
-                  Message1(parser_e_only_one_class_constructor_allowed, current_objectdef.objrealname^);
+                if is_classdef and (oo_has_class_constructor in current_structdef.objectoptions) then
+                  Message1(parser_e_only_one_class_constructor_allowed, current_structdef.objrealname^);
 
 
                 oldparse_only:=parse_only;
                 oldparse_only:=parse_only;
                 parse_only:=true;
                 parse_only:=true;
@@ -887,7 +915,7 @@ implementation
 
 
                 { add procdef options to objectdef options }
                 { add procdef options to objectdef options }
                 if (po_virtualmethod in pd.procoptions) then
                 if (po_virtualmethod in pd.procoptions) then
-                  include(current_objectdef.objectoptions,oo_has_virtual);
+                  include(current_structdef.objectoptions,oo_has_virtual);
                 chkcpp(pd);
                 chkcpp(pd);
                 maybe_parse_hint_directives(pd);
                 maybe_parse_hint_directives(pd);
 
 
@@ -897,8 +925,8 @@ implementation
               end;
               end;
             _DESTRUCTOR :
             _DESTRUCTOR :
               begin
               begin
-                if (current_objectdef.symtable.currentvisibility=vis_published) and
-                   not(oo_can_have_published in current_objectdef.objectoptions) then
+                if (current_structdef.symtable.currentvisibility=vis_published) and
+                   not(oo_can_have_published in current_structdef.objectoptions) then
                   Message(parser_e_cant_have_published);
                   Message(parser_e_cant_have_published);
 
 
                 if not is_classdef then
                 if not is_classdef then
@@ -907,19 +935,19 @@ implementation
                   else
                   else
                     has_destructor:=true;
                     has_destructor:=true;
 
 
-                if is_interface(current_objectdef) then
+                if is_interface(current_structdef) then
                   Message(parser_e_no_con_des_in_interfaces);
                   Message(parser_e_no_con_des_in_interfaces);
 
 
-                if not is_classdef and (current_objectdef.symtable.currentvisibility<>vis_public) then
+                if not is_classdef and (current_structdef.symtable.currentvisibility<>vis_public) then
                   Message(parser_w_destructor_should_be_public);
                   Message(parser_w_destructor_should_be_public);
 
 
                 { Objective-C does not know the concept of a destructor }
                 { Objective-C does not know the concept of a destructor }
-                if is_objc_class_or_protocol(current_objectdef) then
+                if is_objc_class_or_protocol(current_structdef) then
                   Message(parser_e_objc_no_constructor_destructor);
                   Message(parser_e_objc_no_constructor_destructor);
 
 
                 { only 1 class destructor is allowed }
                 { only 1 class destructor is allowed }
-                if is_classdef and (oo_has_class_destructor in current_objectdef.objectoptions) then
-                  Message1(parser_e_only_one_class_destructor_allowed, current_objectdef.objrealname^);
+                if is_classdef and (oo_has_class_destructor in current_structdef.objectoptions) then
+                  Message1(parser_e_only_one_class_destructor_allowed, current_structdef.objrealname^);
 
 
                 oldparse_only:=parse_only;
                 oldparse_only:=parse_only;
                 parse_only:=true;
                 parse_only:=true;
@@ -935,7 +963,7 @@ implementation
 
 
                 { add procdef options to objectdef options }
                 { add procdef options to objectdef options }
                 if (po_virtualmethod in pd.procoptions) then
                 if (po_virtualmethod in pd.procoptions) then
-                  include(current_objectdef.objectoptions,oo_has_virtual);
+                  include(current_structdef.objectoptions,oo_has_virtual);
 
 
                 chkcpp(pd);
                 chkcpp(pd);
                 maybe_parse_hint_directives(pd);
                 maybe_parse_hint_directives(pd);
@@ -953,24 +981,22 @@ implementation
               consume(_ID); { Give a ident expected message, like tp7 }
               consume(_ID); { Give a ident expected message, like tp7 }
           end;
           end;
         until false;
         until false;
-
-        { restore }
-        testcurobject:=0;
-        parse_generic:=old_parse_generic;
       end;
       end;
 
 
 
 
     function object_dec(objecttype:tobjecttyp;const n:tidstring;genericdef:tstoreddef;genericlist:TFPObjectList;fd : tobjectdef) : tobjectdef;
     function object_dec(objecttype:tobjecttyp;const n:tidstring;genericdef:tstoreddef;genericlist:TFPObjectList;fd : tobjectdef) : tobjectdef;
       var
       var
-        old_current_objectdef : tobjectdef;
-        old_current_genericdef : tobjectdef;
-        old_current_specializedef : tobjectdef;
+        old_current_structdef: tabstractrecorddef;
+        old_current_genericdef,
+        old_current_specializedef: tstoreddef;
+        old_parse_generic: boolean;
       begin
       begin
-        old_current_objectdef:=current_objectdef;
+        old_current_structdef:=current_structdef;
         old_current_genericdef:=current_genericdef;
         old_current_genericdef:=current_genericdef;
         old_current_specializedef:=current_specializedef;
         old_current_specializedef:=current_specializedef;
+        old_parse_generic:=parse_generic;
 
 
-        current_objectdef:=nil;
+        current_structdef:=nil;
         current_genericdef:=nil;
         current_genericdef:=nil;
         current_specializedef:=nil;
         current_specializedef:=nil;
 
 
@@ -986,11 +1012,11 @@ implementation
               begin
               begin
                 Message(parser_e_forward_mismatch);
                 Message(parser_e_forward_mismatch);
                 { recover }
                 { recover }
-                current_objectdef:=tobjectdef.create(current_objectdef.objecttype,n,nil);
-                include(current_objectdef.objectoptions,oo_is_forward);
+                current_structdef:=tobjectdef.create(current_objectdef.objecttype,n,nil);
+                include(current_structdef.objectoptions,oo_is_forward);
               end
               end
             else
             else
-              current_objectdef:=fd
+              current_structdef:=fd
           end
           end
         else
         else
           begin
           begin
@@ -999,20 +1025,20 @@ implementation
               Message(parser_f_no_anonym_objects);
               Message(parser_f_no_anonym_objects);
 
 
             { create new class }
             { create new class }
-            current_objectdef:=tobjectdef.create(objecttype,n,nil);
+            current_structdef:=tobjectdef.create(objecttype,n,nil);
 
 
             { include always the forward flag, it'll be removed after the parent class have been
             { include always the forward flag, it'll be removed after the parent class have been
               added. This is to prevent circular childof loops }
               added. This is to prevent circular childof loops }
-            include(current_objectdef.objectoptions,oo_is_forward);
+            include(current_structdef.objectoptions,oo_is_forward);
 
 
             if (cs_compilesystem in current_settings.moduleswitches) then
             if (cs_compilesystem in current_settings.moduleswitches) then
               begin
               begin
                 case current_objectdef.objecttype of
                 case current_objectdef.objecttype of
                   odt_interfacecom :
                   odt_interfacecom :
-                    if (current_objectdef.objname^='IUNKNOWN') then
+                    if (current_structdef.objname^='IUNKNOWN') then
                       interface_iunknown:=current_objectdef;
                       interface_iunknown:=current_objectdef;
                   odt_class :
                   odt_class :
-                    if (current_objectdef.objname^='TOBJECT') then
+                    if (current_structdef.objname^='TOBJECT') then
                       class_tobject:=current_objectdef;
                       class_tobject:=current_objectdef;
                 end;
                 end;
               end;
               end;
@@ -1028,16 +1054,23 @@ implementation
 
 
         { usage of specialized type inside its generic template }
         { usage of specialized type inside its generic template }
         if assigned(genericdef) then
         if assigned(genericdef) then
-          current_specializedef:=current_objectdef
+          current_specializedef:=current_structdef
         { reject declaration of generic class inside generic class }
         { reject declaration of generic class inside generic class }
         else if assigned(genericlist) then
         else if assigned(genericlist) then
-          current_genericdef:=current_objectdef;
+          current_genericdef:=current_structdef;
 
 
         { set published flag in $M+ mode, it can also be inherited and will
         { set published flag in $M+ mode, it can also be inherited and will
           be added when the parent class set with tobjectdef.set_parent (PFV) }
           be added when the parent class set with tobjectdef.set_parent (PFV) }
         if (cs_generate_rtti in current_settings.localswitches) and
         if (cs_generate_rtti in current_settings.localswitches) and
            (current_objectdef.objecttype in [odt_interfacecom,odt_class]) then
            (current_objectdef.objecttype in [odt_interfacecom,odt_class]) then
-          include(current_objectdef.objectoptions,oo_can_have_published);
+          include(current_structdef.objectoptions,oo_can_have_published);
+
+        { Objective-C objectdefs can be "formal definitions", in which case
+          the syntax is "type tc = objcclass external;" -> we have to parse
+          its object options (external) already here, to make sure that such
+          definitions are recognised as formal defs }
+        if objecttype in [odt_objcclass,odt_objcprotocol,odt_objccategory] then
+          parse_object_options;
 
 
         { forward def? }
         { forward def? }
         if not assigned(fd) and
         if not assigned(fd) and
@@ -1045,7 +1078,7 @@ implementation
           begin
           begin
             { add to the list of definitions to check that the forward
             { add to the list of definitions to check that the forward
               is resolved. this is required for delphi mode }
               is resolved. this is required for delphi mode }
-            current_module.checkforwarddefs.add(current_objectdef);
+            current_module.checkforwarddefs.add(current_structdef);
           end
           end
         else
         else
           begin
           begin
@@ -1053,7 +1086,7 @@ implementation
             if (objecttype=odt_objccategory) then
             if (objecttype=odt_objccategory) then
               begin
               begin
                 current_objectdef.objecttype:=odt_objcclass;
                 current_objectdef.objecttype:=odt_objcclass;
-                include(current_objectdef.objectoptions,oo_is_classhelper);
+                include(current_structdef.objectoptions,oo_is_classhelper);
               end;
               end;
 
 
             { change classhepers into Delphi type class helpers }
             { change classhepers into Delphi type class helpers }
@@ -1064,7 +1097,12 @@ implementation
               end;
               end;
 
 
             { parse list of options (abstract / sealed) }
             { parse list of options (abstract / sealed) }
-            parse_object_options;
+            if not(objecttype in [odt_objcclass,odt_objcprotocol,odt_objccategory]) then
+              parse_object_options;
+
+            symtablestack.push(current_structdef.symtable);
+            insert_generic_parameter_types(current_structdef,genericdef,genericlist);
+            parse_generic:=(df_generic in current_structdef.defoptions);
 
 
             { parse list of parent classes }
             { parse list of parent classes }
             parse_parent_classes;
             parse_parent_classes;
@@ -1072,42 +1110,41 @@ implementation
             { parse optional GUID for interfaces }
             { parse optional GUID for interfaces }
             parse_guid;
             parse_guid;
 
 
-            symtablestack.push(current_objectdef.symtable);
-            insert_generic_parameter_types(genericdef,genericlist);
             { parse and insert object members }
             { parse and insert object members }
             parse_object_members;
             parse_object_members;
-            symtablestack.pop(current_objectdef.symtable);
+            symtablestack.pop(current_structdef.symtable);
           end;
           end;
 
 
         { generate vmt space if needed }
         { generate vmt space if needed }
-        if not(oo_has_vmt in current_objectdef.objectoptions) and
-           not(oo_is_forward in current_objectdef.objectoptions) and
+        if not(oo_has_vmt in current_structdef.objectoptions) and
+           not(oo_is_forward in current_structdef.objectoptions) and
            (
            (
-            ([oo_has_virtual,oo_has_constructor,oo_has_destructor]*current_objectdef.objectoptions<>[]) or
+            ([oo_has_virtual,oo_has_constructor,oo_has_destructor]*current_structdef.objectoptions<>[]) or
             (current_objectdef.objecttype in [odt_class])
             (current_objectdef.objecttype in [odt_class])
            ) then
            ) then
           current_objectdef.insertvmt;
           current_objectdef.insertvmt;
 
 
         { for implemented classes with a vmt check if there is a constructor }
         { for implemented classes with a vmt check if there is a constructor }
-        if (oo_has_vmt in current_objectdef.objectoptions) and
-           not(oo_is_forward in current_objectdef.objectoptions) and
-           not(oo_has_constructor in current_objectdef.objectoptions) and
-           not is_objc_class_or_protocol(current_objectdef) then
-          Message1(parser_w_virtual_without_constructor,current_objectdef.objrealname^);
-
-        if is_interface(current_objectdef) or
-           is_objcprotocol(current_objectdef) then
+        if (oo_has_vmt in current_structdef.objectoptions) and
+           not(oo_is_forward in current_structdef.objectoptions) and
+           not(oo_has_constructor in current_structdef.objectoptions) and
+           not is_objc_class_or_protocol(current_structdef) then
+          Message1(parser_w_virtual_without_constructor,current_structdef.objrealname^);
+
+        if is_interface(current_structdef) or
+           is_objcprotocol(current_structdef) then
           setinterfacemethodoptions
           setinterfacemethodoptions
-        else if is_objcclass(current_objectdef) then
+        else if is_objcclass(current_structdef) then
           setobjcclassmethodoptions;
           setobjcclassmethodoptions;
 
 
         { return defined objectdef }
         { return defined objectdef }
         result:=current_objectdef;
         result:=current_objectdef;
 
 
         { restore old state }
         { restore old state }
-        current_objectdef:=old_current_objectdef;
+        current_structdef:=old_current_structdef;
         current_genericdef:=old_current_genericdef;
         current_genericdef:=old_current_genericdef;
         current_specializedef:=old_current_specializedef;
         current_specializedef:=old_current_specializedef;
+        parse_generic:=old_parse_generic;
       end;
       end;
 
 
 end.
 end.

+ 132 - 49
compiler/pdecsub.pas

@@ -62,7 +62,7 @@ interface
     procedure parse_var_proc_directives(sym:tsym);
     procedure parse_var_proc_directives(sym:tsym);
     procedure parse_object_proc_directives(pd:tabstractprocdef);
     procedure parse_object_proc_directives(pd:tabstractprocdef);
     procedure parse_record_proc_directives(pd:tabstractprocdef);
     procedure parse_record_proc_directives(pd:tabstractprocdef);
-    function  parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;var pd:tprocdef):boolean;
+    function  parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;out pd:tprocdef):boolean;
     function  parse_proc_dec(isclassmethod:boolean;astruct:tabstractrecorddef):tprocdef;
     function  parse_proc_dec(isclassmethod:boolean;astruct:tabstractrecorddef):tprocdef;
 
 
     { helper functions - they insert nested objects hierarcy to the symtablestack
     { helper functions - they insert nested objects hierarcy to the symtablestack
@@ -528,7 +528,6 @@ implementation
         sc:=TFPObjectList.create(false);
         sc:=TFPObjectList.create(false);
         defaultrequired:=false;
         defaultrequired:=false;
         paranr:=0;
         paranr:=0;
-        inc(testcurobject);
         block_type:=bt_var;
         block_type:=bt_var;
         is_univ:=false;
         is_univ:=false;
         repeat
         repeat
@@ -594,7 +593,7 @@ implementation
               begin
               begin
                 block_type:=bt_var_type;
                 block_type:=bt_var_type;
                 consume(_COLON);
                 consume(_COLON);
-                single_type(pv.returndef,false,false);
+                single_type(pv.returndef,[]);
                 block_type:=bt_var;
                 block_type:=bt_var;
               end;
               end;
              hdef:=pv;
              hdef:=pv;
@@ -642,7 +641,7 @@ implementation
                 else
                 else
                  begin
                  begin
                    { define field type }
                    { define field type }
-                   single_type(arrayelementdef,false,false);
+                   single_type(arrayelementdef,[]);
                    tarraydef(hdef).elementdef:=arrayelementdef;
                    tarraydef(hdef).elementdef:=arrayelementdef;
                  end;
                  end;
               end
               end
@@ -656,7 +655,7 @@ implementation
                 else
                 else
                   begin
                   begin
                     block_type:=bt_var_type;
                     block_type:=bt_var_type;
-                    single_type(hdef,false,false);
+                    single_type(hdef,[]);
                     block_type:=bt_var;
                     block_type:=bt_var;
                   end;
                   end;
 
 
@@ -782,20 +781,17 @@ implementation
         { remove parasymtable from stack }
         { remove parasymtable from stack }
         sc.free;
         sc.free;
         { reset object options }
         { reset object options }
-        dec(testcurobject);
         block_type:=old_block_type;
         block_type:=old_block_type;
         consume(_RKLAMMER);
         consume(_RKLAMMER);
       end;
       end;
 
 
 
 
-    function parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;var pd:tprocdef):boolean;
+    function parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;out pd:tprocdef):boolean;
       var
       var
         hs       : string;
         hs       : string;
         orgsp,sp : TIDString;
         orgsp,sp : TIDString;
         srsym : tsym;
         srsym : tsym;
-        srsymtable : TSymtable;
         checkstack : psymtablestackitem;
         checkstack : psymtablestackitem;
-        storepos,
         procstartfilepos : tfileposinfo;
         procstartfilepos : tfileposinfo;
         searchagain : boolean;
         searchagain : boolean;
         st,
         st,
@@ -806,7 +802,7 @@ implementation
         old_parse_generic : boolean;
         old_parse_generic : boolean;
         old_current_structdef: tabstractrecorddef;
         old_current_structdef: tabstractrecorddef;
         old_current_genericdef,
         old_current_genericdef,
-        old_current_specializedef : tobjectdef;
+        old_current_specializedef: tstoreddef;
         lasttoken,lastidtoken: ttoken;
         lasttoken,lastidtoken: ttoken;
 
 
         procedure parse_operator_name;
         procedure parse_operator_name;
@@ -831,7 +827,7 @@ implementation
                       case lastidtoken of
                       case lastidtoken of
                         _IMPLICIT:optoken:=_ASSIGNMENT;
                         _IMPLICIT:optoken:=_ASSIGNMENT;
                         _NEGATIVE:optoken:=_MINUS;
                         _NEGATIVE:optoken:=_MINUS;
-  //                         _POSITIVE:optoken:=_PLUS;
+                        _POSITIVE:optoken:=_PLUS;
                         _LOGICALNOT:optoken:=_OP_NOT;
                         _LOGICALNOT:optoken:=_OP_NOT;
                         _IN:optoken:=_OP_IN;
                         _IN:optoken:=_OP_IN;
                         _EQUAL:optoken:=_EQ;
                         _EQUAL:optoken:=_EQ;
@@ -887,6 +883,89 @@ implementation
               end;
               end;
           end;
           end;
 
 
+        function search_object_name(sp:TIDString;gen_error:boolean):tsym;
+          var
+            storepos:tfileposinfo;
+            srsymtable:TSymtable;
+          begin
+            storepos:=current_tokenpos;
+            current_tokenpos:=procstartfilepos;
+            searchsym(sp,result,srsymtable);
+            if not assigned(result) then
+              begin
+                if gen_error then
+                  identifier_not_found(orgsp);
+                result:=generrorsym;
+              end;
+            current_tokenpos:=storepos;
+          end;
+
+        function consume_generic_type_parameter:boolean;
+          var
+            i:integer;
+            ok:boolean;
+            sym:tsym;
+          begin
+            result:=not assigned(astruct)and(m_delphi in current_settings.modeswitches);
+            if result then
+              begin
+                { a generic type parameter? }
+                srsym:=search_object_name(sp,false);
+                if (srsym.typ=typesym) and
+                   (ttypesym(srsym).typedef.typ in [objectdef,recorddef]) then
+                begin
+                  astruct:=tabstractrecorddef(ttypesym(srsym).typedef);
+                  if (df_generic in astruct.defoptions) then
+                    begin
+                      consume(_LT);
+                      ok:=true;
+                      i:=0;
+                      repeat
+                        if ok and (token=_ID)  then
+                          begin
+                            ok:=false;
+                            while i<astruct.symtable.SymList.Count-1 do
+                              begin
+                                sym:=tsym(astruct.symtable.SymList[i]);
+                                if sp_generic_para in sym.symoptions then
+                                  begin
+                                    ok:=sym.Name=pattern;
+                                    inc(i);
+                                    break;
+                                  end;
+                                inc(i);
+                              end;
+                            if not ok then
+                              Message1(type_e_generic_declaration_does_not_match,astruct.RttiName);
+                          end;
+                        consume(_ID);
+                      until not try_to_consume(_COMMA);
+                      if ok then
+                        while i<astruct.symtable.SymList.Count-1 do
+                          begin
+                            sym:=tsym(astruct.symtable.SymList[i]);
+                            if sp_generic_para in sym.symoptions then
+                              begin
+                                Message1(type_e_generic_declaration_does_not_match,astruct.RttiName);
+                                break;
+                              end;
+                            inc(i);
+                          end;
+                      consume(_GT);
+                    end
+                  else
+                  if try_to_consume(_LT) then
+                    begin
+                      Message(type_e_type_parameters_are_not_allowed_here);
+                      repeat
+                        consume(_ID);
+                      until not try_to_consume(_COMMA);
+                      consume(_GT);
+                    end;
+                end;
+              end;
+          end;
+
       begin
       begin
         { Save the position where this procedure really starts }
         { Save the position where this procedure really starts }
         procstartfilepos:=current_tokenpos;
         procstartfilepos:=current_tokenpos;
@@ -905,16 +984,7 @@ implementation
            (tobjectdef(astruct).ImplementedInterfaces.count>0) and
            (tobjectdef(astruct).ImplementedInterfaces.count>0) and
            try_to_consume(_POINT) then
            try_to_consume(_POINT) then
          begin
          begin
-           storepos:=current_tokenpos;
-           current_tokenpos:=procstartfilepos;
-           { get interface syms}
-           searchsym(sp,srsym,srsymtable);
-           if not assigned(srsym) then
-            begin
-              identifier_not_found(orgsp);
-              srsym:=generrorsym;
-            end;
-           current_tokenpos:=storepos;
+           srsym:=search_object_name(sp,true);
            { qualifier is interface? }
            { qualifier is interface? }
            ImplIntf:=nil;
            ImplIntf:=nil;
            if (srsym.typ=typesym) and
            if (srsym.typ=typesym) and
@@ -935,25 +1005,14 @@ implementation
          end;
          end;
 
 
         { method  ? }
         { method  ? }
-        if not assigned(astruct) and
+        if (consume_generic_type_parameter or not assigned(astruct)) and
            (symtablestack.top.symtablelevel=main_program_level) and
            (symtablestack.top.symtablelevel=main_program_level) and
            try_to_consume(_POINT) then
            try_to_consume(_POINT) then
          begin
          begin
            repeat
            repeat
              searchagain:=false;
              searchagain:=false;
              if not assigned(astruct) then
              if not assigned(astruct) then
-               begin
-                 { search for object name }
-                 storepos:=current_tokenpos;
-                 current_tokenpos:=procstartfilepos;
-                 searchsym(sp,srsym,srsymtable);
-                 if not assigned(srsym) then
-                  begin
-                    identifier_not_found(orgsp);
-                    srsym:=generrorsym;
-                  end;
-                 current_tokenpos:=storepos;
-               end;
+               srsym:=search_object_name(sp,true);
              { consume proc name }
              { consume proc name }
              procstartfilepos:=current_tokenpos;
              procstartfilepos:=current_tokenpos;
              consume_proc_name;
              consume_proc_name;
@@ -1019,14 +1078,13 @@ implementation
              if (potype=potype_operator)and(optoken=NOTOKEN) then
              if (potype=potype_operator)and(optoken=NOTOKEN) then
                parse_operator_name;
                parse_operator_name;
 
 
-             srsymtable:=symtablestack.top;
-             srsym:=tsym(srsymtable.Find(sp));
+             srsym:=tsym(symtablestack.top.Find(sp));
 
 
              { Also look in the globalsymtable if we didn't found
              { Also look in the globalsymtable if we didn't found
                the symbol in the localsymtable }
                the symbol in the localsymtable }
              if not assigned(srsym) and
              if not assigned(srsym) and
                 not(parse_only) and
                 not(parse_only) and
-                (srsymtable=current_module.localsymtable) and
+                (symtablestack.top=current_module.localsymtable) and
                 assigned(current_module.globalsymtable) then
                 assigned(current_module.globalsymtable) then
                srsym:=tsym(current_module.globalsymtable.Find(sp));
                srsym:=tsym(current_module.globalsymtable.Find(sp));
 
 
@@ -1154,9 +1212,9 @@ implementation
                 old_current_specializedef:=current_specializedef;
                 old_current_specializedef:=current_specializedef;
                 current_structdef:=pd.struct;
                 current_structdef:=pd.struct;
                 if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
                 if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
-                  current_genericdef:=tobjectdef(current_structdef);
+                  current_genericdef:=current_structdef;
                 if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
                 if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
-                  current_specializedef:=tobjectdef(current_structdef);
+                  current_specializedef:=current_structdef;
               end;
               end;
             { Add parameter symtable }
             { Add parameter symtable }
             if pd.parast.symtabletype<>staticsymtable then
             if pd.parast.symtabletype<>staticsymtable then
@@ -1182,8 +1240,10 @@ implementation
 
 
     function parse_proc_dec(isclassmethod:boolean;astruct:tabstractrecorddef):tprocdef;
     function parse_proc_dec(isclassmethod:boolean;astruct:tabstractrecorddef):tprocdef;
       var
       var
-        pd : tprocdef;
+        pd: tprocdef;
         locationstr: string;
         locationstr: string;
+        i: integer;
+        found: boolean;
 
 
         procedure read_returndef(pd: tprocdef);
         procedure read_returndef(pd: tprocdef);
           var
           var
@@ -1191,10 +1251,9 @@ implementation
             old_parse_generic: boolean;
             old_parse_generic: boolean;
             old_current_structdef: tabstractrecorddef;
             old_current_structdef: tabstractrecorddef;
             old_current_genericdef,
             old_current_genericdef,
-            old_current_specializedef: tobjectdef;
+            old_current_specializedef: tstoreddef;
           begin
           begin
             old_parse_generic:=parse_generic;
             old_parse_generic:=parse_generic;
-            inc(testcurobject);
             { Add ObjectSymtable to be able to find generic type definitions }
             { Add ObjectSymtable to be able to find generic type definitions }
             popclass:=0;
             popclass:=0;
             if assigned(pd.struct) and
             if assigned(pd.struct) and
@@ -1208,11 +1267,11 @@ implementation
                 old_current_specializedef:=current_specializedef;
                 old_current_specializedef:=current_specializedef;
                 current_structdef:=pd.struct;
                 current_structdef:=pd.struct;
                 if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
                 if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
-                  current_genericdef:=tobjectdef(current_structdef);
+                  current_genericdef:=current_structdef;
                 if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
                 if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
-                  current_specializedef:=tobjectdef(current_structdef);
+                  current_specializedef:=current_structdef;
               end;
               end;
-            single_type(pd.returndef,false,false);
+            single_type(pd.returndef,[]);
 
 
             if is_dispinterface(pd.struct) and not is_automatable(pd.returndef) then
             if is_dispinterface(pd.struct) and not is_automatable(pd.returndef) then
               Message1(type_e_not_automatable,pd.returndef.typename);
               Message1(type_e_not_automatable,pd.returndef.typename);
@@ -1226,7 +1285,6 @@ implementation
                 if popclass<>0 then
                 if popclass<>0 then
                   internalerror(201012020);
                   internalerror(201012020);
               end;
               end;
-            dec(testcurobject);
             parse_generic:=old_parse_generic;
             parse_generic:=old_parse_generic;
           end;
           end;
 
 
@@ -1377,6 +1435,18 @@ implementation
                   else
                   else
                    begin
                    begin
                      read_returndef(pd);
                      read_returndef(pd);
+                     if (po_classmethod in pd.procoptions) then
+                       begin
+                         found:=false;
+                         for i := 0 to pd.parast.SymList.Count - 1 do
+                           if tparavarsym(pd.parast.SymList[i]).vardef=pd.struct then
+                             begin
+                               found:=true;
+                               break;
+                             end;
+                         if not found then
+                           Message1(parser_e_at_least_one_argument_must_be_of_type,pd.struct.RttiName);
+                       end;
                      if (optoken in [_EQ,_NE,_GT,_LT,_GTE,_LTE,_OP_IN]) and
                      if (optoken in [_EQ,_NE,_GT,_LT,_GTE,_LTE,_OP_IN]) and
                         ((pd.returndef.typ<>orddef) or
                         ((pd.returndef.typ<>orddef) or
                          (torddef(pd.returndef).ordtype<>pasbool)) then
                          (torddef(pd.returndef).ordtype<>pasbool)) then
@@ -1651,7 +1721,11 @@ begin
   if not(is_class_or_interface_or_objc(tprocdef(pd).struct)) then
   if not(is_class_or_interface_or_objc(tprocdef(pd).struct)) then
     Message(parser_e_no_object_override)
     Message(parser_e_no_object_override)
   else if is_objccategory(tprocdef(pd).struct) then
   else if is_objccategory(tprocdef(pd).struct) then
-    Message(parser_e_no_category_override);
+    Message(parser_e_no_category_override)
+  else if not is_objc_class_or_protocol(tprocdef(pd).struct) and
+          not is_cppclass(tprocdef(pd).struct) and
+          (po_external in pd.procoptions) then
+    Message1(parser_e_proc_dir_conflict,'OVERRIDE');
 end;
 end;
 
 
 procedure pd_overload(pd:tabstractprocdef);
 procedure pd_overload(pd:tabstractprocdef);
@@ -1676,6 +1750,8 @@ begin
   { check parameter type }
   { check parameter type }
   if not is_objc_class_or_protocol(tprocdef(pd).struct) then
   if not is_objc_class_or_protocol(tprocdef(pd).struct) then
     begin
     begin
+      if po_external in pd.procoptions then
+        Message1(parser_e_proc_dir_conflict,'MESSAGE');
       paracnt:=0;
       paracnt:=0;
       pd.parast.SymList.ForEachCall(@check_msg_para,@paracnt);
       pd.parast.SymList.ForEachCall(@check_msg_para,@paracnt);
       if paracnt<>1 then
       if paracnt<>1 then
@@ -2200,7 +2276,7 @@ const
       pooption : []; { can be po_msgstr or po_msgint }
       pooption : []; { can be po_msgstr or po_msgint }
       mutexclpocall : [pocall_internproc];
       mutexclpocall : [pocall_internproc];
       mutexclpotype : [potype_constructor,potype_destructor,potype_operator,potype_class_constructor,potype_class_destructor];
       mutexclpotype : [potype_constructor,potype_destructor,potype_operator,potype_class_constructor,potype_class_destructor];
-      mutexclpo     : [po_interrupt,po_external,po_inline]
+      mutexclpo     : [po_interrupt,po_inline]
     ),(
     ),(
       idtok:_MWPASCAL;
       idtok:_MWPASCAL;
       pd_flags : [pd_interface,pd_implemen,pd_body,pd_procvar];
       pd_flags : [pd_interface,pd_implemen,pd_body,pd_procvar];
@@ -2245,7 +2321,7 @@ const
       pooption : [po_overridingmethod,po_virtualmethod];
       pooption : [po_overridingmethod,po_virtualmethod];
       mutexclpocall : [pocall_internproc];
       mutexclpocall : [pocall_internproc];
       mutexclpotype : [];
       mutexclpotype : [];
-      mutexclpo     : [po_exports,po_external,po_interrupt,po_virtualmethod,po_inline]
+      mutexclpo     : [po_exports,po_interrupt,po_virtualmethod,po_inline]
     ),(
     ),(
       idtok:_PASCAL;
       idtok:_PASCAL;
       pd_flags : [pd_interface,pd_implemen,pd_body,pd_procvar];
       pd_flags : [pd_interface,pd_implemen,pd_body,pd_procvar];
@@ -2845,6 +2921,13 @@ const
             include(pd.procoptions,po_global);
             include(pd.procoptions,po_global);
           end;
           end;
 
 
+        { methods from external class definitions are all external themselves }
+        if (pd.typ=procdef) and
+           assigned(tprocdef(pd).struct) and
+           (tprocdef(pd).struct.typ=objectdef) and
+           (oo_is_external in tobjectdef(tprocdef(pd).struct).objectoptions) then
+          tprocdef(pd).make_external;
+
         { Class constructors and destructor are static class methods in real. }
         { Class constructors and destructor are static class methods in real. }
         { There are many places in the compiler where either class or static  }
         { There are many places in the compiler where either class or static  }
         { method flag changes the behavior. It is simplier to add them to     }
         { method flag changes the behavior. It is simplier to add them to     }

+ 26 - 22
compiler/pdecvar.pas

@@ -357,7 +357,6 @@ implementation
               { create a list of the parameters }
               { create a list of the parameters }
               symtablestack.push(readprocdef.parast);
               symtablestack.push(readprocdef.parast);
               sc:=TFPObjectList.create(false);
               sc:=TFPObjectList.create(false);
-              inc(testcurobject);
               repeat
               repeat
                 if try_to_consume(_VAR) then
                 if try_to_consume(_VAR) then
                   varspez:=vs_var
                   varspez:=vs_var
@@ -385,11 +384,11 @@ implementation
                         { define range and type of range }
                         { define range and type of range }
                         hdef:=tarraydef.create(0,-1,s32inttype);
                         hdef:=tarraydef.create(0,-1,s32inttype);
                         { define field type }
                         { define field type }
-                        single_type(arraytype,false,false);
+                        single_type(arraytype,[]);
                         tarraydef(hdef).elementdef:=arraytype;
                         tarraydef(hdef).elementdef:=arraytype;
                       end
                       end
                     else
                     else
-                      single_type(hdef,false,false);
+                      single_type(hdef,[]);
                   end
                   end
                 else
                 else
                   hdef:=cformaltype;
                   hdef:=cformaltype;
@@ -403,7 +402,6 @@ implementation
                   end;
                   end;
               until not try_to_consume(_SEMICOLON);
               until not try_to_consume(_SEMICOLON);
               sc.free;
               sc.free;
-              dec(testcurobject);
               symtablestack.pop(readprocdef.parast);
               symtablestack.pop(readprocdef.parast);
               consume(_RECKKLAMMER);
               consume(_RECKKLAMMER);
 
 
@@ -419,7 +417,7 @@ implementation
          if (token=_COLON) or (paranr>0) or (astruct=nil) then
          if (token=_COLON) or (paranr>0) or (astruct=nil) then
            begin
            begin
               consume(_COLON);
               consume(_COLON);
-              single_type(p.propdef,false,false);
+              single_type(p.propdef,[]);
 
 
               if is_dispinterface(astruct) and not is_automatable(p.propdef) then
               if is_dispinterface(astruct) and not is_automatable(p.propdef) then
                 Message1(type_e_not_automatable,p.propdef.typename);
                 Message1(type_e_not_automatable,p.propdef.typename);
@@ -730,7 +728,7 @@ implementation
          { Parse possible "implements" keyword }
          { Parse possible "implements" keyword }
          if not is_record(astruct) and try_to_consume(_IMPLEMENTS) then
          if not is_record(astruct) and try_to_consume(_IMPLEMENTS) then
            begin
            begin
-             single_type(def,false,false);
+             single_type(def,[]);
 
 
              if not(is_interface(def)) then
              if not(is_interface(def)) then
                message(parser_e_class_implements_must_be_interface);
                message(parser_e_class_implements_must_be_interface);
@@ -1406,13 +1404,13 @@ implementation
 {$endif powerpc or powerpc64}
 {$endif powerpc or powerpc64}
          { Force an expected ID error message }
          { Force an expected ID error message }
          if not (token in [_ID,_CASE,_END]) then
          if not (token in [_ID,_CASE,_END]) then
-          consume(_ID);
+           consume(_ID);
          { read vars }
          { read vars }
          sc:=TFPObjectList.create(false);
          sc:=TFPObjectList.create(false);
          recstlist:=TFPObjectList.create(false);;
          recstlist:=TFPObjectList.create(false);;
          while (token=_ID) and
          while (token=_ID) and
             not(((vd_object in options) or
             not(((vd_object in options) or
-                 ((vd_record in options) and (m_extended_records in current_settings.modeswitches))) and
+                 ((vd_record in options) and (m_advanced_records in current_settings.modeswitches))) and
                 (idtoken in [_PUBLIC,_PRIVATE,_PUBLISHED,_PROTECTED,_STRICT])) do
                 (idtoken in [_PUBLIC,_PRIVATE,_PUBLISHED,_PROTECTED,_STRICT])) do
            begin
            begin
              visibility:=symtablestack.top.currentvisibility;
              visibility:=symtablestack.top.currentvisibility;
@@ -1430,23 +1428,26 @@ implementation
              until not try_to_consume(_COMMA);
              until not try_to_consume(_COMMA);
              consume(_COLON);
              consume(_COLON);
 
 
-             { Don't search in the recordsymtable for types (can be nested!) }
+             { Don't search for types where they can't be:
+               types can be only in objects, classes and records.
+               This just speedup the search a bit. }
              recstlist.count:=0;
              recstlist.count:=0;
-             if ([df_generic,df_specialization]*tdef(recst.defowner).defoptions=[]) and
-                 not is_class_or_object(tdef(recst.defowner)) and
-                 not is_record(tdef(recst.defowner)) then
+             if not is_class_or_object(tdef(recst.defowner)) and
+                not is_record(tdef(recst.defowner)) then
                begin
                begin
                  recstlist.add(recst);
                  recstlist.add(recst);
                  symtablestack.pop(recst);
                  symtablestack.pop(recst);
-                 while (symtablestack.top.symtabletype=recordsymtable) and
-                       ([df_generic,df_specialization]*tdef(symtablestack.top.defowner).defoptions=[]) do
-                   begin
-                     recst:=tabstractrecordsymtable(symtablestack.top);
-                     recstlist.add(recst);
-                     symtablestack.pop(recst);
-                   end;
                end;
                end;
              read_anon_type(hdef,false);
              read_anon_type(hdef,false);
+             { allow only static fields reference to struct where they are declared }
+             if not (vd_class in options) and
+               (is_object(hdef) or is_record(hdef)) and
+               is_owned_by(tabstractrecorddef(recst.defowner),tabstractrecorddef(hdef)) then
+               begin
+                 Message1(type_e_type_is_not_completly_defined, tabstractrecorddef(hdef).RttiName);
+                 { for error recovery or compiler will crash later }
+                 hdef:=generrordef;
+               end;
              { restore stack }
              { restore stack }
              for i:=recstlist.count-1 downto 0 do
              for i:=recstlist.count-1 downto 0 do
                begin
                begin
@@ -1491,9 +1492,12 @@ implementation
 
 
              { types that use init/final are not allowed in variant parts, but
              { types that use init/final are not allowed in variant parts, but
                classes are allowed }
                classes are allowed }
-             if (variantrecordlevel>0) and
-                is_managed_type(hdef) then
-               Message(parser_e_cant_use_inittable_here);
+             if (variantrecordlevel>0) then
+               if is_managed_type(hdef) then
+                 Message(parser_e_cant_use_inittable_here)
+               else
+               if hdef.typ=undefineddef then
+                 Message(parser_e_cant_use_type_parameters_here);
 
 
              { try to parse the hint directives }
              { try to parse the hint directives }
              hintsymoptions:=[];
              hintsymoptions:=[];

+ 13 - 10
compiler/pexpr.pas

@@ -495,7 +495,7 @@ implementation
                    procvardef,
                    procvardef,
                    classrefdef : ;
                    classrefdef : ;
                    objectdef :
                    objectdef :
-                     if not is_class_or_interface_or_dispinterface_or_objc(p1.resultdef) then
+                     if not is_implicit_pointer_object_type(p1.resultdef) then
                        begin
                        begin
                          Message(parser_e_illegal_parameter_list);
                          Message(parser_e_illegal_parameter_list);
                          err:=true;
                          err:=true;
@@ -1395,7 +1395,7 @@ implementation
                if typeonly then
                if typeonly then
                  searchsym_type(pattern,srsym,srsymtable)
                  searchsym_type(pattern,srsym,srsymtable)
                else
                else
-               searchsym(pattern,srsym,srsymtable);
+                 searchsym(pattern,srsym,srsymtable);
 
 
                { handle unit specification like System.Writeln }
                { handle unit specification like System.Writeln }
                unit_found:=try_consume_unitsym(srsym,srsymtable,t);
                unit_found:=try_consume_unitsym(srsym,srsymtable,t);
@@ -1522,6 +1522,11 @@ implementation
                        if (hdef=cvarianttype) and
                        if (hdef=cvarianttype) and
                           not(cs_compilesystem in current_settings.moduleswitches) then
                           not(cs_compilesystem in current_settings.moduleswitches) then
                          current_module.flags:=current_module.flags or uf_uses_variants;
                          current_module.flags:=current_module.flags or uf_uses_variants;
+                       { if we get a generic then check that it is not an inline specialization }
+                       if (df_generic in hdef.defoptions) and
+                          (token=_LT) and
+                          (m_delphi in current_settings.modeswitches) then
+                          generate_specialization(hdef,false);
                        if try_to_consume(_LKLAMMER) then
                        if try_to_consume(_LKLAMMER) then
                         begin
                         begin
                           p1:=comp_expr(true,false);
                           p1:=comp_expr(true,false);
@@ -1541,7 +1546,7 @@ implementation
                              begin
                              begin
                                p1:=ctypenode.create(hdef);
                                p1:=ctypenode.create(hdef);
                                { search also in inherited methods }
                                { search also in inherited methods }
-                               searchsym_in_class(tobjectdef(hdef),current_objectdef,pattern,srsym,srsymtable);
+                               searchsym_in_class(tobjectdef(hdef),tobjectdef(current_structdef),pattern,srsym,srsymtable);
                                if assigned(srsym) then
                                if assigned(srsym) then
                                  check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
                                  check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
                                consume(_ID);
                                consume(_ID);
@@ -2369,12 +2374,12 @@ implementation
                     assigned(current_structdef) and
                     assigned(current_structdef) and
                     (current_structdef.typ=objectdef) then
                     (current_structdef.typ=objectdef) then
                   begin
                   begin
-                    hclassdef:=current_objectdef.childof;
+                    hclassdef:=tobjectdef(current_structdef).childof;
                     { Objective-C categories *replace* methods in the class
                     { Objective-C categories *replace* methods in the class
                       they extend, or add methods to it. So calling an
                       they extend, or add methods to it. So calling an
                       inherited method always calls the method inherited from
                       inherited method always calls the method inherited from
                       the parent of the extended class }
                       the parent of the extended class }
-                    if is_objccategory(current_objectdef) then
+                    if is_objccategory(current_structdef) then
                       hclassdef:=hclassdef.childof;
                       hclassdef:=hclassdef.childof;
                     { if inherited; only then we need the method with
                     { if inherited; only then we need the method with
                       the same name }
                       the same name }
@@ -2393,7 +2398,7 @@ implementation
                         if (po_msgstr in pd.procoptions) then
                         if (po_msgstr in pd.procoptions) then
                           searchsym_in_class_by_msgstr(hclassdef,pd.messageinf.str^,srsym,srsymtable)
                           searchsym_in_class_by_msgstr(hclassdef,pd.messageinf.str^,srsym,srsymtable)
                        else
                        else
-                         searchsym_in_class(hclassdef,current_objectdef,hs,srsym,srsymtable);
+                         searchsym_in_class(hclassdef,tobjectdef(current_structdef),hs,srsym,srsymtable);
                      end
                      end
                     else
                     else
                      begin
                      begin
@@ -2401,7 +2406,7 @@ implementation
                        hsorg:=orgpattern;
                        hsorg:=orgpattern;
                        consume(_ID);
                        consume(_ID);
                        anon_inherited:=false;
                        anon_inherited:=false;
-                       searchsym_in_class(hclassdef,current_objectdef,hs,srsym,srsymtable);
+                       searchsym_in_class(hclassdef,tobjectdef(current_structdef),hs,srsym,srsymtable);
                      end;
                      end;
                     if assigned(srsym) then
                     if assigned(srsym) then
                      begin
                      begin
@@ -2660,9 +2665,7 @@ implementation
                begin
                begin
                  consume(_PLUS);
                  consume(_PLUS);
                  p1:=factor(false,false);
                  p1:=factor(false,false);
-                 { we must generate a new node to do 0+<p1> otherwise the + will
-                   not be checked }
-                 p1:=caddnode.create(addn,genintconstnode(0),p1);
+                 p1:=cunaryplusnode.create(p1);
                end;
                end;
 
 
              _MINUS :
              _MINUS :

+ 2 - 0
compiler/powerpc/nppcmat.pas

@@ -576,6 +576,8 @@ end;
            end
            end
          else
          else
            begin
            begin
+              if left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF] then
+                location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
               location_copy(location,left.location);
               location_copy(location,left.location);
               location.loc:=LOC_REGISTER;
               location.loc:=LOC_REGISTER;
               case left.location.loc of
               case left.location.loc of

+ 2 - 0
compiler/powerpc64/nppcmat.pas

@@ -316,6 +316,8 @@ var
 begin
 begin
   secondpass(left);
   secondpass(left);
   begin
   begin
+    if left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF] then
+      location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
     location_copy(location, left.location);
     location_copy(location, left.location);
     location.loc := LOC_REGISTER;
     location.loc := LOC_REGISTER;
     case left.location.loc of
     case left.location.loc of

+ 1 - 1
compiler/ppu.pas

@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 {$endif Test_Double_checksum}
 
 
 const
 const
-  CurrentPPUVersion = 123;
+  CurrentPPUVersion = 126;
 
 
 { buffer sizes }
 { buffer sizes }
   maxentrysize = 1024;
   maxentrysize = 1024;

+ 2 - 2
compiler/pstatmnt.pas

@@ -597,8 +597,8 @@ implementation
                     p:=ctemprefnode.create(calltempnode);
                     p:=ctemprefnode.create(calltempnode);
                     typecheckpass(p);
                     typecheckpass(p);
                   end;
                   end;
-                { classes and interfaces have implicit dereferencing }
-                hasimplicitderef:=is_class_or_interface_or_dispinterface_or_objc(p.resultdef) or
+                { several object types have implicit dereferencing }
+                hasimplicitderef:=is_implicit_pointer_object_type(p.resultdef) or
                                   (p.resultdef.typ = classrefdef);
                                   (p.resultdef.typ = classrefdef);
                 if hasimplicitderef then
                 if hasimplicitderef then
                   hdef:=p.resultdef
                   hdef:=p.resultdef

+ 18 - 18
compiler/psub.pas

@@ -298,7 +298,7 @@ implementation
                 if is_class(current_structdef) then
                 if is_class(current_structdef) then
                   begin
                   begin
                     include(current_procinfo.flags,pi_needs_implicit_finally);
                     include(current_procinfo.flags,pi_needs_implicit_finally);
-                    srsym:=search_struct_member(current_objectdef,'NEWINSTANCE');
+                    srsym:=search_struct_member(current_structdef,'NEWINSTANCE');
                     if assigned(srsym) and
                     if assigned(srsym) and
                        (srsym.typ=procsym) then
                        (srsym.typ=procsym) then
                       begin
                       begin
@@ -328,7 +328,7 @@ implementation
                         that memory was allocated }
                         that memory was allocated }
                       { parameter 1 : self pointer }
                       { parameter 1 : self pointer }
                       para:=ccallparanode.create(
                       para:=ccallparanode.create(
-                                cordconstnode.create(current_objectdef.vmt_offset,s32inttype,false),
+                                cordconstnode.create(tobjectdef(current_structdef).vmt_offset,s32inttype,false),
                             ccallparanode.create(
                             ccallparanode.create(
                                 ctypeconvnode.create_internal(
                                 ctypeconvnode.create_internal(
                                     load_vmt_pointer_node,
                                     load_vmt_pointer_node,
@@ -363,7 +363,7 @@ implementation
             if (current_procinfo.procdef.proctypeoption=potype_destructor) and
             if (current_procinfo.procdef.proctypeoption=potype_destructor) and
                is_class(current_structdef) then
                is_class(current_structdef) then
               begin
               begin
-                srsym:=search_struct_member(current_objectdef,'BEFOREDESTRUCTION');
+                srsym:=search_struct_member(current_structdef,'BEFOREDESTRUCTION');
                 if assigned(srsym) and
                 if assigned(srsym) and
                    (srsym.typ=procsym) then
                    (srsym.typ=procsym) then
                   begin
                   begin
@@ -410,7 +410,7 @@ implementation
               begin
               begin
                 if is_class(current_structdef) then
                 if is_class(current_structdef) then
                   begin
                   begin
-                    srsym:=search_struct_member(current_objectdef,'FREEINSTANCE');
+                    srsym:=search_struct_member(current_structdef,'FREEINSTANCE');
                     if assigned(srsym) and
                     if assigned(srsym) and
                        (srsym.typ=procsym) then
                        (srsym.typ=procsym) then
                       begin
                       begin
@@ -435,7 +435,7 @@ implementation
                   if is_object(current_structdef) then
                   if is_object(current_structdef) then
                     begin
                     begin
                       { finalize object data, but only if not in inherited call }
                       { finalize object data, but only if not in inherited call }
-                      if is_managed_type(current_objectdef) then
+                      if is_managed_type(current_structdef) then
                         begin
                         begin
                           addstatement(newstatement,cifnode.create(
                           addstatement(newstatement,cifnode.create(
                             caddnode.create(unequaln,
                             caddnode.create(unequaln,
@@ -448,7 +448,7 @@ implementation
                       { parameter 2 : pointer to vmt }
                       { parameter 2 : pointer to vmt }
                       { parameter 1 : self pointer }
                       { parameter 1 : self pointer }
                       para:=ccallparanode.create(
                       para:=ccallparanode.create(
-                                cordconstnode.create(current_objectdef.vmt_offset,s32inttype,false),
+                                cordconstnode.create(tobjectdef(current_structdef).vmt_offset,s32inttype,false),
                             ccallparanode.create(
                             ccallparanode.create(
                                 ctypeconvnode.create_internal(
                                 ctypeconvnode.create_internal(
                                     load_vmt_pointer_node,
                                     load_vmt_pointer_node,
@@ -615,7 +615,7 @@ implementation
             { call AfterConstruction for classes }
             { call AfterConstruction for classes }
             if is_class(current_structdef) then
             if is_class(current_structdef) then
               begin
               begin
-                srsym:=search_struct_member(current_objectdef,'AFTERCONSTRUCTION');
+                srsym:=search_struct_member(current_structdef,'AFTERCONSTRUCTION');
                 if assigned(srsym) and
                 if assigned(srsym) and
                    (srsym.typ=procsym) then
                    (srsym.typ=procsym) then
                   begin
                   begin
@@ -643,11 +643,11 @@ implementation
                   internalerror(200305106);
                   internalerror(200305106);
               end;
               end;
 
 
-            if withexceptblock then
+            if withexceptblock and (current_structdef.typ=objectdef) then
               begin
               begin
                 { Generate the implicit "fail" code for a constructor (destroy
                 { Generate the implicit "fail" code for a constructor (destroy
                   in case an exception happened) }
                   in case an exception happened) }
-                pd:=current_objectdef.find_destructor;
+                pd:=tobjectdef(current_structdef).find_destructor;
                 { this will always be the case for classes, since tobject has
                 { this will always be the case for classes, since tobject has
                   a destructor }
                   a destructor }
                 if assigned(pd) then
                 if assigned(pd) then
@@ -1390,7 +1390,7 @@ implementation
          st : TSymtable;
          st : TSymtable;
          old_current_structdef: tabstractrecorddef;
          old_current_structdef: tabstractrecorddef;
          old_current_genericdef,
          old_current_genericdef,
-         old_current_specializedef : tobjectdef;
+         old_current_specializedef: tstoreddef;
       begin
       begin
          old_current_procinfo:=current_procinfo;
          old_current_procinfo:=current_procinfo;
          old_block_type:=block_type;
          old_block_type:=block_type;
@@ -1401,9 +1401,9 @@ implementation
          current_procinfo:=self;
          current_procinfo:=self;
          current_structdef:=procdef.struct;
          current_structdef:=procdef.struct;
          if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
          if assigned(current_structdef) and (df_generic in current_structdef.defoptions) then
-           current_genericdef:=tobjectdef(current_structdef);
+           current_genericdef:=current_structdef;
          if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
          if assigned(current_structdef) and (df_specialization in current_structdef.defoptions) then
-           current_specializedef:=tobjectdef(current_structdef);
+           current_specializedef:=current_structdef;
 
 
          { calculate the lexical level }
          { calculate the lexical level }
          if procdef.parast.symtablelevel>maxnesting then
          if procdef.parast.symtablelevel>maxnesting then
@@ -1657,7 +1657,7 @@ implementation
         old_current_procinfo : tprocinfo;
         old_current_procinfo : tprocinfo;
         old_current_structdef: tabstractrecorddef;
         old_current_structdef: tabstractrecorddef;
         old_current_genericdef,
         old_current_genericdef,
-        old_current_specializedef : tobjectdef;
+        old_current_specializedef: tstoreddef;
         pdflags    : tpdflags;
         pdflags    : tpdflags;
         pd,firstpd : tprocdef;
         pd,firstpd : tprocdef;
         s          : string;
         s          : string;
@@ -1984,20 +1984,20 @@ implementation
         oldsymtablestack   : tsymtablestack;
         oldsymtablestack   : tsymtablestack;
         pu : tused_unit;
         pu : tused_unit;
         hmodule : tmodule;
         hmodule : tmodule;
-        specobj : tobjectdef;
+        specobj : tabstractrecorddef;
       begin
       begin
         if not((tsym(p).typ=typesym) and
         if not((tsym(p).typ=typesym) and
                (ttypesym(p).typedef.typesym=tsym(p)) and
                (ttypesym(p).typedef.typesym=tsym(p)) and
-               (ttypesym(p).typedef.typ=objectdef) and
+               (ttypesym(p).typedef.typ in [objectdef,recorddef]) and
                (df_specialization in ttypesym(p).typedef.defoptions)
                (df_specialization in ttypesym(p).typedef.defoptions)
               ) then
               ) then
           exit;
           exit;
 
 
         { Setup symtablestack a definition time }
         { Setup symtablestack a definition time }
-        specobj:=tobjectdef(ttypesym(p).typedef);
+        specobj:=tabstractrecorddef(ttypesym(p).typedef);
         oldsymtablestack:=symtablestack;
         oldsymtablestack:=symtablestack;
         symtablestack:=tsymtablestack.create;
         symtablestack:=tsymtablestack.create;
-        if not assigned(tobjectdef(ttypesym(p).typedef).genericdef) then
+        if not assigned(specobj.genericdef) then
           internalerror(200705151);
           internalerror(200705151);
         hmodule:=find_module_from_symtable(specobj.genericdef.owner);
         hmodule:=find_module_from_symtable(specobj.genericdef.owner);
         if hmodule=nil then
         if hmodule=nil then
@@ -2016,7 +2016,7 @@ implementation
           symtablestack.push(hmodule.localsymtable);
           symtablestack.push(hmodule.localsymtable);
 
 
         { procedure definitions for classes or objects }
         { procedure definitions for classes or objects }
-        if is_class_or_object(specobj) then
+        if is_class_or_object(specobj) or is_record(specobj) then
           begin
           begin
             for i:=0 to specobj.symtable.DefList.Count-1 do
             for i:=0 to specobj.symtable.DefList.Count-1 do
               begin
               begin

+ 1 - 0
compiler/psystem.pas

@@ -506,6 +506,7 @@ implementation
         nodeclass[callparan]:=ccallparanode;
         nodeclass[callparan]:=ccallparanode;
         nodeclass[realconstn]:=crealconstnode;
         nodeclass[realconstn]:=crealconstnode;
         nodeclass[unaryminusn]:=cunaryminusnode;
         nodeclass[unaryminusn]:=cunaryminusnode;
+        nodeclass[unaryplusn]:=cunaryplusnode;
         nodeclass[asmn]:=casmnode;
         nodeclass[asmn]:=casmnode;
         nodeclass[vecn]:=cvecnode;
         nodeclass[vecn]:=cvecnode;
         nodeclass[pointerconstn]:=cpointerconstnode;
         nodeclass[pointerconstn]:=cpointerconstnode;

+ 2 - 2
compiler/ptconst.pas

@@ -1275,8 +1275,8 @@ implementation
               exit;
               exit;
             end;
             end;
 
 
-          { only allow nil for class and interface }
-          if is_class_or_interface_or_dispinterface_or_objc(def) then
+          { only allow nil for implicit pointer object types }
+          if is_implicit_pointer_object_type(def) then
             begin
             begin
               n:=comp_expr(true,false);
               n:=comp_expr(true,false);
               if n.nodetype<>niln then
               if n.nodetype<>niln then

+ 266 - 128
compiler/ptype.pas

@@ -29,10 +29,9 @@ interface
        globtype,cclasses,
        globtype,cclasses,
        symtype,symdef,symbase;
        symtype,symdef,symbase;
 
 
-    var
-       { hack, which allows to use the current parsed }
-       { object type as function argument type  }
-       testcurobject : byte;
+    type
+      TSingleTypeOption=(stoIsForwardDef,stoAllowTypeDef,stoParseClassParent);
+      TSingleTypeOptions=set of TSingleTypeOption;
 
 
     procedure resolve_forward_types;
     procedure resolve_forward_types;
 
 
@@ -40,7 +39,7 @@ interface
     procedure id_type(var def : tdef;isforwarddef:boolean);
     procedure id_type(var def : tdef;isforwarddef:boolean);
 
 
     { reads a string, file type or a type identifier }
     { reads a string, file type or a type identifier }
-    procedure single_type(var def:tdef;isforwarddef,allowtypedef:boolean);
+    procedure single_type(var def:tdef;options:TSingleTypeOptions);
 
 
     { reads any type declaration, where the resulting type will get name as type identifier }
     { reads any type declaration, where the resulting type will get name as type identifier }
     procedure read_named_type(var def:tdef;const name : TIDString;genericdef:tstoreddef;genericlist:TFPObjectList;parseprocvardir:boolean);
     procedure read_named_type(var def:tdef;const name : TIDString;genericdef:tstoreddef;genericlist:TFPObjectList;parseprocvardir:boolean);
@@ -51,6 +50,7 @@ interface
     { generate persistent type information like VMT, RTTI and inittables }
     { generate persistent type information like VMT, RTTI and inittables }
     procedure write_persistent_type_info(st:tsymtable);
     procedure write_persistent_type_info(st:tsymtable);
 
 
+    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean);
 
 
 implementation
 implementation
 
 
@@ -141,7 +141,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure generate_specialization(var tt:tdef);
+    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean);
       var
       var
         st  : TSymtable;
         st  : TSymtable;
         srsym : tsym;
         srsym : tsym;
@@ -182,6 +182,8 @@ implementation
               of generic and specialization might not be equally sized which
               of generic and specialization might not be equally sized which
               is later assumed }
               is later assumed }
             tt:=tundefineddef.create;
             tt:=tundefineddef.create;
+            if parse_class_parent then
+              tt:=genericdef;
             onlyparsepara:=true;
             onlyparsepara:=true;
           end;
           end;
 
 
@@ -198,21 +200,26 @@ implementation
             exit;
             exit;
           end;
           end;
 
 
-        consume(_LSHARPBRACKET);
+        if not try_to_consume(_LT) then
+          consume(_LSHARPBRACKET);
         { Parse generic parameters, for each undefineddef in the symtable of
         { Parse generic parameters, for each undefineddef in the symtable of
           the genericdef we need to have a new def }
           the genericdef we need to have a new def }
         err:=false;
         err:=false;
         first:=true;
         first:=true;
         generictypelist:=TFPObjectList.create(false);
         generictypelist:=TFPObjectList.create(false);
         case genericdef.typ of
         case genericdef.typ of
-          procdef :
+          procdef:
             st:=genericdef.GetSymtable(gs_para);
             st:=genericdef.GetSymtable(gs_para);
           objectdef,
           objectdef,
-          recorddef :
+          recorddef:
             st:=genericdef.GetSymtable(gs_record);
             st:=genericdef.GetSymtable(gs_record);
+          arraydef:
+            st:=tarraydef(genericdef).symtable;
+          procvardef:
+            st:=genericdef.GetSymtable(gs_para);
+          else
+            internalerror(200511182);
         end;
         end;
-        if not assigned(st) then
-          internalerror(200511182);
 
 
         { Parse type parameters }
         { Parse type parameters }
         if not assigned(genericdef.typesym) then
         if not assigned(genericdef.typesym) then
@@ -249,7 +256,7 @@ implementation
           end;
           end;
         uspecializename:=upper(specializename);
         uspecializename:=upper(specializename);
         { force correct error location if too much type parameters are passed }
         { force correct error location if too much type parameters are passed }
-        if token<>_RSHARPBRACKET then
+        if not (token in [_RSHARPBRACKET,_GT]) then
           consume(_RSHARPBRACKET);
           consume(_RSHARPBRACKET);
 
 
         { Special case if we are referencing the current defined object }
         { Special case if we are referencing the current defined object }
@@ -322,17 +329,31 @@ implementation
                 read_named_type(tt,specializename,genericdef,generictypelist,false);
                 read_named_type(tt,specializename,genericdef,generictypelist,false);
                 ttypesym(srsym).typedef:=tt;
                 ttypesym(srsym).typedef:=tt;
                 tt.typesym:=srsym;
                 tt.typesym:=srsym;
+
+                case tt.typ of
+                  { Build VMT indexes for classes }
+                  objectdef:
+                    begin
+                      vmtbuilder:=TVMTBuilder.Create(tobjectdef(tt));
+                      vmtbuilder.generate_vmt;
+                      vmtbuilder.free;
+                    end;
+                  { handle params, calling convention, etc }
+                  procvardef:
+                    begin
+                      if not check_proc_directive(true) then
+                        begin
+                          try_consume_hintdirective(ttypesym(srsym).symoptions,ttypesym(srsym).deprecatedmsg);
+                          consume(_SEMICOLON);
+                        end;
+                      parse_var_proc_directives(ttypesym(srsym));
+                      handle_calling_convention(tprocvardef(tt));
+                      if try_consume_hintdirective(ttypesym(srsym).symoptions,ttypesym(srsym).deprecatedmsg) then
+                        consume(_SEMICOLON);
+                    end;
+                end;
                 { Consume the semicolon if it is also recorded }
                 { Consume the semicolon if it is also recorded }
                 try_to_consume(_SEMICOLON);
                 try_to_consume(_SEMICOLON);
-
-
-                { Build VMT indexes for classes }
-                if (tt.typ=objectdef) then
-                  begin
-                    vmtbuilder:=TVMTBuilder.Create(tobjectdef(tt));
-                    vmtbuilder.generate_vmt;
-                    vmtbuilder.free;
-                  end;
               end;
               end;
 
 
             { Restore symtablestack }
             { Restore symtablestack }
@@ -358,7 +379,8 @@ implementation
           end;
           end;
 
 
         generictypelist.free;
         generictypelist.free;
-        consume(_RSHARPBRACKET);
+        if not try_to_consume(_GT) then
+          consume(_RSHARPBRACKET);
       end;
       end;
 
 
 
 
@@ -382,18 +404,14 @@ implementation
             - classes can be used also in classes
             - classes can be used also in classes
             - objects can be parameters }
             - objects can be parameters }
          structdef:=current_structdef;
          structdef:=current_structdef;
-         while Assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
+         while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
            begin
            begin
-             if (structdef.objname^=pattern) and
-                (
-                  (testcurobject=2) or
-                  is_class_or_interface_or_objc(structdef)
-                ) then
-                begin
-                  consume(_ID);
-                  def:=structdef;
-                  exit;
-                end;
+             if (structdef.objname^=pattern) then
+               begin
+                 consume(_ID);
+                 def:=structdef;
+                 exit;
+               end;
              structdef:=tabstractrecorddef(structdef.owner.defowner);
              structdef:=tabstractrecorddef(structdef.owner.defowner);
            end;
            end;
          { Use the special searchsym_type that ignores records and parameters }
          { Use the special searchsym_type that ignores records and parameters }
@@ -445,7 +463,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure single_type(var def:tdef;isforwarddef,allowtypedef:boolean);
+    procedure single_type(var def:tdef;options:TSingleTypeOptions);
        var
        var
          t2 : tdef;
          t2 : tdef;
          dospecialize,
          dospecialize,
@@ -456,17 +474,17 @@ implementation
            again:=false;
            again:=false;
              case token of
              case token of
                _STRING:
                _STRING:
-                 string_dec(def,allowtypedef);
+                 string_dec(def,stoAllowTypeDef in options);
 
 
                _FILE:
                _FILE:
                  begin
                  begin
                     consume(_FILE);
                     consume(_FILE);
                     if (token=_OF) then
                     if (token=_OF) then
                       begin
                       begin
-                         if not(allowtypedef) then
+                         if not(stoAllowTypeDef in options) then
                            Message(parser_e_no_local_para_def);
                            Message(parser_e_no_local_para_def);
                          consume(_OF);
                          consume(_OF);
-                         single_type(t2,false,false);
+                         single_type(t2,[]);
                          if is_managed_type(t2) then
                          if is_managed_type(t2) then
                            Message(parser_e_no_refcounted_typed_file);
                            Message(parser_e_no_refcounted_typed_file);
                          def:=tfiledef.createtyped(t2);
                          def:=tfiledef.createtyped(t2);
@@ -479,7 +497,7 @@ implementation
                  begin
                  begin
                    if try_to_consume(_SPECIALIZE) then
                    if try_to_consume(_SPECIALIZE) then
                      begin
                      begin
-                       if not(allowtypedef) then
+                       if not(stoAllowTypeDef in options) then
                          begin
                          begin
                            Message(parser_e_no_local_para_def);
                            Message(parser_e_no_local_para_def);
 
 
@@ -496,7 +514,7 @@ implementation
                      end
                      end
                    else
                    else
                      begin
                      begin
-                       id_type(def,isforwarddef);
+                       id_type(def,stoIsForwardDef in options);
                        { handle types inside classes, e.g. TNode.TLongint }
                        { handle types inside classes, e.g. TNode.TLongint }
                        while (token=_POINT) do
                        while (token=_POINT) do
                          begin
                          begin
@@ -509,7 +527,7 @@ implementation
                               begin
                               begin
                                 symtablestack.push(tabstractrecorddef(def).symtable);
                                 symtablestack.push(tabstractrecorddef(def).symtable);
                                 consume(_POINT);
                                 consume(_POINT);
-                                id_type(t2,isforwarddef);
+                                id_type(t2,stoIsForwardDef in options);
                                 symtablestack.pop(tabstractrecorddef(def).symtable);
                                 symtablestack.pop(tabstractrecorddef(def).symtable);
                                 def:=t2;
                                 def:=t2;
                               end
                               end
@@ -526,8 +544,10 @@ implementation
                  end;
                  end;
             end;
             end;
         until not again;
         until not again;
+        if (stoAllowTypeDef in options)and(m_delphi in current_settings.modeswitches) then
+          dospecialize:=token=_LSHARPBRACKET;
         if dospecialize then
         if dospecialize then
-          generate_specialization(def)
+          generate_specialization(def,stoParseClassParent in options)
         else
         else
           begin
           begin
             if assigned(current_specializedef) and (def=current_specializedef.genericdef) then
             if assigned(current_specializedef) and (def=current_specializedef.genericdef) then
@@ -583,7 +603,6 @@ implementation
           Exit;
           Exit;
 
 
         current_structdef.symtable.currentvisibility:=vis_public;
         current_structdef.symtable.currentvisibility:=vis_public;
-        testcurobject:=1;
         fields_allowed:=true;
         fields_allowed:=true;
         is_classdef:=false;
         is_classdef:=false;
         classfields:=false;
         classfields:=false;
@@ -842,17 +861,24 @@ implementation
               consume(_ID); { Give a ident expected message, like tp7 }
               consume(_ID); { Give a ident expected message, like tp7 }
           end;
           end;
         until false;
         until false;
-
-        testcurobject:=0;
       end;
       end;
 
 
     { reads a record declaration }
     { reads a record declaration }
-    function record_dec(const n:tidstring):tdef;
+    function record_dec(const n:tidstring;genericdef:tstoreddef;genericlist:TFPObjectList):tdef;
       var
       var
-         old_current_structdef : tabstractrecorddef;
-         recst : trecordsymtable;
+         old_current_structdef: tabstractrecorddef;
+         old_current_genericdef,
+         old_current_specializedef: tstoreddef;
+         old_parse_generic: boolean;
+         recst: trecordsymtable;
       begin
       begin
          old_current_structdef:=current_structdef;
          old_current_structdef:=current_structdef;
+         old_current_genericdef:=current_genericdef;
+         old_current_specializedef:=current_specializedef;
+         old_parse_generic:=parse_generic;
+
+         current_genericdef:=nil;
+         current_specializedef:=nil;
          { create recdef }
          { create recdef }
          recst:=trecordsymtable.create(n,current_settings.packrecords);
          recst:=trecordsymtable.create(n,current_settings.packrecords);
          current_structdef:=trecorddef.create(n,recst);
          current_structdef:=trecorddef.create(n,recst);
@@ -861,20 +887,34 @@ implementation
          symtablestack.push(recst);
          symtablestack.push(recst);
          { parse record }
          { parse record }
          consume(_RECORD);
          consume(_RECORD);
-         if m_extended_records in current_settings.modeswitches then
+
+         { usage of specialized type inside its generic template }
+         if assigned(genericdef) then
+           current_specializedef:=current_structdef
+         { reject declaration of generic class inside generic class }
+         else if assigned(genericlist) then
+           current_genericdef:=current_structdef;
+
+         insert_generic_parameter_types(current_structdef,genericdef,genericlist);
+         parse_generic:=(df_generic in current_structdef.defoptions);
+         if m_advanced_records in current_settings.modeswitches then
            parse_record_members
            parse_record_members
          else
          else
            begin
            begin
-         read_record_fields([vd_record]);
-         consume(_END);
-           end;
+             read_record_fields([vd_record]);
+             consume(_END);
+            end;
          { make the record size aligned }
          { make the record size aligned }
          recst.addalignmentpadding;
          recst.addalignmentpadding;
          { restore symtable stack }
          { restore symtable stack }
          symtablestack.pop(recst);
          symtablestack.pop(recst);
          if trecorddef(current_structdef).is_packed and is_managed_type(current_structdef) then
          if trecorddef(current_structdef).is_packed and is_managed_type(current_structdef) then
            Message(type_e_no_packed_inittable);
            Message(type_e_no_packed_inittable);
+         { restore old state }
+         parse_generic:=old_parse_generic;
          current_structdef:=old_current_structdef;
          current_structdef:=old_current_structdef;
+         current_genericdef:=old_current_genericdef;
+         current_specializedef:=old_current_specializedef;
       end;
       end;
 
 
 
 
@@ -895,7 +935,7 @@ implementation
            lv,hv   : TConstExprInt;
            lv,hv   : TConstExprInt;
            old_block_type : tblock_type;
            old_block_type : tblock_type;
            dospecialize : boolean;
            dospecialize : boolean;
-           structdef: TDef;
+           structdef: tabstractrecorddef;
         begin
         begin
            old_block_type:=block_type;
            old_block_type:=block_type;
            dospecialize:=false;
            dospecialize:=false;
@@ -905,24 +945,19 @@ implementation
            if (token=_ID) then
            if (token=_ID) then
              begin
              begin
                structdef:=current_structdef;
                structdef:=current_structdef;
-               while Assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
+               while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
                  begin
                  begin
-                   if (tabstractrecorddef(structdef).objname^=pattern) and
-                      (
-                        (testcurobject=2) or
-                        is_class_or_interface_or_objc(structdef)
-                      ) then
-                      begin
-                        consume(_ID);
-                        def:=structdef;
-                        exit;
-                      end;
-                   structdef:=tdef(tabstractrecorddef(structdef).owner.defowner);
+                   if (structdef.objname^=pattern) then
+                     begin
+                       consume(_ID);
+                       def:=structdef;
+                       exit;
+                     end;
+                   structdef:=tabstractrecorddef(structdef.owner.defowner);
                  end;
                  end;
              end;
              end;
-           { Generate a specialization? }
-           if try_to_consume(_SPECIALIZE) then
-             dospecialize:=true;
+           { Generate a specialization in FPC mode? }
+           dospecialize:=not(m_delphi in current_settings.modeswitches) and try_to_consume(_SPECIALIZE);
            { we can't accept a equal in type }
            { we can't accept a equal in type }
            pt1:=comp_expr(false,true);
            pt1:=comp_expr(false,true);
            if not dospecialize and
            if not dospecialize and
@@ -978,8 +1013,11 @@ implementation
                if (pt1.nodetype=typen) then
                if (pt1.nodetype=typen) then
                  begin
                  begin
                    def:=ttypenode(pt1).resultdef;
                    def:=ttypenode(pt1).resultdef;
+                   { Delphi mode specialization? }
+                   if (m_delphi in current_settings.modeswitches) then
+                     dospecialize:=token=_LSHARPBRACKET;
                    if dospecialize then
                    if dospecialize then
-                     generate_specialization(def)
+                     generate_specialization(def,false)
                    else
                    else
                      begin
                      begin
                        if assigned(current_specializedef) and (def=current_specializedef.genericdef) then
                        if assigned(current_specializedef) and (def=current_specializedef.genericdef) then
@@ -1048,7 +1086,7 @@ implementation
         end;
         end;
 
 
 
 
-      procedure array_dec(is_packed: boolean);
+      procedure array_dec(is_packed:boolean;genericdef:tstoreddef;genericlist:TFPObjectList);
         var
         var
           lowval,
           lowval,
           highval   : TConstExprInt;
           highval   : TConstExprInt;
@@ -1091,7 +1129,17 @@ implementation
             end;
             end;
           end;
           end;
 
 
+        var
+          old_current_genericdef,
+          old_current_specializedef: tstoreddef;
+          old_parse_generic: boolean;
         begin
         begin
+           old_current_genericdef:=current_genericdef;
+           old_current_specializedef:=current_specializedef;
+           old_parse_generic:=parse_generic;
+
+           current_genericdef:=nil;
+           current_specializedef:=nil;
            arrdef:=nil;
            arrdef:=nil;
            consume(_ARRAY);
            consume(_ARRAY);
            { open array? }
            { open array? }
@@ -1187,43 +1235,165 @@ implementation
                 include(arrdef.arrayoptions,ado_IsDynamicArray);
                 include(arrdef.arrayoptions,ado_IsDynamicArray);
                 def:=arrdef;
                 def:=arrdef;
              end;
              end;
+           if assigned(arrdef) then
+             begin
+               { usage of specialized type inside its generic template }
+               if assigned(genericdef) then
+                 current_specializedef:=arrdef
+               { reject declaration of generic class inside generic class }
+               else if assigned(genericlist) then
+                 current_genericdef:=arrdef;
+               symtablestack.push(arrdef.symtable);
+               insert_generic_parameter_types(arrdef,genericdef,genericlist);
+               parse_generic:=(df_generic in arrdef.defoptions);
+             end;
            consume(_OF);
            consume(_OF);
            read_anon_type(tt2,true);
            read_anon_type(tt2,true);
            { set element type of the last array definition }
            { set element type of the last array definition }
            if assigned(arrdef) then
            if assigned(arrdef) then
              begin
              begin
+               symtablestack.pop(arrdef.symtable);
                arrdef.elementdef:=tt2;
                arrdef.elementdef:=tt2;
                if is_packed and
                if is_packed and
                   is_managed_type(tt2) then
                   is_managed_type(tt2) then
                  Message(type_e_no_packed_inittable);
                  Message(type_e_no_packed_inittable);
              end;
              end;
+           { restore old state }
+           parse_generic:=old_parse_generic;
+           current_genericdef:=old_current_genericdef;
+           current_specializedef:=old_current_specializedef;
         end;
         end;
 
 
+        function procvar_dec(genericdef:tstoreddef;genericlist:TFPObjectList):tdef;
+          var
+            is_func:boolean;
+            pd:tabstractprocdef;
+            newtype:ttypesym;
+            old_current_genericdef,
+            old_current_specializedef: tstoreddef;
+            old_parse_generic: boolean;
+          begin
+            old_current_genericdef:=current_genericdef;
+            old_current_specializedef:=current_specializedef;
+            old_parse_generic:=parse_generic;
+
+            current_genericdef:=nil;
+            current_specializedef:=nil;
+
+            is_func:=(token=_FUNCTION);
+            consume(token);
+            pd:=tprocvardef.create(normal_function_level);
+
+            { usage of specialized type inside its generic template }
+            if assigned(genericdef) then
+              current_specializedef:=pd
+            { reject declaration of generic class inside generic class }
+            else if assigned(genericlist) then
+              current_genericdef:=pd;
+            symtablestack.push(pd.parast);
+            insert_generic_parameter_types(pd,genericdef,genericlist);
+            parse_generic:=(df_generic in pd.defoptions);
+            { don't allow to add defs to the symtable - use it for type param search only }
+            tparasymtable(pd.parast).readonly:=true;
+
+            if token=_LKLAMMER then
+              parse_parameter_dec(pd);
+            if is_func then
+              begin
+                consume(_COLON);
+                single_type(pd.returndef,[]);
+              end;
+            if try_to_consume(_OF) then
+              begin
+                consume(_OBJECT);
+                include(pd.procoptions,po_methodpointer);
+              end
+            else if (m_nested_procvars in current_settings.modeswitches) and
+                    try_to_consume(_IS) then
+              begin
+                consume(_NESTED);
+                pd.parast.symtablelevel:=normal_function_level+1;
+                pd.check_mark_as_nested;
+              end;
+            symtablestack.pop(pd.parast);
+            tparasymtable(pd.parast).readonly:=false;
+            result:=pd;
+            { possible proc directives }
+            if parseprocvardir then
+              begin
+                if check_proc_directive(true) then
+                  begin
+                    newtype:=ttypesym.create('unnamed',result);
+                    parse_var_proc_directives(tsym(newtype));
+                    newtype.typedef:=nil;
+                    result.typesym:=nil;
+                    newtype.free;
+                  end;
+                { Add implicit hidden parameters and function result }
+                handle_calling_convention(pd);
+              end;
+            { restore old state }
+            parse_generic:=old_parse_generic;
+            current_genericdef:=old_current_genericdef;
+            current_specializedef:=old_current_specializedef;
+          end;
+
+      const
+        SingleTypeOptionsInTypeBlock:array[Boolean] of TSingleTypeOptions = ([],[stoIsForwardDef]);
       var
       var
         p  : tnode;
         p  : tnode;
         hdef : tdef;
         hdef : tdef;
-        pd : tabstractprocdef;
-        is_func,
-        enumdupmsg, first : boolean;
-        newtype : ttypesym;
+        enumdupmsg, first, is_specialize : boolean;
         oldlocalswitches : tlocalswitches;
         oldlocalswitches : tlocalswitches;
         bitpacking: boolean;
         bitpacking: boolean;
+        stitem: psymtablestackitem;
+        sym: tsym;
+        st: tsymtable;
       begin
       begin
          def:=nil;
          def:=nil;
          case token of
          case token of
             _STRING,_FILE:
             _STRING,_FILE:
               begin
               begin
-                single_type(def,false,true);
+                single_type(def,[stoAllowTypeDef]);
               end;
               end;
            _LKLAMMER:
            _LKLAMMER:
               begin
               begin
                 consume(_LKLAMMER);
                 consume(_LKLAMMER);
-                first := true;
+                first:=true;
                 { allow negativ value_str }
                 { allow negativ value_str }
                 l:=int64(-1);
                 l:=int64(-1);
                 enumdupmsg:=false;
                 enumdupmsg:=false;
-                aktenumdef:=tenumdef.create;
+                { check that we are not adding an enum from specialization
+                  we can't just use current_specializedef because of inner types
+                  like specialize array of record }
+                is_specialize:=false;
+                stitem:=symtablestack.stack;
+                while assigned(stitem) do
+                  begin
+                    { check records, classes and arrays because they can be specialized }
+                    if stitem^.symtable.symtabletype in [recordsymtable,ObjectSymtable,arraysymtable] then
+                      begin
+                        is_specialize:=is_specialize or (df_specialization in tstoreddef(stitem^.symtable.defowner).defoptions);
+                        stitem:=stitem^.next;
+                      end
+                    else
+                      break;
+                  end;
+                if not is_specialize then
+                  aktenumdef:=tenumdef.create
+                else
+                  aktenumdef:=nil;
                 repeat
                 repeat
+                  { if it is a specialization then search the first enum member
+                    and get the member owner instead of just created enumdef }
+                  if not assigned(aktenumdef) then
+                    begin
+                      searchsym(pattern,sym,st);
+                      if sym.typ=enumsym then
+                        aktenumdef:=tenumsym(sym).definition
+                      else
+                        internalerror(201101021);
+                    end;
                   s:=orgpattern;
                   s:=orgpattern;
                   defpos:=current_tokenpos;
                   defpos:=current_tokenpos;
                   consume(_ID);
                   consume(_ID);
@@ -1266,20 +1436,24 @@ implementation
                     end
                     end
                   else
                   else
                     inc(l.svalue);
                     inc(l.svalue);
-                  first := false;
-                  storepos:=current_tokenpos;
-                  current_tokenpos:=defpos;
-                  tenumsymtable(aktenumdef.symtable).insert(tenumsym.create(s,aktenumdef,longint(l.svalue)));
-                  if not (cs_scopedenums in current_settings.localswitches) then
-                    tstoredsymtable(aktenumdef.owner).insert(tenumsym.create(s,aktenumdef,longint(l.svalue)));
-                  current_tokenpos:=storepos;
+                  first:=false;
+                  { don't generate enum members is this is a specialization because aktenumdef is copied from the generic type }
+                  if not is_specialize then
+                    begin
+                      storepos:=current_tokenpos;
+                      current_tokenpos:=defpos;
+                      tenumsymtable(aktenumdef.symtable).insert(tenumsym.create(s,aktenumdef,longint(l.svalue)));
+                      if not (cs_scopedenums in current_settings.localswitches) then
+                        tstoredsymtable(aktenumdef.owner).insert(tenumsym.create(s,aktenumdef,longint(l.svalue)));
+                      current_tokenpos:=storepos;
+                    end;
                 until not try_to_consume(_COMMA);
                 until not try_to_consume(_COMMA);
                 def:=aktenumdef;
                 def:=aktenumdef;
                 consume(_RKLAMMER);
                 consume(_RKLAMMER);
               end;
               end;
             _ARRAY:
             _ARRAY:
               begin
               begin
-                array_dec(false);
+                array_dec(false,genericdef,genericlist);
               end;
               end;
             _SET:
             _SET:
               begin
               begin
@@ -1288,14 +1462,14 @@ implementation
            _CARET:
            _CARET:
               begin
               begin
                 consume(_CARET);
                 consume(_CARET);
-                single_type(tt2,(block_type=bt_type),false);
+                single_type(tt2,SingleTypeOptionsInTypeBlock[block_type=bt_type]);
                 def:=tpointerdef.create(tt2);
                 def:=tpointerdef.create(tt2);
                 if tt2.typ=forwarddef then
                 if tt2.typ=forwarddef then
                   current_module.checkforwarddefs.add(def);
                   current_module.checkforwarddefs.add(def);
               end;
               end;
             _RECORD:
             _RECORD:
               begin
               begin
-                def:=record_dec(name);
+                def:=record_dec(name,genericdef,genericlist);
               end;
               end;
             _PACKED,
             _PACKED,
             _BITPACKED:
             _BITPACKED:
@@ -1305,11 +1479,11 @@ implementation
                   (token = _BITPACKED);
                   (token = _BITPACKED);
                 consume(token);
                 consume(token);
                 if token=_ARRAY then
                 if token=_ARRAY then
-                  array_dec(bitpacking)
+                  array_dec(bitpacking,genericdef,genericlist)
                 else if token=_SET then
                 else if token=_SET then
                   set_dec
                   set_dec
                 else if token=_FILE then
                 else if token=_FILE then
-                  single_type(def,false,true)
+                  single_type(def,[stoAllowTypeDef])
                 else
                 else
                   begin
                   begin
                     oldpackrecords:=current_settings.packrecords;
                     oldpackrecords:=current_settings.packrecords;
@@ -1330,7 +1504,7 @@ implementation
                           def:=object_dec(odt_object,name,genericdef,genericlist,nil);
                           def:=object_dec(odt_object,name,genericdef,genericlist,nil);
                         end;
                         end;
                       else
                       else
-                        def:=record_dec(name);
+                        def:=record_dec(name,genericdef,genericlist);
                     end;
                     end;
                     current_settings.packrecords:=oldpackrecords;
                     current_settings.packrecords:=oldpackrecords;
                   end;
                   end;
@@ -1355,7 +1529,7 @@ implementation
                    ) then
                    ) then
                   begin
                   begin
                     consume(_OF);
                     consume(_OF);
-                    single_type(hdef,(block_type=bt_type),false);
+                    single_type(hdef,SingleTypeOptionsInTypeBlock[block_type=bt_type]);
                     if is_class(hdef) or
                     if is_class(hdef) or
                        is_objcclass(hdef) then
                        is_objcclass(hdef) then
                       def:=tclassrefdef.create(hdef)
                       def:=tclassrefdef.create(hdef)
@@ -1427,49 +1601,13 @@ implementation
             _PROCEDURE,
             _PROCEDURE,
             _FUNCTION:
             _FUNCTION:
               begin
               begin
-                is_func:=(token=_FUNCTION);
-                consume(token);
-                pd:=tprocvardef.create(normal_function_level);
-                if token=_LKLAMMER then
-                  parse_parameter_dec(pd);
-                if is_func then
-                 begin
-                   consume(_COLON);
-                   single_type(pd.returndef,false,false);
-                 end;
-                if try_to_consume(_OF) then
-                  begin
-                    consume(_OBJECT);
-                    include(pd.procoptions,po_methodpointer);
-                  end
-                else if (m_nested_procvars in current_settings.modeswitches) and
-                        try_to_consume(_IS) then
-                  begin
-                    consume(_NESTED);
-                    pd.parast.symtablelevel:=normal_function_level+1;
-                    pd.check_mark_as_nested;
-                  end;
-                def:=pd;
-                { possible proc directives }
-                if parseprocvardir then
-                  begin
-                    if check_proc_directive(true) then
-                      begin
-                         newtype:=ttypesym.create('unnamed',def);
-                         parse_var_proc_directives(tsym(newtype));
-                         newtype.typedef:=nil;
-                         def.typesym:=nil;
-                         newtype.free;
-                      end;
-                    { Add implicit hidden parameters and function result }
-                    handle_calling_convention(pd);
-                  end;
+                def:=procvar_dec(genericdef,genericlist);
               end;
               end;
             else
             else
               if (token=_KLAMMERAFFE) and (m_iso in current_settings.modeswitches) then
               if (token=_KLAMMERAFFE) and (m_iso in current_settings.modeswitches) then
                 begin
                 begin
                   consume(_KLAMMERAFFE);
                   consume(_KLAMMERAFFE);
-                  single_type(tt2,(block_type=bt_type),false);
+                  single_type(tt2,SingleTypeOptionsInTypeBlock[block_type=bt_type]);
                   def:=tpointerdef.create(tt2);
                   def:=tpointerdef.create(tt2);
                   if tt2.typ=forwarddef then
                   if tt2.typ=forwarddef then
                     current_module.checkforwarddefs.add(def);
                     current_module.checkforwarddefs.add(def);

+ 2 - 2
compiler/rautils.pas

@@ -696,7 +696,7 @@ end;
 Function TOperand.SetupSelf:boolean;
 Function TOperand.SetupSelf:boolean;
 Begin
 Begin
   SetupSelf:=false;
   SetupSelf:=false;
-  if assigned(current_objectdef) then
+  if assigned(current_structdef) then
     SetupSelf:=setupvar('self',false)
     SetupSelf:=setupvar('self',false)
   else
   else
     Message(asmr_e_cannot_use_SELF_outside_a_method);
     Message(asmr_e_cannot_use_SELF_outside_a_method);
@@ -1307,7 +1307,7 @@ Begin
   base:=Copy(s,1,i-1);
   base:=Copy(s,1,i-1);
   delete(s,1,i);
   delete(s,1,i);
   if base='SELF' then
   if base='SELF' then
-   st:=current_objectdef.symtable
+   st:=current_structdef.symtable
   else
   else
    begin
    begin
      asmsearchsym(base,sym,srsymtable);
      asmsearchsym(base,sym,srsymtable);

+ 6 - 0
compiler/scandir.pas

@@ -946,6 +946,11 @@ unit scandir;
       recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
       recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
     end;
     end;
 
 
+    procedure dir_pointermath;
+      begin
+        do_localswitch(cs_pointermath);
+      end;
+
     procedure dir_profile;
     procedure dir_profile;
       begin
       begin
         do_moduleswitch(cs_profile);
         do_moduleswitch(cs_profile);
@@ -1450,6 +1455,7 @@ unit scandir;
         AddDirective('PACKSET',directive_all, @dir_packset);
         AddDirective('PACKSET',directive_all, @dir_packset);
         AddDirective('PASCALMAINNAME',directive_all, @dir_pascalmainname);
         AddDirective('PASCALMAINNAME',directive_all, @dir_pascalmainname);
         AddDirective('PIC',directive_all, @dir_pic);
         AddDirective('PIC',directive_all, @dir_pic);
+        AddDirective('POINTERMATH',directive_all, @dir_pointermath);
         AddDirective('POP',directive_all, @dir_pop);
         AddDirective('POP',directive_all, @dir_pop);
         AddDirective('PROFILE',directive_all, @dir_profile);
         AddDirective('PROFILE',directive_all, @dir_profile);
         AddDirective('PUSH',directive_all, @dir_push);
         AddDirective('PUSH',directive_all, @dir_push);

+ 33 - 17
compiler/scanner.pas

@@ -378,6 +378,20 @@ implementation
                  include(init_settings.moduleswitches,cs_support_goto);
                  include(init_settings.moduleswitches,cs_support_goto);
              end;
              end;
 
 
+           { support pointer math by default in fpc/objfpc modes }
+           if ([m_fpc,m_objfpc] * current_settings.modeswitches <> []) then
+             begin
+               include(current_settings.localswitches,cs_pointermath);
+               if changeinit then
+                 include(init_settings.localswitches,cs_pointermath);
+             end
+           else
+             begin
+               exclude(current_settings.localswitches,cs_pointermath);
+               if changeinit then
+                 exclude(init_settings.localswitches,cs_pointermath);
+             end;
+
            { Default enum and set packing for delphi/tp7 }
            { Default enum and set packing for delphi/tp7 }
            if (m_tp7 in current_settings.modeswitches) or
            if (m_tp7 in current_settings.modeswitches) or
               (m_delphi in current_settings.modeswitches) then
               (m_delphi in current_settings.modeswitches) then
@@ -2045,18 +2059,20 @@ In case not, the value returned can be arbitrary.
 
 
     procedure tscannerfile.recordtoken;
     procedure tscannerfile.recordtoken;
       var
       var
-        a : array[0..1] of byte;
+        t : ttoken;
+        s : tspecialgenerictoken;
         len : sizeint;
         len : sizeint;
       begin
       begin
         if not assigned(recordtokenbuf) then
         if not assigned(recordtokenbuf) then
           internalerror(200511176);
           internalerror(200511176);
+        t:=_GENERICSPECIALTOKEN;
         { settings changed? }
         { settings changed? }
         if CompareByte(current_settings,last_settings,sizeof(current_settings))<>0 then
         if CompareByte(current_settings,last_settings,sizeof(current_settings))<>0 then
           begin
           begin
             { use a special token to record it }
             { use a special token to record it }
-            a[0]:=byte(_GENERICSPECIALTOKEN);
-            a[1]:=byte(ST_LOADSETTINGS);
-            recordtokenbuf.write(a,2);
+            s:=ST_LOADSETTINGS;
+            recordtokenbuf.write(t,SizeOf(t));
+            recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_settings,sizeof(current_settings));
             recordtokenbuf.write(current_settings,sizeof(current_settings));
             last_settings:=current_settings;
             last_settings:=current_settings;
           end;
           end;
@@ -2064,32 +2080,32 @@ In case not, the value returned can be arbitrary.
         { file pos changes? }
         { file pos changes? }
         if current_tokenpos.line<>last_filepos.line then
         if current_tokenpos.line<>last_filepos.line then
           begin
           begin
-            a[0]:=byte(_GENERICSPECIALTOKEN);
-            a[1]:=byte(ST_LINE);
-            recordtokenbuf.write(a,2);
+            s:=ST_LINE;
+            recordtokenbuf.write(t,SizeOf(t));
+            recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_tokenpos.line,sizeof(current_tokenpos.line));
             recordtokenbuf.write(current_tokenpos.line,sizeof(current_tokenpos.line));
             last_filepos.line:=current_tokenpos.line;
             last_filepos.line:=current_tokenpos.line;
           end;
           end;
         if current_tokenpos.column<>last_filepos.column then
         if current_tokenpos.column<>last_filepos.column then
           begin
           begin
-            a[0]:=byte(_GENERICSPECIALTOKEN);
-            a[1]:=byte(ST_COLUMN);
-            recordtokenbuf.write(a,2);
+            s:=ST_COLUMN;
+            recordtokenbuf.write(t,SizeOf(t));
+            recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
             recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
             last_filepos.column:=current_tokenpos.column;
             last_filepos.column:=current_tokenpos.column;
           end;
           end;
         if current_tokenpos.fileindex<>last_filepos.fileindex then
         if current_tokenpos.fileindex<>last_filepos.fileindex then
           begin
           begin
-            a[0]:=byte(_GENERICSPECIALTOKEN);
-            a[1]:=byte(ST_FILEINDEX);
-            recordtokenbuf.write(a,2);
+            s:=ST_FILEINDEX;
+            recordtokenbuf.write(t,SizeOf(t));
+            recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
             recordtokenbuf.write(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
             last_filepos.fileindex:=current_tokenpos.fileindex;
             last_filepos.fileindex:=current_tokenpos.fileindex;
           end;
           end;
 
 
-        recordtokenbuf.write(token,1);
+        recordtokenbuf.write(token,SizeOf(token));
         if token=_ID then
         if token=_ID then
-          recordtokenbuf.write(idtoken,1);
+          recordtokenbuf.write(idtoken,SizeOf(idtoken));
         case token of
         case token of
           _CWCHAR,
           _CWCHAR,
           _CWSTRING :
           _CWSTRING :
@@ -2168,9 +2184,9 @@ In case not, the value returned can be arbitrary.
           end;
           end;
         repeat
         repeat
           { load token from the buffer }
           { load token from the buffer }
-          replaytokenbuf.read(token,1);
+          replaytokenbuf.read(token,SizeOf(token));
           if token=_ID then
           if token=_ID then
-            replaytokenbuf.read(idtoken,1)
+            replaytokenbuf.read(idtoken,SizeOf(idtoken))
           else
           else
             idtoken:=_NOID;
             idtoken:=_NOID;
           case token of
           case token of

+ 18 - 10
compiler/symconst.pas

@@ -90,8 +90,8 @@ const
   mkClassFunction    = 5;
   mkClassFunction    = 5;
   mkClassConstructor = 6;
   mkClassConstructor = 6;
   mkClassDestructor  = 7;
   mkClassDestructor  = 7;
+  mkOperatorOverload = 8;
 // delphi has the next too:
 // delphi has the next too:
-//mkOperatorOverload = 8;
 //mkSafeProcedure    = 9;
 //mkSafeProcedure    = 9;
 //mkSafeFunction     = 10;
 //mkSafeFunction     = 10;
 
 
@@ -156,13 +156,13 @@ type
 
 
   { symbol options }
   { symbol options }
   tsymoption=(sp_none,
   tsymoption=(sp_none,
-    sp_static,
+    sp_static,              { static symbol in class/object/record }
     sp_hint_deprecated,
     sp_hint_deprecated,
     sp_hint_platform,
     sp_hint_platform,
     sp_hint_library,
     sp_hint_library,
     sp_hint_unimplemented,
     sp_hint_unimplemented,
     sp_has_overloaded,
     sp_has_overloaded,
-    sp_internal,  { internal symbol, not reported as unused }
+    sp_internal,            { internal symbol, not reported as unused }
     sp_implicitrename,
     sp_implicitrename,
     sp_hint_experimental,
     sp_hint_experimental,
     sp_generic_para,
     sp_generic_para,
@@ -436,13 +436,21 @@ type
   );
   );
 
 
   { types of the symtables }
   { types of the symtables }
-  TSymtabletype = (abstracTSymtable,
-    globalsymtable,staticsymtable,
-    ObjectSymtable,recordsymtable,
-    localsymtable,parasymtable,
-    withsymtable,stt_excepTSymtable,
-    exportedmacrosymtable, localmacrosymtable,
-    enumsymtable
+  TSymtabletype = (
+    abstractsymtable,      { not a real symtable             }
+    globalsymtable,        { unit interface symtable         }
+    staticsymtable,        { unit implementation symtable    }
+    ObjectSymtable,        { object symtable                 }
+    recordsymtable,        { record symtable                 }
+    localsymtable,         { subroutine symtable             }
+    parasymtable,          { arguments symtable              }
+    withsymtable,          { with operator symtable          }
+    stt_excepTSymtable,    { try/except symtable             }
+    exportedmacrosymtable, { }
+    localmacrosymtable,    { }
+    enumsymtable,          { symtable for enum members       }
+    arraysymtable          { used to store parameterised type
+                             in array                        }
   );
   );
 
 
 
 

+ 47 - 39
compiler/symdef.pas

@@ -161,6 +161,7 @@ interface
 
 
        tpointerdef = class(tabstractpointerdef)
        tpointerdef = class(tabstractpointerdef)
           is_far : boolean;
           is_far : boolean;
+          has_pointer_math : boolean;
           constructor create(def:tdef);
           constructor create(def:tdef);
           constructor createfar(def:tdef);
           constructor createfar(def:tdef);
           function getcopy:tstoreddef;override;
           function getcopy:tstoreddef;override;
@@ -174,8 +175,8 @@ interface
 
 
        tabstractrecorddef= class(tstoreddef)
        tabstractrecorddef= class(tstoreddef)
           objname,
           objname,
-          objrealname: PShortString;
-          symtable : TSymtable;
+          objrealname    : PShortString;
+          symtable       : TSymtable;
           cloneddef      : tabstractrecorddef;
           cloneddef      : tabstractrecorddef;
           cloneddefderef : tderef;
           cloneddefderef : tderef;
           objectoptions  : tobjectoptions;
           objectoptions  : tobjectoptions;
@@ -323,8 +324,6 @@ interface
           procedure register_maybe_created_object_type;
           procedure register_maybe_created_object_type;
           procedure register_created_classref_type;
           procedure register_created_classref_type;
           procedure register_vmt_call(index:longint);
           procedure register_vmt_call(index:longint);
-          { ObjC & C++ }
-          procedure make_all_methods_external;
           { ObjC }
           { ObjC }
           procedure finish_objc_data;
           procedure finish_objc_data;
           function check_objc_types: boolean;
           function check_objc_types: boolean;
@@ -345,12 +344,13 @@ interface
 
 
        tarraydef = class(tstoreddef)
        tarraydef = class(tstoreddef)
           lowrange,
           lowrange,
-          highrange  : aint;
-          rangedef   : tdef;
+          highrange     : aint;
+          rangedef      : tdef;
           rangedefderef : tderef;
           rangedefderef : tderef;
-          arrayoptions : tarraydefoptions;
+          arrayoptions  : tarraydefoptions;
+          symtable      : TSymtable;
        protected
        protected
-          _elementdef : tdef;
+          _elementdef      : tdef;
           _elementdefderef : tderef;
           _elementdefderef : tderef;
           procedure setelementdef(def:tdef);
           procedure setelementdef(def:tdef);
        public
        public
@@ -358,8 +358,9 @@ interface
           function elepackedbitsize : aint;
           function elepackedbitsize : aint;
           function elecount : aword;
           function elecount : aword;
           constructor create_from_pointer(def:tdef);
           constructor create_from_pointer(def:tdef);
-          constructor create(l,h : aint;def:tdef);
+          constructor create(l,h:aint;def:tdef);
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
+          destructor destroy; override;
           function getcopy : tstoreddef;override;
           function getcopy : tstoreddef;override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function  GetTypeName:string;override;
           function  GetTypeName:string;override;
@@ -563,6 +564,7 @@ interface
           function  objcmangledname : string;
           function  objcmangledname : string;
           function  is_methodpointer:boolean;override;
           function  is_methodpointer:boolean;override;
           function  is_addressonly:boolean;override;
           function  is_addressonly:boolean;override;
+          procedure make_external;
        end;
        end;
 
 
        { single linked list of overloaded procs }
        { single linked list of overloaded procs }
@@ -641,13 +643,12 @@ interface
        end;
        end;
 
 
     var
     var
-       current_structdef: tabstractrecorddef;
-       current_objectdef : tobjectdef absolute current_structdef;  { used for private functions check !! }
-       current_genericdef : tobjectdef; { used to reject declaration of generic class inside generic class }
-       current_specializedef : tobjectdef; { used to implement usage of generic class in itself }
+       current_structdef: tabstractrecorddef; { used for private functions check !! }
+       current_genericdef: tstoreddef;        { used to reject declaration of generic class inside generic class }
+       current_specializedef: tstoreddef;     { used to implement usage of generic class in itself }
 
 
     { default types }
     { default types }
-       generrordef,              { error in definition }
+       generrordef,               { error in definition }
        voidpointertype,           { pointer for Void-pointeddef }
        voidpointertype,           { pointer for Void-pointeddef }
        charpointertype,           { pointer for Char-pointeddef }
        charpointertype,           { pointer for Char-pointeddef }
        widecharpointertype,       { pointer for WideChar-pointeddef }
        widecharpointertype,       { pointer for WideChar-pointeddef }
@@ -786,7 +787,7 @@ interface
     function is_class_or_interface_or_objc(def: tdef): boolean;
     function is_class_or_interface_or_objc(def: tdef): boolean;
     function is_class_or_interface_or_object(def: tdef): boolean;
     function is_class_or_interface_or_object(def: tdef): boolean;
     function is_class_or_interface_or_dispinterface(def: tdef): boolean;
     function is_class_or_interface_or_dispinterface(def: tdef): boolean;
-    function is_class_or_interface_or_dispinterface_or_objc(def: tdef): boolean;
+    function is_implicit_pointer_object_type(def: tdef): boolean;
     function is_class_or_object(def: tdef): boolean;
     function is_class_or_object(def: tdef): boolean;
     function is_record(def: tdef): boolean;
     function is_record(def: tdef): boolean;
 
 
@@ -1158,7 +1159,7 @@ implementation
           procvardef :
           procvardef :
             is_intregable:=tprocvardef(self).is_addressonly;
             is_intregable:=tprocvardef(self).is_addressonly;
           objectdef:
           objectdef:
-            is_intregable:=(is_class_or_interface_or_dispinterface_or_objc(self)) and not needs_inittable;
+            is_intregable:=(is_implicit_pointer_object_type(self)) and not needs_inittable;
           setdef:
           setdef:
             is_intregable:=is_smallset(self);
             is_intregable:=is_smallset(self);
           recorddef:
           recorddef:
@@ -2088,6 +2089,7 @@ implementation
       begin
       begin
         inherited create(pointerdef,def);
         inherited create(pointerdef,def);
         is_far:=false;
         is_far:=false;
+        has_pointer_math:=cs_pointermath in current_settings.localswitches;
       end;
       end;
 
 
 
 
@@ -2095,6 +2097,7 @@ implementation
       begin
       begin
         inherited create(pointerdef,def);
         inherited create(pointerdef,def);
         is_far:=true;
         is_far:=true;
+        has_pointer_math:=cs_pointermath in current_settings.localswitches;
       end;
       end;
 
 
 
 
@@ -2102,6 +2105,7 @@ implementation
       begin
       begin
          inherited ppuload(pointerdef,ppufile);
          inherited ppuload(pointerdef,ppufile);
          is_far:=(ppufile.getbyte<>0);
          is_far:=(ppufile.getbyte<>0);
+         has_pointer_math:=(ppufile.getbyte<>0);
       end;
       end;
 
 
 
 
@@ -2115,6 +2119,7 @@ implementation
         else
         else
           result:=tpointerdef.create(pointeddef);
           result:=tpointerdef.create(pointeddef);
         tpointerdef(result).is_far:=is_far;
         tpointerdef(result).is_far:=is_far;
+        tpointerdef(result).has_pointer_math:=has_pointer_math;
         tpointerdef(result).savesize:=savesize;
         tpointerdef(result).savesize:=savesize;
       end;
       end;
 
 
@@ -2123,6 +2128,7 @@ implementation
       begin
       begin
          inherited ppuwrite(ppufile);
          inherited ppuwrite(ppufile);
          ppufile.putbyte(byte(is_far));
          ppufile.putbyte(byte(is_far));
+         ppufile.putbyte(byte(has_pointer_math));
          ppufile.writeentry(ibpointerdef);
          ppufile.writeentry(ibpointerdef);
       end;
       end;
 
 
@@ -2328,7 +2334,7 @@ implementation
                            TARRAYDEF
                            TARRAYDEF
 ***************************************************************************}
 ***************************************************************************}
 
 
-    constructor tarraydef.create(l,h : aint;def:tdef);
+    constructor tarraydef.create(l,h:aint;def:tdef);
       begin
       begin
          inherited create(arraydef);
          inherited create(arraydef);
          lowrange:=l;
          lowrange:=l;
@@ -2336,8 +2342,15 @@ implementation
          rangedef:=def;
          rangedef:=def;
          _elementdef:=nil;
          _elementdef:=nil;
          arrayoptions:=[];
          arrayoptions:=[];
+         symtable:=tarraysymtable.create(self);
       end;
       end;
 
 
+    destructor tarraydef.destroy;
+      begin
+        symtable.free;
+        symtable:=nil;
+        inherited;
+      end;
 
 
     constructor tarraydef.create_from_pointer(def:tdef);
     constructor tarraydef.create_from_pointer(def:tdef);
       begin
       begin
@@ -2357,6 +2370,8 @@ implementation
          lowrange:=ppufile.getaint;
          lowrange:=ppufile.getaint;
          highrange:=ppufile.getaint;
          highrange:=ppufile.getaint;
          ppufile.getsmallset(arrayoptions);
          ppufile.getsmallset(arrayoptions);
+         symtable:=tarraysymtable.create(self);
+         tarraysymtable(symtable).ppuload(ppufile)
       end;
       end;
 
 
 
 
@@ -2371,6 +2386,7 @@ implementation
     procedure tarraydef.buildderef;
     procedure tarraydef.buildderef;
       begin
       begin
         inherited buildderef;
         inherited buildderef;
+        tarraysymtable(symtable).buildderef;
         _elementdefderef.build(_elementdef);
         _elementdefderef.build(_elementdef);
         rangedefderef.build(rangedef);
         rangedefderef.build(rangedef);
       end;
       end;
@@ -2379,6 +2395,7 @@ implementation
     procedure tarraydef.deref;
     procedure tarraydef.deref;
       begin
       begin
         inherited deref;
         inherited deref;
+        tarraysymtable(symtable).deref;
         _elementdef:=tdef(_elementdefderef.resolve);
         _elementdef:=tdef(_elementdefderef.resolve);
         rangedef:=tdef(rangedefderef.resolve);
         rangedef:=tdef(rangedefderef.resolve);
       end;
       end;
@@ -2393,6 +2410,7 @@ implementation
          ppufile.putaint(highrange);
          ppufile.putaint(highrange);
          ppufile.putsmallset(arrayoptions);
          ppufile.putsmallset(arrayoptions);
          ppufile.writeentry(ibarraydef);
          ppufile.writeentry(ibarraydef);
+         tarraysymtable(symtable).ppuwrite(ppufile);
       end;
       end;
 
 
 
 
@@ -2636,10 +2654,10 @@ implementation
 
 
     function tabstractrecorddef.GetSymtable(t:tGetSymtable):TSymtable;
     function tabstractrecorddef.GetSymtable(t:tGetSymtable):TSymtable;
       begin
       begin
-         if t=gs_record then
-         GetSymtable:=symtable
+        if t=gs_record then
+          GetSymtable:=symtable
         else
         else
-         GetSymtable:=nil;
+          GetSymtable:=nil;
       end;
       end;
 
 
 
 
@@ -3499,6 +3517,14 @@ implementation
                  not is_nested_pd(self));
                  not is_nested_pd(self));
       end;
       end;
 
 
+
+    procedure tprocdef.make_external;
+      begin
+        include(procoptions,po_external);
+        forwarddef:=false;
+      end;
+
+
     function tprocdef.GetSymtable(t:tGetSymtable):TSymtable;
     function tprocdef.GetSymtable(t:tGetSymtable):TSymtable;
       begin
       begin
         case t of
         case t of
@@ -4946,24 +4972,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure make_procdef_external(data: tobject; arg: pointer);
-      var
-        def: tdef absolute data;
-      begin
-        if (def.typ = procdef) then
-          begin
-            include(tprocdef(def).procoptions,po_external);
-            tprocdef(def).forwarddef:=false;
-          end;
-      end;
-
-
-    procedure tobjectdef.make_all_methods_external;
-      begin
-         self.symtable.deflist.foreachcall(@make_procdef_external,nil);
-      end;
-
-
     procedure check_and_finish_msg(data: tobject; arg: pointer);
     procedure check_and_finish_msg(data: tobject; arg: pointer);
       var
       var
         def: tdef absolute data;
         def: tdef absolute data;
@@ -5531,7 +5539,7 @@ implementation
       end;
       end;
 
 
 
 
-    function is_class_or_interface_or_dispinterface_or_objc(def: tdef): boolean;
+    function is_implicit_pointer_object_type(def: tdef): boolean;
       begin
       begin
         result:=
         result:=
           assigned(def) and
           assigned(def) and

+ 70 - 19
compiler/symtable.pas

@@ -125,13 +125,17 @@ interface
        tlocalsymtable = class(tabstractlocalsymtable)
        tlocalsymtable = class(tabstractlocalsymtable)
        public
        public
           constructor create(adefowner:tdef;level:byte);
           constructor create(adefowner:tdef;level:byte);
-          function  checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
+          function checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
        end;
        end;
 
 
+       { tparasymtable }
+
        tparasymtable = class(tabstractlocalsymtable)
        tparasymtable = class(tabstractlocalsymtable)
        public
        public
+          readonly: boolean;
           constructor create(adefowner:tdef;level:byte);
           constructor create(adefowner:tdef;level:byte);
-          function  checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
+          function checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
+          procedure insertdef(def:TDefEntry);override;
        end;
        end;
 
 
        tabstractuniTSymtable = class(tstoredsymtable)
        tabstractuniTSymtable = class(tstoredsymtable)
@@ -183,6 +187,14 @@ interface
           constructor create(adefowner:tdef);
           constructor create(adefowner:tdef);
        end;
        end;
 
 
+       { tarraysymtable }
+
+       tarraysymtable = class(tstoredsymtable)
+       public
+          procedure insertdef(def:TDefEntry);override;
+          constructor create(adefowner:tdef);
+       end;
+
     var
     var
        systemunit     : tglobalsymtable; { pointer to the system unit }
        systemunit     : tglobalsymtable; { pointer to the system unit }
 
 
@@ -200,6 +212,7 @@ interface
 
 
 {*** Search ***}
 {*** Search ***}
     procedure addsymref(sym:tsym);
     procedure addsymref(sym:tsym);
+    function  is_owned_by(childdef,ownerdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(symst:tsymtable;symvisibility:tvisibility;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(symst:tsymtable;symvisibility:tvisibility;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(pd:tprocdef;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(pd:tprocdef;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(sym:tsym;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(sym:tsym;contextobjdef:tabstractrecorddef):boolean;
@@ -747,7 +760,11 @@ implementation
     procedure TStoredSymtable._needs_init_final(sym:TObject;arg:pointer);
     procedure TStoredSymtable._needs_init_final(sym:TObject;arg:pointer);
       begin
       begin
          if b_needs_init_final then
          if b_needs_init_final then
-          exit;
+           exit;
+         { don't check static symbols - they can be present in structures only and 
+           always have a reference to a symbol defined on unit level }
+         if sp_static in tsym(sym).symoptions then
+           exit;
          case tsym(sym).typ of
          case tsym(sym).typ of
            fieldvarsym,
            fieldvarsym,
            staticvarsym,
            staticvarsym,
@@ -1360,6 +1377,7 @@ implementation
     constructor tparasymtable.create(adefowner:tdef;level:byte);
     constructor tparasymtable.create(adefowner:tdef;level:byte);
       begin
       begin
         inherited create('');
         inherited create('');
+        readonly:=false;
         defowner:=adefowner;
         defowner:=adefowner;
         symtabletype:=parasymtable;
         symtabletype:=parasymtable;
         symtablelevel:=level;
         symtablelevel:=level;
@@ -1382,6 +1400,14 @@ implementation
           result:=tprocdef(defowner).struct.symtable.checkduplicate(hashedid,sym);
           result:=tprocdef(defowner).struct.symtable.checkduplicate(hashedid,sym);
       end;
       end;
 
 
+    procedure tparasymtable.insertdef(def: TDefEntry);
+      begin
+        if readonly then
+          defowner.owner.insertdef(def)
+        else
+          inherited insertdef(def);
+      end;
+
 
 
 {****************************************************************************
 {****************************************************************************
                          TAbstractUniTSymtable
                          TAbstractUniTSymtable
@@ -1617,6 +1643,27 @@ implementation
         defowner:=adefowner;
         defowner:=adefowner;
       end;
       end;
 
 
+{****************************************************************************
+                          TArraySymtable
+****************************************************************************}
+
+    procedure tarraysymtable.insertdef(def: TDefEntry);
+      begin
+        { Enums must also be available outside the record scope,
+          insert in the owner of this symtable }
+        if def.typ=enumdef then
+          defowner.owner.insertdef(def)
+        else
+          inherited insertdef(def);
+      end;
+
+    constructor tarraysymtable.create(adefowner: tdef);
+      begin
+        inherited Create('');
+        symtabletype:=arraysymtable;
+        defowner:=adefowner;
+      end;
+
 {*****************************************************************************
 {*****************************************************************************
                              Helper Routines
                              Helper Routines
 *****************************************************************************}
 *****************************************************************************}
@@ -1714,15 +1761,14 @@ implementation
        end;
        end;
 
 
 
 
-    function is_visible_for_object(symst:tsymtable;symvisibility:tvisibility;contextobjdef:tabstractrecorddef):boolean;
-
-      function is_holded_by(childdef,ownerdef: tabstractrecorddef): boolean;
-        begin
-          result:=childdef=ownerdef;
-          if not result and (childdef.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
-            result:=is_holded_by(tabstractrecorddef(childdef.owner.defowner),ownerdef);
-        end;
+    function is_owned_by(childdef,ownerdef:tabstractrecorddef):boolean;
+      begin
+        result:=childdef=ownerdef;
+        if not result and (childdef.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
+          result:=is_owned_by(tabstractrecorddef(childdef.owner.defowner),ownerdef);
+      end;
 
 
+    function is_visible_for_object(symst:tsymtable;symvisibility:tvisibility;contextobjdef:tabstractrecorddef):boolean;
       var
       var
         symownerdef : tabstractrecorddef;
         symownerdef : tabstractrecorddef;
       begin
       begin
@@ -1760,13 +1806,13 @@ implementation
           vis_strictprivate :
           vis_strictprivate :
             begin
             begin
               result:=assigned(current_structdef) and
               result:=assigned(current_structdef) and
-                      is_holded_by(current_structdef,symownerdef);
+                      is_owned_by(current_structdef,symownerdef);
             end;
             end;
           vis_strictprotected :
           vis_strictprotected :
             begin
             begin
                result:=assigned(current_structdef) and
                result:=assigned(current_structdef) and
                        (current_structdef.is_related(symownerdef) or
                        (current_structdef.is_related(symownerdef) or
-                        is_holded_by(current_structdef,symownerdef));
+                        is_owned_by(current_structdef,symownerdef));
             end;
             end;
           vis_protected :
           vis_protected :
             begin
             begin
@@ -1919,11 +1965,11 @@ implementation
                 while assigned(classh) do
                 while assigned(classh) do
                   begin
                   begin
                     srsymtable:=classh.symtable;
                     srsymtable:=classh.symtable;
-                srsym:=tsym(srsymtable.FindWithHash(hashedid));
-                if assigned(srsym) and
-                       not(srsym.typ in [fieldvarsym,paravarsym,propertysym,procsym,labelsym]) and
-                       is_visible_for_object(srsym,current_structdef) then
-                  begin
+                    srsym:=tsym(srsymtable.FindWithHash(hashedid));
+                     if assigned(srsym) and
+                        not(srsym.typ in [fieldvarsym,paravarsym,propertysym,procsym,labelsym]) and
+                        is_visible_for_object(srsym,current_structdef) then
+                       begin
                         addsymref(srsym);
                         addsymref(srsym);
                         result:=true;
                         result:=true;
                         exit;
                         exit;
@@ -1932,7 +1978,6 @@ implementation
                   end;
                   end;
               end
               end
             else
             else
-            if srsymtable.symtabletype<>parasymtable then
               begin
               begin
                 srsym:=tsym(srsymtable.FindWithHash(hashedid));
                 srsym:=tsym(srsymtable.FindWithHash(hashedid));
                 if assigned(srsym) and 
                 if assigned(srsym) and 
@@ -2059,6 +2104,12 @@ implementation
                    is_objcclass(ttypesym(srsym).typedef) and
                    is_objcclass(ttypesym(srsym).typedef) and
                    not(oo_is_formal in tobjectdef(ttypesym(srsym).typedef).objectoptions) then
                    not(oo_is_formal in tobjectdef(ttypesym(srsym).typedef).objectoptions) then
                   begin
                   begin
+                    { the external name for the formal and the real definition must match }
+                    if tobjectdef(ttypesym(srsym).typedef).objextname^<>pd.objextname^ then
+                      begin
+                        Message2(sym_e_external_class_name_mismatch1,pd.objextname^,pd.typename);
+                        MessagePos1(srsym.fileinfo,sym_e_external_class_name_mismatch2,tobjectdef(ttypesym(srsym).typedef).objextname^);
+                      end;
                     result:=tobjectdef(ttypesym(srsym).typedef);
                     result:=tobjectdef(ttypesym(srsym).typedef);
                     if assigned(current_procinfo) and
                     if assigned(current_procinfo) and
                        (srsym.owner.symtabletype=staticsymtable) then
                        (srsym.owner.symtabletype=staticsymtable) then

+ 1 - 0
compiler/symtype.pas

@@ -228,6 +228,7 @@ implementation
               end;
               end;
             recordsymtable,
             recordsymtable,
             enumsymtable,
             enumsymtable,
+            arraysymtable,
             localsymtable,
             localsymtable,
             parasymtable,
             parasymtable,
             ObjectSymtable :
             ObjectSymtable :

+ 17 - 12
compiler/utils/ppudump.pp

@@ -871,6 +871,7 @@ type
     mask : tdefstate;
     mask : tdefstate;
     str  : string[30];
     str  : string[30];
   end;
   end;
+  ptoken=^ttoken;
 const
 const
   defopt : array[1..ord(high(tdefoption))] of tdefopt=(
   defopt : array[1..ord(high(tdefoption))] of tdefopt=(
      (mask:df_unique;         str:'Unique Type'),
      (mask:df_unique;         str:'Unique Type'),
@@ -893,6 +894,7 @@ var
   first  : boolean;
   first  : boolean;
   tokenbufsize : longint;
   tokenbufsize : longint;
   tokenbuf : pbyte;
   tokenbuf : pbyte;
+  token : ttoken;
   len : sizeint;
   len : sizeint;
   wstring : widestring;
   wstring : widestring;
   astring : ansistring;
   astring : ansistring;
@@ -945,13 +947,14 @@ begin
       write(space,' Tokens: ');
       write(space,' Tokens: ');
       while i<tokenbufsize do
       while i<tokenbufsize do
         begin
         begin
-          if ttoken(tokenbuf[i])<>_GENERICSPECIALTOKEN then
-            write(arraytokeninfo[ttoken(tokenbuf[i])].str);
-          case ttoken(tokenbuf[i]) of
+          token:=ptoken(@tokenbuf[i])^;
+          if token<>_GENERICSPECIALTOKEN then
+            write(arraytokeninfo[token].str);
+          inc(i,SizeOf(token));
+          case token of
             _CWCHAR,
             _CWCHAR,
             _CWSTRING :
             _CWSTRING :
               begin
               begin
-                inc(i);
                 len:=psizeint(@tokenbuf[i])^;
                 len:=psizeint(@tokenbuf[i])^;
                 inc(i,sizeof(sizeint));
                 inc(i,sizeof(sizeint));
                 setlength(wstring,len);
                 setlength(wstring,len);
@@ -961,7 +964,6 @@ begin
               end;
               end;
             _CSTRING:
             _CSTRING:
               begin
               begin
-                inc(i);
                 len:=psizeint(@tokenbuf[i])^;
                 len:=psizeint(@tokenbuf[i])^;
                 inc(i,sizeof(sizeint));
                 inc(i,sizeof(sizeint));
                 setlength(astring,len);
                 setlength(astring,len);
@@ -973,14 +975,12 @@ begin
             _INTCONST,
             _INTCONST,
             _REALNUMBER :
             _REALNUMBER :
               begin
               begin
-                inc(i);
                 write(' ',pshortstring(@tokenbuf[i])^);
                 write(' ',pshortstring(@tokenbuf[i])^);
                 inc(i,tokenbuf[i]+1);
                 inc(i,tokenbuf[i]+1);
               end;
               end;
             _ID :
             _ID :
               begin
               begin
-                inc(i);
-                inc(i);
+                inc(i,SizeOf(ttoken)); // idtoken
                 write(' ',pshortstring(@tokenbuf[i])^);
                 write(' ',pshortstring(@tokenbuf[i])^);
                 inc(i,tokenbuf[i]+1);
                 inc(i,tokenbuf[i]+1);
               {
               {
@@ -991,7 +991,6 @@ begin
               end;
               end;
             _GENERICSPECIALTOKEN:
             _GENERICSPECIALTOKEN:
               begin
               begin
-                inc(i);
                 case tspecialgenerictoken(tokenbuf[i]) of
                 case tspecialgenerictoken(tokenbuf[i]) of
                   ST_LOADSETTINGS:
                   ST_LOADSETTINGS:
                     begin
                     begin
@@ -1031,8 +1030,6 @@ begin
                 continue;
                 continue;
               }
               }
               end;
               end;
-            else
-              inc(i);
           end;
           end;
 
 
           if i<tokenbufsize then
           if i<tokenbufsize then
@@ -1933,6 +1930,7 @@ begin
              write  (space,'     Pointed Type : ');
              write  (space,'     Pointed Type : ');
              readderef('');
              readderef('');
              writeln(space,'           Is Far : ',(getbyte<>0));
              writeln(space,'           Is Far : ',(getbyte<>0));
+             writeln(space,' Has Pointer Math : ',(getbyte<>0));
            end;
            end;
 
 
          iborddef :
          iborddef :
@@ -1978,6 +1976,8 @@ begin
              writeln(space,'            Range : ',getaint,' to ',getaint);
              writeln(space,'            Range : ',getaint,' to ',getaint);
              write  (space,'          Options : ');
              write  (space,'          Options : ');
              readarraydefoptions;
              readarraydefoptions;
+             readdefinitions('symbols');
+             readsymbols('symbols');
            end;
            end;
 
 
          ibprocdef :
          ibprocdef :
@@ -2075,6 +2075,12 @@ begin
              readcommondef('WideString definition',defoptions);
              readcommondef('WideString definition',defoptions);
              writeln(space,'           Length : ',getlongint);
              writeln(space,'           Length : ',getlongint);
            end;
            end;
+         
+         ibunicodestringdef :
+           begin
+             readcommondef('UnicodeString definition',defoptions);
+             writeln(space,'           Length : ',getlongint);
+           end;
 
 
          ibansistringdef :
          ibansistringdef :
            begin
            begin
@@ -2142,7 +2148,6 @@ begin
                   for j:=1to 16 do
                   for j:=1to 16 do
                    getbyte;
                    getbyte;
                   writeln(space,'       IID String : ',getstring);
                   writeln(space,'       IID String : ',getstring);
-                  writeln(space,'  Last VTable idx : ',getlongint);
                end;
                end;
 
 
              l:=getlongint;
              l:=getlongint;

+ 6 - 6
compiler/utils/samplecfg

@@ -374,6 +374,12 @@ $CPUCROSSIFDEF2
 #-Fr$FPCPATH/msg/errore.msg
 #-Fr$FPCPATH/msg/errore.msg
 #-Fr$FPCPATH/msg/errorn.msg
 #-Fr$FPCPATH/msg/errorn.msg
 
 
+# searchpath for units and other system dependent things
+-Fu$FPCPATH/units/\$fpctarget
+-Fu$FPCPATH/units/\$fpctarget/*
+-Fu$FPCPATH/units/\$fpctarget/rtl
+#-Fu~/fpc/packages/base/*/units/$fpctarget;~/fpc/fcl/units/$fpctarget;~/fpc/rtl/units/$fpctarget
+
 #IFDEF FPCAPACHE_1_3
 #IFDEF FPCAPACHE_1_3
 -Fu$FPCPATH/units/\$fpctarget/httpd13/
 -Fu$FPCPATH/units/\$fpctarget/httpd13/
 #ELSE
 #ELSE
@@ -384,12 +390,6 @@ $CPUCROSSIFDEF2
 #ENDIF
 #ENDIF
 #ENDIF
 #ENDIF
 
 
-# searchpath for units and other system dependent things
--Fu$FPCPATH/units/\$fpctarget
--Fu$FPCPATH/units/\$fpctarget/*
--Fu$FPCPATH/units/\$fpctarget/rtl
-#-Fu~/fpc/packages/base/*/units/$fpctarget;~/fpc/fcl/units/$fpctarget;~/fpc/rtl/units/$fpctarget
-
 # searchpath for libraries
 # searchpath for libraries
 $GCCDIR
 $GCCDIR
 $GCCDIR2
 $GCCDIR2

+ 6 - 0
compiler/x86/aasmcpu.pas

@@ -1946,6 +1946,12 @@ implementation
                       currabsreloc:=RELOC_GOTPCREL;
                       currabsreloc:=RELOC_GOTPCREL;
                       currabsreloc32:=RELOC_GOTPCREL;
                       currabsreloc32:=RELOC_GOTPCREL;
                     end
                     end
+                  else if oper[opidx]^.ref^.refaddr=addr_pic_no_got then
+                    begin
+                      currrelreloc:=RELOC_RELATIVE;
+                      currabsreloc:=RELOC_RELATIVE;
+                      currabsreloc32:=RELOC_RELATIVE;
+                    end
                   else
                   else
 {$endif x86_64}
 {$endif x86_64}
                     begin
                     begin

+ 3 - 8
compiler/x86/cgx86.pas

@@ -408,9 +408,7 @@ unit cgx86;
                   safety reasons
                   safety reasons
                 }
                 }
                 if (ref.symbol.bind=AB_LOCAL) and
                 if (ref.symbol.bind=AB_LOCAL) and
-                   (ref.symbol.typ=AT_DATA) and
-                   ((target_info.system=system_x86_64_darwin) or
-                    (target_info.system=system_x86_64_solaris)) then
+                   (ref.symbol.typ=AT_DATA) then
                   begin
                   begin
                     { unfortunately, RIP-based addresses don't support an index }
                     { unfortunately, RIP-based addresses don't support an index }
                     if (ref.base<>NR_NO) or
                     if (ref.base<>NR_NO) or
@@ -937,9 +935,7 @@ unit cgx86;
                     else if (cs_create_pic in current_settings.moduleswitches)
                     else if (cs_create_pic in current_settings.moduleswitches)
 {$ifdef x86_64}
 {$ifdef x86_64}
                              and not((ref.symbol.bind=AB_LOCAL) and
                              and not((ref.symbol.bind=AB_LOCAL) and
-                                     (ref.symbol.typ=AT_DATA) and
-                                     ((target_info.system=system_x86_64_darwin) or 
-                                     (target_info.system=system_x86_64_solaris)))
+                                     (ref.symbol.typ=AT_DATA))
 {$endif x86_64}
 {$endif x86_64}
                             then
                             then
                       begin
                       begin
@@ -960,8 +956,7 @@ unit cgx86;
                       end
                       end
 {$ifdef x86_64}
 {$ifdef x86_64}
                     else if (target_info.system in (systems_all_windows+[system_x86_64_darwin]))
                     else if (target_info.system in (systems_all_windows+[system_x86_64_darwin]))
-			 or ((target_info.system = system_x86_64_solaris) and
-                             (cs_create_pic in current_settings.moduleswitches))
+			 or (cs_create_pic in current_settings.moduleswitches)
 			 then
 			 then
                       begin
                       begin
                         { Win64 and Darwin/x86_64 always require RIP-relative addressing }
                         { Win64 and Darwin/x86_64 always require RIP-relative addressing }

+ 5 - 0
ide/fpdebug.pas

@@ -517,6 +517,11 @@ const
   FrameName = '$ebp';
   FrameName = '$ebp';
 {$define FrameNameKnown}
 {$define FrameNameKnown}
 {$endif i386}
 {$endif i386}
+{$ifdef x86_64}
+const
+  FrameName = '$rbp';
+{$define FrameNameKnown}
+{$endif x86_64}
 {$ifdef m68k}
 {$ifdef m68k}
 const
 const
   FrameName = '$fp';
   FrameName = '$fp';

+ 15 - 9
installer/install.pas

@@ -872,12 +872,16 @@ program install;
        begin
        begin
          WLibPath := false;
          WLibPath := false;
          DosFreeModule (Handle);
          DosFreeModule (Handle);
-       end
-      else
-       if DosLoadModule (@ErrPath, SizeOf (ErrPath), @BFD2EName, Handle) = 0 then
-        begin
-         WLibPath := false;
-         DosFreeModule (Handle);
+         if DosLoadModule (@ErrPath, SizeOf (ErrPath), @BFD2EName, Handle) = 0 then
+          begin
+           WLibPath := false;
+           DosFreeModule (Handle);
+          end
+         else
+          begin
+           WLibPath := true;
+           Inc (YB, 2);
+          end;
         end
         end
        else
        else
         begin
         begin
@@ -903,9 +907,11 @@ program install;
       if WLibPath then
       if WLibPath then
        begin
        begin
          if WPath then
          if WPath then
-          S := 'and your LIBPATH with ''' + S + '\dll'''
+          S := 'and your LIBPATH with ''' + S
          else
          else
-          S := 'Extend your LIBPATH with ''' + S + '\dll''';
+          S := 'Extend your LIBPATH with ''' + S;
+         System.Delete (S, Length (S) - 3, 4);
+         S := S + '\dll''';
          R.Assign (2, YB - 14, 64, YB - 12);
          R.Assign (2, YB - 14, 64, YB - 12);
          P := New (PStaticText, Init (R, S));
          P := New (PStaticText, Init (R, S));
          Insert (P);
          Insert (P);
@@ -921,7 +927,7 @@ program install;
 {$ENDIF}
 {$ENDIF}
 
 
       R.Assign(2, YB - 13, 64, YB - 12);
       R.Assign(2, YB - 13, 64, YB - 12);
-      P:=new(pstatictext,init(r,'To compile files enter fpc [file]'''));
+      P:=new(pstatictext,init(r,'To compile files enter ''fpc [file]'''));
       insert(P);
       insert(P);
 
 
       if haside then
       if haside then

+ 211 - 211
packages/cocoaint/src/AnonClassDefinitionsCoredata.pas

@@ -9,217 +9,217 @@ unit AnonClassDefinitionsCoredata;
 interface
 interface
 
 
 type
 type
-  Protocol = objcclass; external;
-  NSAffineTransform = objcclass; external;
-  NSData = objcclass; external;
-  NSAppleEventDescriptor = objcclass; external;
-  NSAppleEventManager = objcclass; external;
-  NSDictionary = objcclass; external;
-  NSString = objcclass; external;
-  NSURL = objcclass; external;
-  NSAppleScript = objcclass; external;
-  NSMutableData = objcclass; external;
-  NSMutableDictionary = objcclass; external;
-  NSMutableArray = objcclass; external;
-  NSArchiver = objcclass; external;
-  NSUnarchiver = objcclass; external;
-  NSIndexSet = objcclass; external;
-  NSArray = objcclass; external;
-  NSAttributedString = objcclass; external;
-  NSMutableAttributedString = objcclass; external;
-  NSAutoreleasePool = objcclass; external;
-  NSError = objcclass; external;
-  NSBundle = objcclass; external;
-  NSCache = objcclass; external;
-  NSDateComponents = objcclass; external;
-  NSLocale = objcclass; external;
-  NSTimeZone = objcclass; external;
-  NSCalendar = objcclass; external;
-  NSCalendarDate = objcclass; external;
-  NSCharacterSet = objcclass; external;
-  NSMutableCharacterSet = objcclass; external;
-  NSClassDescription = objcclass; external;
-  NSCoder = objcclass; external;
-  NSPredicateOperator = objcclass; external;
-  NSExpression = objcclass; external;
-  NSComparisonPredicate = objcclass; external;
-  NSCompoundPredicate = objcclass; external;
-  NSDistantObject = objcclass; external;
-  NSException = objcclass; external;
-  NSPort = objcclass; external;
-  NSRunLoop = objcclass; external;
-  NSPortNameServer = objcclass; external;
-  NSDistantObjectRequest = objcclass; external;
-  NSConnection = objcclass; external;
-  NSPurgeableData = objcclass; external;
-  NSDate = objcclass; external;
-  NSDateFormatter = objcclass; external;
-  NSDecimalNumber = objcclass; external;
-  NSDecimalNumberHandler = objcclass; external;
-  NSSet = objcclass; external;
-  NSDistributedLock = objcclass; external;
-  NSDistributedNotificationCenter = objcclass; external;
-  NSEnumerator = objcclass; external;
-  NSAssertionHandler = objcclass; external;
-  NSPredicate = objcclass; external;
-  NSFileHandle = objcclass; external;
-  NSPipe = objcclass; external;
-  NSDirectoryEnumerator = objcclass; external;
-  NSNumber = objcclass; external;
-  NSFileManager = objcclass; external;
-  NSFormatter = objcclass; external;
-  NSGarbageCollector = objcclass; external;
-  NSHashTable = objcclass; external;
-  NSHost = objcclass; external;
-  NSHTTPCookieInternal = objcclass; external;
-  NSHTTPCookie = objcclass; external;
-  NSHTTPCookieStorageInternal = objcclass; external;
-  NSHTTPCookieStorage = objcclass; external;
-  NSIndexPath = objcclass; external;
-  NSMutableIndexSet = objcclass; external;
-  NSMethodSignature = objcclass; external;
-  NSInvocation = objcclass; external;
-  NSKeyedArchiver = objcclass; external;
-  NSKeyedUnarchiver = objcclass; external;
-  NSLock = objcclass; external;
-  NSConditionLock = objcclass; external;
-  NSRecursiveLock = objcclass; external;
-  NSCondition = objcclass; external;
-  NSMapTable = objcclass; external;
-  NSMetadataItem = objcclass; external;
-  NSMetadataQueryAttributeValueTuple = objcclass; external;
-  NSMetadataQueryResultGroup = objcclass; external;
-  NSMetadataQuery = objcclass; external;
-  NSInputStream = objcclass; external;
-  NSOutputStream = objcclass; external;
-  NSNetService = objcclass; external;
-  NSNetServiceBrowser = objcclass; external;
-  NSOperationQueue = objcclass; external;
-  NSNotification = objcclass; external;
-  NSNotificationCenter = objcclass; external;
-  NSNotificationQueue = objcclass; external;
-  NSNull = objcclass; external;
-  NSNumberFormatter = objcclass; external;
-  NSObject = objcclass; external;
-  NSScriptObjectSpecifier = objcclass; external;
-  NSOperation = objcclass; external;
-  NSBlockOperation = objcclass; external;
-  NSInvocationOperation = objcclass; external;
-  NSOrthography = objcclass; external;
-  NSPointerArray = objcclass; external;
-  NSPointerFunctions = objcclass; external;
-  NSPortMessage = objcclass; external;
-  NSMachPort = objcclass; external;
-  NSMessagePort = objcclass; external;
-  NSSocketPort = objcclass; external;
-  NSPortCoder = objcclass; external;
-  NSMachBootstrapServer = objcclass; external;
-  NSMessagePortNameServer = objcclass; external;
-  NSSocketPortNameServer = objcclass; external;
-  NSProcessInfo = objcclass; external;
-  NSPropertyListSerialization = objcclass; external;
-  NSProtocolChecker = objcclass; external;
-  NSProxy = objcclass; external;
-  NSTimer = objcclass; external;
-  NSScanner = objcclass; external;
-  NSScriptCommandDescription = objcclass; external;
-  NSScriptClassDescription = objcclass; external;
-  NSScriptCoercionHandler = objcclass; external;
-  NSScriptCommand = objcclass; external;
-  NSScriptExecutionContext = objcclass; external;
-  NSScriptWhoseTest = objcclass; external;
-  NSIndexSpecifier = objcclass; external;
-  NSMiddleSpecifier = objcclass; external;
-  NSNameSpecifier = objcclass; external;
-  NSPositionalSpecifier = objcclass; external;
-  NSPropertySpecifier = objcclass; external;
-  NSRandomSpecifier = objcclass; external;
-  NSRangeSpecifier = objcclass; external;
-  NSRelativeSpecifier = objcclass; external;
-  NSUniqueIDSpecifier = objcclass; external;
-  NSWhoseSpecifier = objcclass; external;
-  NSCloneCommand = objcclass; external;
-  NSCloseCommand = objcclass; external;
-  NSCountCommand = objcclass; external;
-  NSCreateCommand = objcclass; external;
-  NSDeleteCommand = objcclass; external;
-  NSExistsCommand = objcclass; external;
-  NSGetCommand = objcclass; external;
-  NSMoveCommand = objcclass; external;
-  NSQuitCommand = objcclass; external;
-  NSSetCommand = objcclass; external;
-  NSMutableSet = objcclass; external;
-  NSScriptSuiteRegistry = objcclass; external;
-  NSLogicalTest = objcclass; external;
-  NSSpecifierTest = objcclass; external;
-  NSCountedSet = objcclass; external;
-  NSSortDescriptor = objcclass; external;
-  NSSpellServer = objcclass; external;
-  NSStream = objcclass; external;
-  NSMutableString = objcclass; external;
-  NSSimpleCString = objcclass; external;
-  NSConstantString = objcclass; external;
-  NSTask = objcclass; external;
-  NSTextCheckingResult = objcclass; external;
-  NSThread = objcclass; external;
-  NSUndoManager = objcclass; external;
-  NSURLAuthenticationChallenge = objcclass; external;
-  NSURLCredential = objcclass; external;
-  NSURLProtectionSpace = objcclass; external;
-  NSURLResponse = objcclass; external;
-  NSURLAuthenticationChallengeInternal = objcclass; external;
-  NSCachedURLResponseInternal = objcclass; external;
-  NSURLRequest = objcclass; external;
-  NSCachedURLResponse = objcclass; external;
-  NSURLCacheInternal = objcclass; external;
-  NSURLCache = objcclass; external;
-  NSURLConnectionInternal = objcclass; external;
-  NSURLConnection = objcclass; external;
-  NSURLCredentialInternal = objcclass; external;
-  NSURLCredentialStorageInternal = objcclass; external;
-  NSURLCredentialStorage = objcclass; external;
-  NSURLDownloadInternal = objcclass; external;
-  NSURLDownload = objcclass; external;
-  NSURLHandle = objcclass; external;
-  NSURLProtectionSpaceInternal = objcclass; external;
-  NSMutableURLRequest = objcclass; external;
-  NSURLProtocol = objcclass; external;
-  NSURLProtocolInternal = objcclass; external;
-  NSURLRequestInternal = objcclass; external;
-  NSURLResponseInternal = objcclass; external;
-  NSHTTPURLResponseInternal = objcclass; external;
-  NSHTTPURLResponse = objcclass; external;
-  NSUserDefaults = objcclass; external;
-  NSValue = objcclass; external;
-  NSValueTransformer = objcclass; external;
-  NSXMLDTD = objcclass; external;
-  NSXMLDocument = objcclass; external;
-  NSXMLDTDNode = objcclass; external;
-  NSXMLElement = objcclass; external;
-  NSXMLNode = objcclass; external;
-  NSXMLParser = objcclass; external;
-  NSAtomicStore = objcclass; external;
-  NSAtomicStoreCacheNode = objcclass; external;
-  NSEntityDescription = objcclass; external;
-  NSAttributeDescription = objcclass; external;
-  NSManagedObjectModel = objcclass; external;
-  NSManagedObjectContext = objcclass; external;
-  NSManagedObject = objcclass; external;
-  NSEntityMapping = objcclass; external;
-  NSMigrationManager = objcclass; external;
-  NSEntityMigrationPolicy = objcclass; external;
-  NSExpressionDescription = objcclass; external;
-  NSFetchRequest = objcclass; external;
-  NSFetchedPropertyDescription = objcclass; external;
-  NSFetchRequestExpression = objcclass; external;
-  NSManagedObjectID = objcclass; external;
-  NSPersistentStore = objcclass; external;
-  NSPersistentStoreCoordinator = objcclass; external;
-  NSMappingModel = objcclass; external;
-  NSMigrationContext = objcclass; external;
-  NSPropertyDescription = objcclass; external;
-  NSPropertyMapping = objcclass; external;
-  NSRelationshipDescription = objcclass; external;
+  Protocol = objcclass external;
+  NSAffineTransform = objcclass external;
+  NSData = objcclass external;
+  NSAppleEventDescriptor = objcclass external;
+  NSAppleEventManager = objcclass external;
+  NSDictionary = objcclass external;
+  NSString = objcclass external;
+  NSURL = objcclass external;
+  NSAppleScript = objcclass external;
+  NSMutableData = objcclass external;
+  NSMutableDictionary = objcclass external;
+  NSMutableArray = objcclass external;
+  NSArchiver = objcclass external;
+  NSUnarchiver = objcclass external;
+  NSIndexSet = objcclass external;
+  NSArray = objcclass external;
+  NSAttributedString = objcclass external;
+  NSMutableAttributedString = objcclass external;
+  NSAutoreleasePool = objcclass external;
+  NSError = objcclass external;
+  NSBundle = objcclass external;
+  NSCache = objcclass external;
+  NSDateComponents = objcclass external;
+  NSLocale = objcclass external;
+  NSTimeZone = objcclass external;
+  NSCalendar = objcclass external;
+  NSCalendarDate = objcclass external;
+  NSCharacterSet = objcclass external;
+  NSMutableCharacterSet = objcclass external;
+  NSClassDescription = objcclass external;
+  NSCoder = objcclass external;
+  NSPredicateOperator = objcclass external;
+  NSExpression = objcclass external;
+  NSComparisonPredicate = objcclass external;
+  NSCompoundPredicate = objcclass external;
+  NSDistantObject = objcclass external;
+  NSException = objcclass external;
+  NSPort = objcclass external;
+  NSRunLoop = objcclass external;
+  NSPortNameServer = objcclass external;
+  NSDistantObjectRequest = objcclass external;
+  NSConnection = objcclass external;
+  NSPurgeableData = objcclass external;
+  NSDate = objcclass external;
+  NSDateFormatter = objcclass external;
+  NSDecimalNumber = objcclass external;
+  NSDecimalNumberHandler = objcclass external;
+  NSSet = objcclass external;
+  NSDistributedLock = objcclass external;
+  NSDistributedNotificationCenter = objcclass external;
+  NSEnumerator = objcclass external;
+  NSAssertionHandler = objcclass external;
+  NSPredicate = objcclass external;
+  NSFileHandle = objcclass external;
+  NSPipe = objcclass external;
+  NSDirectoryEnumerator = objcclass external;
+  NSNumber = objcclass external;
+  NSFileManager = objcclass external;
+  NSFormatter = objcclass external;
+  NSGarbageCollector = objcclass external;
+  NSHashTable = objcclass external;
+  NSHost = objcclass external;
+  NSHTTPCookieInternal = objcclass external;
+  NSHTTPCookie = objcclass external;
+  NSHTTPCookieStorageInternal = objcclass external;
+  NSHTTPCookieStorage = objcclass external;
+  NSIndexPath = objcclass external;
+  NSMutableIndexSet = objcclass external;
+  NSMethodSignature = objcclass external;
+  NSInvocation = objcclass external;
+  NSKeyedArchiver = objcclass external;
+  NSKeyedUnarchiver = objcclass external;
+  NSLock = objcclass external;
+  NSConditionLock = objcclass external;
+  NSRecursiveLock = objcclass external;
+  NSCondition = objcclass external;
+  NSMapTable = objcclass external;
+  NSMetadataItem = objcclass external;
+  NSMetadataQueryAttributeValueTuple = objcclass external;
+  NSMetadataQueryResultGroup = objcclass external;
+  NSMetadataQuery = objcclass external;
+  NSInputStream = objcclass external;
+  NSOutputStream = objcclass external;
+  NSNetService = objcclass external;
+  NSNetServiceBrowser = objcclass external;
+  NSOperationQueue = objcclass external;
+  NSNotification = objcclass external;
+  NSNotificationCenter = objcclass external;
+  NSNotificationQueue = objcclass external;
+  NSNull = objcclass external;
+  NSNumberFormatter = objcclass external;
+  NSObject = objcclass external;
+  NSScriptObjectSpecifier = objcclass external;
+  NSOperation = objcclass external;
+  NSBlockOperation = objcclass external;
+  NSInvocationOperation = objcclass external;
+  NSOrthography = objcclass external;
+  NSPointerArray = objcclass external;
+  NSPointerFunctions = objcclass external;
+  NSPortMessage = objcclass external;
+  NSMachPort = objcclass external;
+  NSMessagePort = objcclass external;
+  NSSocketPort = objcclass external;
+  NSPortCoder = objcclass external;
+  NSMachBootstrapServer = objcclass external;
+  NSMessagePortNameServer = objcclass external;
+  NSSocketPortNameServer = objcclass external;
+  NSProcessInfo = objcclass external;
+  NSPropertyListSerialization = objcclass external;
+  NSProtocolChecker = objcclass external;
+  NSProxy = objcclass external;
+  NSTimer = objcclass external;
+  NSScanner = objcclass external;
+  NSScriptCommandDescription = objcclass external;
+  NSScriptClassDescription = objcclass external;
+  NSScriptCoercionHandler = objcclass external;
+  NSScriptCommand = objcclass external;
+  NSScriptExecutionContext = objcclass external;
+  NSScriptWhoseTest = objcclass external;
+  NSIndexSpecifier = objcclass external;
+  NSMiddleSpecifier = objcclass external;
+  NSNameSpecifier = objcclass external;
+  NSPositionalSpecifier = objcclass external;
+  NSPropertySpecifier = objcclass external;
+  NSRandomSpecifier = objcclass external;
+  NSRangeSpecifier = objcclass external;
+  NSRelativeSpecifier = objcclass external;
+  NSUniqueIDSpecifier = objcclass external;
+  NSWhoseSpecifier = objcclass external;
+  NSCloneCommand = objcclass external;
+  NSCloseCommand = objcclass external;
+  NSCountCommand = objcclass external;
+  NSCreateCommand = objcclass external;
+  NSDeleteCommand = objcclass external;
+  NSExistsCommand = objcclass external;
+  NSGetCommand = objcclass external;
+  NSMoveCommand = objcclass external;
+  NSQuitCommand = objcclass external;
+  NSSetCommand = objcclass external;
+  NSMutableSet = objcclass external;
+  NSScriptSuiteRegistry = objcclass external;
+  NSLogicalTest = objcclass external;
+  NSSpecifierTest = objcclass external;
+  NSCountedSet = objcclass external;
+  NSSortDescriptor = objcclass external;
+  NSSpellServer = objcclass external;
+  NSStream = objcclass external;
+  NSMutableString = objcclass external;
+  NSSimpleCString = objcclass external;
+  NSConstantString = objcclass external;
+  NSTask = objcclass external;
+  NSTextCheckingResult = objcclass external;
+  NSThread = objcclass external;
+  NSUndoManager = objcclass external;
+  NSURLAuthenticationChallenge = objcclass external;
+  NSURLCredential = objcclass external;
+  NSURLProtectionSpace = objcclass external;
+  NSURLResponse = objcclass external;
+  NSURLAuthenticationChallengeInternal = objcclass external;
+  NSCachedURLResponseInternal = objcclass external;
+  NSURLRequest = objcclass external;
+  NSCachedURLResponse = objcclass external;
+  NSURLCacheInternal = objcclass external;
+  NSURLCache = objcclass external;
+  NSURLConnectionInternal = objcclass external;
+  NSURLConnection = objcclass external;
+  NSURLCredentialInternal = objcclass external;
+  NSURLCredentialStorageInternal = objcclass external;
+  NSURLCredentialStorage = objcclass external;
+  NSURLDownloadInternal = objcclass external;
+  NSURLDownload = objcclass external;
+  NSURLHandle = objcclass external;
+  NSURLProtectionSpaceInternal = objcclass external;
+  NSMutableURLRequest = objcclass external;
+  NSURLProtocol = objcclass external;
+  NSURLProtocolInternal = objcclass external;
+  NSURLRequestInternal = objcclass external;
+  NSURLResponseInternal = objcclass external;
+  NSHTTPURLResponseInternal = objcclass external;
+  NSHTTPURLResponse = objcclass external;
+  NSUserDefaults = objcclass external;
+  NSValue = objcclass external;
+  NSValueTransformer = objcclass external;
+  NSXMLDTD = objcclass external;
+  NSXMLDocument = objcclass external;
+  NSXMLDTDNode = objcclass external;
+  NSXMLElement = objcclass external;
+  NSXMLNode = objcclass external;
+  NSXMLParser = objcclass external;
+  NSAtomicStore = objcclass external;
+  NSAtomicStoreCacheNode = objcclass external;
+  NSEntityDescription = objcclass external;
+  NSAttributeDescription = objcclass external;
+  NSManagedObjectModel = objcclass external;
+  NSManagedObjectContext = objcclass external;
+  NSManagedObject = objcclass external;
+  NSEntityMapping = objcclass external;
+  NSMigrationManager = objcclass external;
+  NSEntityMigrationPolicy = objcclass external;
+  NSExpressionDescription = objcclass external;
+  NSFetchRequest = objcclass external;
+  NSFetchedPropertyDescription = objcclass external;
+  NSFetchRequestExpression = objcclass external;
+  NSManagedObjectID = objcclass external;
+  NSPersistentStore = objcclass external;
+  NSPersistentStoreCoordinator = objcclass external;
+  NSMappingModel = objcclass external;
+  NSMigrationContext = objcclass external;
+  NSPropertyDescription = objcclass external;
+  NSPropertyMapping = objcclass external;
+  NSRelationshipDescription = objcclass external;
 
 
 implementation
 implementation
 
 

+ 409 - 409
packages/cocoaint/src/AnonClassDefinitionsQuartzcore.pas

@@ -9,415 +9,415 @@ unit AnonClassDefinitionsQuartzcore;
 interface
 interface
 
 
 type
 type
-  Protocol = objcclass; external;
-  NSAffineTransform = objcclass; external;
-  NSData = objcclass; external;
-  NSAppleEventDescriptor = objcclass; external;
-  NSAppleEventManager = objcclass; external;
-  NSDictionary = objcclass; external;
-  NSString = objcclass; external;
-  NSURL = objcclass; external;
-  NSAppleScript = objcclass; external;
-  NSMutableData = objcclass; external;
-  NSMutableDictionary = objcclass; external;
-  NSMutableArray = objcclass; external;
-  NSArchiver = objcclass; external;
-  NSUnarchiver = objcclass; external;
-  NSIndexSet = objcclass; external;
-  NSArray = objcclass; external;
-  NSAttributedString = objcclass; external;
-  NSMutableAttributedString = objcclass; external;
-  NSAutoreleasePool = objcclass; external;
-  NSError = objcclass; external;
-  NSBundle = objcclass; external;
-  NSCache = objcclass; external;
-  NSDateComponents = objcclass; external;
-  NSLocale = objcclass; external;
-  NSTimeZone = objcclass; external;
-  NSCalendar = objcclass; external;
-  NSCalendarDate = objcclass; external;
-  NSCharacterSet = objcclass; external;
-  NSMutableCharacterSet = objcclass; external;
-  NSClassDescription = objcclass; external;
-  NSCoder = objcclass; external;
-  NSPredicateOperator = objcclass; external;
-  NSExpression = objcclass; external;
-  NSComparisonPredicate = objcclass; external;
-  NSCompoundPredicate = objcclass; external;
-  NSDistantObject = objcclass; external;
-  NSException = objcclass; external;
-  NSPort = objcclass; external;
-  NSRunLoop = objcclass; external;
-  NSPortNameServer = objcclass; external;
-  NSDistantObjectRequest = objcclass; external;
-  NSConnection = objcclass; external;
-  NSPurgeableData = objcclass; external;
-  NSDate = objcclass; external;
-  NSDateFormatter = objcclass; external;
-  NSDecimalNumber = objcclass; external;
-  NSDecimalNumberHandler = objcclass; external;
-  NSSet = objcclass; external;
-  NSDistributedLock = objcclass; external;
-  NSDistributedNotificationCenter = objcclass; external;
-  NSEnumerator = objcclass; external;
-  NSAssertionHandler = objcclass; external;
-  NSPredicate = objcclass; external;
-  NSFileHandle = objcclass; external;
-  NSPipe = objcclass; external;
-  NSDirectoryEnumerator = objcclass; external;
-  NSNumber = objcclass; external;
-  NSFileManager = objcclass; external;
-  NSFormatter = objcclass; external;
-  NSGarbageCollector = objcclass; external;
-  NSHashTable = objcclass; external;
-  NSHost = objcclass; external;
-  NSHTTPCookieInternal = objcclass; external;
-  NSHTTPCookie = objcclass; external;
-  NSHTTPCookieStorageInternal = objcclass; external;
-  NSHTTPCookieStorage = objcclass; external;
-  NSIndexPath = objcclass; external;
-  NSMutableIndexSet = objcclass; external;
-  NSMethodSignature = objcclass; external;
-  NSInvocation = objcclass; external;
-  NSKeyedArchiver = objcclass; external;
-  NSKeyedUnarchiver = objcclass; external;
-  NSLock = objcclass; external;
-  NSConditionLock = objcclass; external;
-  NSRecursiveLock = objcclass; external;
-  NSCondition = objcclass; external;
-  NSMapTable = objcclass; external;
-  NSMetadataItem = objcclass; external;
-  NSMetadataQueryAttributeValueTuple = objcclass; external;
-  NSMetadataQueryResultGroup = objcclass; external;
-  NSMetadataQuery = objcclass; external;
-  NSInputStream = objcclass; external;
-  NSOutputStream = objcclass; external;
-  NSNetService = objcclass; external;
-  NSNetServiceBrowser = objcclass; external;
-  NSOperationQueue = objcclass; external;
-  NSNotification = objcclass; external;
-  NSNotificationCenter = objcclass; external;
-  NSNotificationQueue = objcclass; external;
-  NSNull = objcclass; external;
-  NSNumberFormatter = objcclass; external;
-  NSObject = objcclass; external;
-  NSScriptObjectSpecifier = objcclass; external;
-  NSOperation = objcclass; external;
-  NSBlockOperation = objcclass; external;
-  NSInvocationOperation = objcclass; external;
-  NSOrthography = objcclass; external;
-  NSPointerArray = objcclass; external;
-  NSPointerFunctions = objcclass; external;
-  NSPortMessage = objcclass; external;
-  NSMachPort = objcclass; external;
-  NSMessagePort = objcclass; external;
-  NSSocketPort = objcclass; external;
-  NSPortCoder = objcclass; external;
-  NSMachBootstrapServer = objcclass; external;
-  NSMessagePortNameServer = objcclass; external;
-  NSSocketPortNameServer = objcclass; external;
-  NSProcessInfo = objcclass; external;
-  NSPropertyListSerialization = objcclass; external;
-  NSProtocolChecker = objcclass; external;
-  NSProxy = objcclass; external;
-  NSTimer = objcclass; external;
-  NSScanner = objcclass; external;
-  NSScriptCommandDescription = objcclass; external;
-  NSScriptClassDescription = objcclass; external;
-  NSScriptCoercionHandler = objcclass; external;
-  NSScriptCommand = objcclass; external;
-  NSScriptExecutionContext = objcclass; external;
-  NSScriptWhoseTest = objcclass; external;
-  NSIndexSpecifier = objcclass; external;
-  NSMiddleSpecifier = objcclass; external;
-  NSNameSpecifier = objcclass; external;
-  NSPositionalSpecifier = objcclass; external;
-  NSPropertySpecifier = objcclass; external;
-  NSRandomSpecifier = objcclass; external;
-  NSRangeSpecifier = objcclass; external;
-  NSRelativeSpecifier = objcclass; external;
-  NSUniqueIDSpecifier = objcclass; external;
-  NSWhoseSpecifier = objcclass; external;
-  NSCloneCommand = objcclass; external;
-  NSCloseCommand = objcclass; external;
-  NSCountCommand = objcclass; external;
-  NSCreateCommand = objcclass; external;
-  NSDeleteCommand = objcclass; external;
-  NSExistsCommand = objcclass; external;
-  NSGetCommand = objcclass; external;
-  NSMoveCommand = objcclass; external;
-  NSQuitCommand = objcclass; external;
-  NSSetCommand = objcclass; external;
-  NSMutableSet = objcclass; external;
-  NSScriptSuiteRegistry = objcclass; external;
-  NSLogicalTest = objcclass; external;
-  NSSpecifierTest = objcclass; external;
-  NSCountedSet = objcclass; external;
-  NSSortDescriptor = objcclass; external;
-  NSSpellServer = objcclass; external;
-  NSStream = objcclass; external;
-  NSMutableString = objcclass; external;
-  NSSimpleCString = objcclass; external;
-  NSConstantString = objcclass; external;
-  NSTask = objcclass; external;
-  NSTextCheckingResult = objcclass; external;
-  NSThread = objcclass; external;
-  NSUndoManager = objcclass; external;
-  NSURLAuthenticationChallenge = objcclass; external;
-  NSURLCredential = objcclass; external;
-  NSURLProtectionSpace = objcclass; external;
-  NSURLResponse = objcclass; external;
-  NSURLAuthenticationChallengeInternal = objcclass; external;
-  NSCachedURLResponseInternal = objcclass; external;
-  NSURLRequest = objcclass; external;
-  NSCachedURLResponse = objcclass; external;
-  NSURLCacheInternal = objcclass; external;
-  NSURLCache = objcclass; external;
-  NSURLConnectionInternal = objcclass; external;
-  NSURLConnection = objcclass; external;
-  NSURLCredentialInternal = objcclass; external;
-  NSURLCredentialStorageInternal = objcclass; external;
-  NSURLCredentialStorage = objcclass; external;
-  NSURLDownloadInternal = objcclass; external;
-  NSURLDownload = objcclass; external;
-  NSURLHandle = objcclass; external;
-  NSURLProtectionSpaceInternal = objcclass; external;
-  NSMutableURLRequest = objcclass; external;
-  NSURLProtocol = objcclass; external;
-  NSURLProtocolInternal = objcclass; external;
-  NSURLRequestInternal = objcclass; external;
-  NSURLResponseInternal = objcclass; external;
-  NSHTTPURLResponseInternal = objcclass; external;
-  NSHTTPURLResponse = objcclass; external;
-  NSUserDefaults = objcclass; external;
-  NSValue = objcclass; external;
-  NSValueTransformer = objcclass; external;
-  NSXMLDTD = objcclass; external;
-  NSXMLDocument = objcclass; external;
-  NSXMLDTDNode = objcclass; external;
-  NSXMLElement = objcclass; external;
-  NSXMLNode = objcclass; external;
-  NSXMLParser = objcclass; external;
-  NSActionCell = objcclass; external;
-  NSBezierPath = objcclass; external;
-  NSTextField = objcclass; external;
-  NSPanel = objcclass; external;
-  NSWindow = objcclass; external;
-  NSImage = objcclass; external;
-  NSButton = objcclass; external;
-  NSAlert = objcclass; external;
-  NSGraphicsContext = objcclass; external;
-  NSAnimation = objcclass; external;
-  NSViewAnimation = objcclass; external;
-  NSAnimationContext = objcclass; external;
-  NSPasteboard = objcclass; external;
-  NSDockTile = objcclass; external;
-  NSApplication = objcclass; external;
-  NSArrayController = objcclass; external;
-  NSATSTypesetter = objcclass; external;
-  NSFileWrapper = objcclass; external;
-  NSTextBlock = objcclass; external;
-  NSTextTable = objcclass; external;
-  NSTextList = objcclass; external;
-  CIImage = objcclass; external;
-  NSColor = objcclass; external;
-  NSColorSpace = objcclass; external;
-  NSBitmapImageRep = objcclass; external;
-  NSFont = objcclass; external;
-  NSBox = objcclass; external;
-  NSMatrix = objcclass; external;
-  NSScroller = objcclass; external;
-  NSBrowser = objcclass; external;
-  NSBrowserCell = objcclass; external;
-  NSSound = objcclass; external;
-  NSButtonCell = objcclass; external;
-  NSCachedImageRep = objcclass; external;
-  NSEvent = objcclass; external;
-  NSMenu = objcclass; external;
-  NSText = objcclass; external;
-  NSView = objcclass; external;
-  NSTextView = objcclass; external;
-  NSCell = objcclass; external;
-  NSCIImageRep = objcclass; external;
-  NSClipView = objcclass; external;
-  NSCollectionView = objcclass; external;
-  NSNib = objcclass; external;
-  NSCollectionViewItem = objcclass; external;
-  NSColorList = objcclass; external;
-  NSColorPanel = objcclass; external;
-  NSColorPicker = objcclass; external;
-  NSColorWell = objcclass; external;
-  NSComboBox = objcclass; external;
-  NSTableView = objcclass; external;
-  NSComboBoxCell = objcclass; external;
-  NSControl = objcclass; external;
-  NSController = objcclass; external;
-  NSCursor = objcclass; external;
-  NSCustomImageRep = objcclass; external;
-  NSDatePicker = objcclass; external;
-  NSDatePickerCell = objcclass; external;
-  NSDictionaryController = objcclass; external;
-  NSMenuItem = objcclass; external;
-  NSPageLayout = objcclass; external;
-  NSPrintInfo = objcclass; external;
-  NSPrintOperation = objcclass; external;
-  NSSavePanel = objcclass; external;
-  NSWindowController = objcclass; external;
-  NSDocument = objcclass; external;
-  NSOpenPanel = objcclass; external;
-  NSDocumentController = objcclass; external;
-  NSDrawer = objcclass; external;
-  NSPDFImageRep = objcclass; external;
-  NSEPSImageRep = objcclass; external;
-  NSTrackingArea = objcclass; external;
-  NSFontDescriptor = objcclass; external;
-  NSFontPanel = objcclass; external;
-  NSFontManager = objcclass; external;
-  NSFormCell = objcclass; external;
-  NSGlyphGenerator = objcclass; external;
-  NSGlyphInfo = objcclass; external;
-  NSGradient = objcclass; external;
-  CIContext = objcclass; external;
-  NSHelpManager = objcclass; external;
-  NSImageRep = objcclass; external;
-  _NSImageAuxiliary = objcclass; external;
-  NSImageCell = objcclass; external;
-  NSImageView = objcclass; external;
-  NSInputServer = objcclass; external;
-  NSInputManager = objcclass; external;
-  NSTextStorage = objcclass; external;
-  NSTypesetter = objcclass; external;
-  NSTextContainer = objcclass; external;
-  NSRulerView = objcclass; external;
-  NSParagraphStyle = objcclass; external;
-  NSRulerMarker = objcclass; external;
-  NSTabWell = objcclass; external;
-  NSStorage = objcclass; external;
-  NSRunStorage = objcclass; external;
-  NSSortedArray = objcclass; external;
-  NSLayoutManager = objcclass; external;
-  NSLevelIndicator = objcclass; external;
-  NSLevelIndicatorCell = objcclass; external;
-  NSMenuView = objcclass; external;
-  NSMenuItemCell = objcclass; external;
-  NSScreen = objcclass; external;
-  QTMovie = objcclass; external;
-  NSMovie = objcclass; external;
-  NSMovieView = objcclass; external;
-  NSIBObjectData = objcclass; external;
-  NSNibConnector = objcclass; external;
-  NSNibControlConnector = objcclass; external;
-  NSNibOutletConnector = objcclass; external;
-  NSManagedObjectContext = objcclass; external;
-  NSFetchRequest = objcclass; external;
-  NSObjectController = objcclass; external;
-  NSOpenGLPixelFormat = objcclass; external;
-  NSOpenGLPixelBuffer = objcclass; external;
-  NSOpenGLContext = objcclass; external;
-  NSOpenGLLayer = objcclass; external;
-  NSOpenGLView = objcclass; external;
-  NSTableHeaderView = objcclass; external;
-  NSTableColumn = objcclass; external;
-  NSMouseTracker = objcclass; external;
-  NSOutlineView = objcclass; external;
-  NSViewController = objcclass; external;
-  NSTextTab = objcclass; external;
-  NSMutableParagraphStyle = objcclass; external;
-  NSPasteboardItem = objcclass; external;
-  NSPathComponentCell = objcclass; external;
-  NSPopUpButtonCell = objcclass; external;
-  NSPathCell = objcclass; external;
-  NSPathControl = objcclass; external;
-  NSManagedObjectModel = objcclass; external;
-  NSPersistentDocument = objcclass; external;
-  NSPICTImageRep = objcclass; external;
-  NSPopUpButton = objcclass; external;
-  NSPredicateTemplate = objcclass; external;
-  NSPredicateEditor = objcclass; external;
-  NSEntityDescription = objcclass; external;
-  NSPredicateEditorRowTemplate = objcclass; external;
-  NSPrinter = objcclass; external;
-  NSPrintPanel = objcclass; external;
-  NSProgressIndicator = objcclass; external;
-  NSQuickDrawView = objcclass; external;
-  NSResponder = objcclass; external;
-  NSRuleEditor = objcclass; external;
-  NSScrollView = objcclass; external;
-  NSRunningApplication = objcclass; external;
-  NSNavView = objcclass; external;
-  NSSavePanelAuxiliary = objcclass; external;
-  NSSearchField = objcclass; external;
-  NSSearchFieldCell = objcclass; external;
-  NSSecureTextField = objcclass; external;
-  NSSecureTextFieldCell = objcclass; external;
-  NSSegmentedCell = objcclass; external;
-  NSSegmentedControl = objcclass; external;
-  NSShadow = objcclass; external;
-  NSSimpleHorizontalTypesetter = objcclass; external;
-  NSSlider = objcclass; external;
-  NSSliderCell = objcclass; external;
-  NSSpeechRecognizer = objcclass; external;
-  NSSpeechSynthesizer = objcclass; external;
-  NSSpellChecker = objcclass; external;
-  NSSplitView = objcclass; external;
-  NSStatusItem = objcclass; external;
-  NSStatusBar = objcclass; external;
-  NSStepper = objcclass; external;
-  NSStepperCell = objcclass; external;
-  NSTableHeaderCell = objcclass; external;
-  NSTabViewItem = objcclass; external;
-  NSTabView = objcclass; external;
-  NSTextAttachment = objcclass; external;
-  NSTextAttachmentCell = objcclass; external;
-  NSTextFieldCell = objcclass; external;
-  NSTextInputContext = objcclass; external;
-  NSTextTableBlock = objcclass; external;
-  NSTokenField = objcclass; external;
-  NSTokenFieldCell = objcclass; external;
-  NSToolbarItem = objcclass; external;
-  NSToolbar = objcclass; external;
-  NSToolbarItemViewer = objcclass; external;
-  NSToolbarItemGroup = objcclass; external;
-  NSTouch = objcclass; external;
-  NSTreeNode = objcclass; external;
-  NSTreeController = objcclass; external;
-  NSUserDefaultsController = objcclass; external;
-  CIFilter = objcclass; external;
-  CALayer = objcclass; external;
-  _NSViewAuxiliary = objcclass; external;
-  NSWindowAuxiliary = objcclass; external;
-  NSWorkspace = objcclass; external;
-  CAMediaTimingFunction = objcclass; external;
-  CAValueFunction = objcclass; external;
-  CAAnimation = objcclass; external;
-  CAPropertyAnimation = objcclass; external;
-  CABasicAnimation = objcclass; external;
-  CAKeyframeAnimation = objcclass; external;
-  CATransition = objcclass; external;
-  CAAnimationGroup = objcclass; external;
-  CAConstraint = objcclass; external;
-  CAConstraintLayoutManager = objcclass; external;
-  CAEmitterCell = objcclass; external;
-  CAEmitterLayer = objcclass; external;
-  CAGradientLayer = objcclass; external;
-  CALayerArray = objcclass; external;
-  CAOpenGLLayer = objcclass; external;
-  CARenderer = objcclass; external;
-  CAReplicatorLayer = objcclass; external;
-  CAScrollLayer = objcclass; external;
-  CAShapeLayer = objcclass; external;
-  CATextLayer = objcclass; external;
-  CATiledLayer = objcclass; external;
-  CATransaction = objcclass; external;
-  CATransformLayer = objcclass; external;
-  CIColor = objcclass; external;
-  CIKernel = objcclass; external;
-  CIFilterGenerator = objcclass; external;
-  CIFilterShape = objcclass; external;
-  CIImageAccumulator = objcclass; external;
-  CIPlugIn = objcclass; external;
-  CISampler = objcclass; external;
-  CIVector = objcclass; external;
+  Protocol = objcclass external;
+  NSAffineTransform = objcclass external;
+  NSData = objcclass external;
+  NSAppleEventDescriptor = objcclass external;
+  NSAppleEventManager = objcclass external;
+  NSDictionary = objcclass external;
+  NSString = objcclass external;
+  NSURL = objcclass external;
+  NSAppleScript = objcclass external;
+  NSMutableData = objcclass external;
+  NSMutableDictionary = objcclass external;
+  NSMutableArray = objcclass external;
+  NSArchiver = objcclass external;
+  NSUnarchiver = objcclass external;
+  NSIndexSet = objcclass external;
+  NSArray = objcclass external;
+  NSAttributedString = objcclass external;
+  NSMutableAttributedString = objcclass external;
+  NSAutoreleasePool = objcclass external;
+  NSError = objcclass external;
+  NSBundle = objcclass external;
+  NSCache = objcclass external;
+  NSDateComponents = objcclass external;
+  NSLocale = objcclass external;
+  NSTimeZone = objcclass external;
+  NSCalendar = objcclass external;
+  NSCalendarDate = objcclass external;
+  NSCharacterSet = objcclass external;
+  NSMutableCharacterSet = objcclass external;
+  NSClassDescription = objcclass external;
+  NSCoder = objcclass external;
+  NSPredicateOperator = objcclass external;
+  NSExpression = objcclass external;
+  NSComparisonPredicate = objcclass external;
+  NSCompoundPredicate = objcclass external;
+  NSDistantObject = objcclass external;
+  NSException = objcclass external;
+  NSPort = objcclass external;
+  NSRunLoop = objcclass external;
+  NSPortNameServer = objcclass external;
+  NSDistantObjectRequest = objcclass external;
+  NSConnection = objcclass external;
+  NSPurgeableData = objcclass external;
+  NSDate = objcclass external;
+  NSDateFormatter = objcclass external;
+  NSDecimalNumber = objcclass external;
+  NSDecimalNumberHandler = objcclass external;
+  NSSet = objcclass external;
+  NSDistributedLock = objcclass external;
+  NSDistributedNotificationCenter = objcclass external;
+  NSEnumerator = objcclass external;
+  NSAssertionHandler = objcclass external;
+  NSPredicate = objcclass external;
+  NSFileHandle = objcclass external;
+  NSPipe = objcclass external;
+  NSDirectoryEnumerator = objcclass external;
+  NSNumber = objcclass external;
+  NSFileManager = objcclass external;
+  NSFormatter = objcclass external;
+  NSGarbageCollector = objcclass external;
+  NSHashTable = objcclass external;
+  NSHost = objcclass external;
+  NSHTTPCookieInternal = objcclass external;
+  NSHTTPCookie = objcclass external;
+  NSHTTPCookieStorageInternal = objcclass external;
+  NSHTTPCookieStorage = objcclass external;
+  NSIndexPath = objcclass external;
+  NSMutableIndexSet = objcclass external;
+  NSMethodSignature = objcclass external;
+  NSInvocation = objcclass external;
+  NSKeyedArchiver = objcclass external;
+  NSKeyedUnarchiver = objcclass external;
+  NSLock = objcclass external;
+  NSConditionLock = objcclass external;
+  NSRecursiveLock = objcclass external;
+  NSCondition = objcclass external;
+  NSMapTable = objcclass external;
+  NSMetadataItem = objcclass external;
+  NSMetadataQueryAttributeValueTuple = objcclass external;
+  NSMetadataQueryResultGroup = objcclass external;
+  NSMetadataQuery = objcclass external;
+  NSInputStream = objcclass external;
+  NSOutputStream = objcclass external;
+  NSNetService = objcclass external;
+  NSNetServiceBrowser = objcclass external;
+  NSOperationQueue = objcclass external;
+  NSNotification = objcclass external;
+  NSNotificationCenter = objcclass external;
+  NSNotificationQueue = objcclass external;
+  NSNull = objcclass external;
+  NSNumberFormatter = objcclass external;
+  NSObject = objcclass external;
+  NSScriptObjectSpecifier = objcclass external;
+  NSOperation = objcclass external;
+  NSBlockOperation = objcclass external;
+  NSInvocationOperation = objcclass external;
+  NSOrthography = objcclass external;
+  NSPointerArray = objcclass external;
+  NSPointerFunctions = objcclass external;
+  NSPortMessage = objcclass external;
+  NSMachPort = objcclass external;
+  NSMessagePort = objcclass external;
+  NSSocketPort = objcclass external;
+  NSPortCoder = objcclass external;
+  NSMachBootstrapServer = objcclass external;
+  NSMessagePortNameServer = objcclass external;
+  NSSocketPortNameServer = objcclass external;
+  NSProcessInfo = objcclass external;
+  NSPropertyListSerialization = objcclass external;
+  NSProtocolChecker = objcclass external;
+  NSProxy = objcclass external;
+  NSTimer = objcclass external;
+  NSScanner = objcclass external;
+  NSScriptCommandDescription = objcclass external;
+  NSScriptClassDescription = objcclass external;
+  NSScriptCoercionHandler = objcclass external;
+  NSScriptCommand = objcclass external;
+  NSScriptExecutionContext = objcclass external;
+  NSScriptWhoseTest = objcclass external;
+  NSIndexSpecifier = objcclass external;
+  NSMiddleSpecifier = objcclass external;
+  NSNameSpecifier = objcclass external;
+  NSPositionalSpecifier = objcclass external;
+  NSPropertySpecifier = objcclass external;
+  NSRandomSpecifier = objcclass external;
+  NSRangeSpecifier = objcclass external;
+  NSRelativeSpecifier = objcclass external;
+  NSUniqueIDSpecifier = objcclass external;
+  NSWhoseSpecifier = objcclass external;
+  NSCloneCommand = objcclass external;
+  NSCloseCommand = objcclass external;
+  NSCountCommand = objcclass external;
+  NSCreateCommand = objcclass external;
+  NSDeleteCommand = objcclass external;
+  NSExistsCommand = objcclass external;
+  NSGetCommand = objcclass external;
+  NSMoveCommand = objcclass external;
+  NSQuitCommand = objcclass external;
+  NSSetCommand = objcclass external;
+  NSMutableSet = objcclass external;
+  NSScriptSuiteRegistry = objcclass external;
+  NSLogicalTest = objcclass external;
+  NSSpecifierTest = objcclass external;
+  NSCountedSet = objcclass external;
+  NSSortDescriptor = objcclass external;
+  NSSpellServer = objcclass external;
+  NSStream = objcclass external;
+  NSMutableString = objcclass external;
+  NSSimpleCString = objcclass external;
+  NSConstantString = objcclass external;
+  NSTask = objcclass external;
+  NSTextCheckingResult = objcclass external;
+  NSThread = objcclass external;
+  NSUndoManager = objcclass external;
+  NSURLAuthenticationChallenge = objcclass external;
+  NSURLCredential = objcclass external;
+  NSURLProtectionSpace = objcclass external;
+  NSURLResponse = objcclass external;
+  NSURLAuthenticationChallengeInternal = objcclass external;
+  NSCachedURLResponseInternal = objcclass external;
+  NSURLRequest = objcclass external;
+  NSCachedURLResponse = objcclass external;
+  NSURLCacheInternal = objcclass external;
+  NSURLCache = objcclass external;
+  NSURLConnectionInternal = objcclass external;
+  NSURLConnection = objcclass external;
+  NSURLCredentialInternal = objcclass external;
+  NSURLCredentialStorageInternal = objcclass external;
+  NSURLCredentialStorage = objcclass external;
+  NSURLDownloadInternal = objcclass external;
+  NSURLDownload = objcclass external;
+  NSURLHandle = objcclass external;
+  NSURLProtectionSpaceInternal = objcclass external;
+  NSMutableURLRequest = objcclass external;
+  NSURLProtocol = objcclass external;
+  NSURLProtocolInternal = objcclass external;
+  NSURLRequestInternal = objcclass external;
+  NSURLResponseInternal = objcclass external;
+  NSHTTPURLResponseInternal = objcclass external;
+  NSHTTPURLResponse = objcclass external;
+  NSUserDefaults = objcclass external;
+  NSValue = objcclass external;
+  NSValueTransformer = objcclass external;
+  NSXMLDTD = objcclass external;
+  NSXMLDocument = objcclass external;
+  NSXMLDTDNode = objcclass external;
+  NSXMLElement = objcclass external;
+  NSXMLNode = objcclass external;
+  NSXMLParser = objcclass external;
+  NSActionCell = objcclass external;
+  NSBezierPath = objcclass external;
+  NSTextField = objcclass external;
+  NSPanel = objcclass external;
+  NSWindow = objcclass external;
+  NSImage = objcclass external;
+  NSButton = objcclass external;
+  NSAlert = objcclass external;
+  NSGraphicsContext = objcclass external;
+  NSAnimation = objcclass external;
+  NSViewAnimation = objcclass external;
+  NSAnimationContext = objcclass external;
+  NSPasteboard = objcclass external;
+  NSDockTile = objcclass external;
+  NSApplication = objcclass external;
+  NSArrayController = objcclass external;
+  NSATSTypesetter = objcclass external;
+  NSFileWrapper = objcclass external;
+  NSTextBlock = objcclass external;
+  NSTextTable = objcclass external;
+  NSTextList = objcclass external;
+  CIImage = objcclass external;
+  NSColor = objcclass external;
+  NSColorSpace = objcclass external;
+  NSBitmapImageRep = objcclass external;
+  NSFont = objcclass external;
+  NSBox = objcclass external;
+  NSMatrix = objcclass external;
+  NSScroller = objcclass external;
+  NSBrowser = objcclass external;
+  NSBrowserCell = objcclass external;
+  NSSound = objcclass external;
+  NSButtonCell = objcclass external;
+  NSCachedImageRep = objcclass external;
+  NSEvent = objcclass external;
+  NSMenu = objcclass external;
+  NSText = objcclass external;
+  NSView = objcclass external;
+  NSTextView = objcclass external;
+  NSCell = objcclass external;
+  NSCIImageRep = objcclass external;
+  NSClipView = objcclass external;
+  NSCollectionView = objcclass external;
+  NSNib = objcclass external;
+  NSCollectionViewItem = objcclass external;
+  NSColorList = objcclass external;
+  NSColorPanel = objcclass external;
+  NSColorPicker = objcclass external;
+  NSColorWell = objcclass external;
+  NSComboBox = objcclass external;
+  NSTableView = objcclass external;
+  NSComboBoxCell = objcclass external;
+  NSControl = objcclass external;
+  NSController = objcclass external;
+  NSCursor = objcclass external;
+  NSCustomImageRep = objcclass external;
+  NSDatePicker = objcclass external;
+  NSDatePickerCell = objcclass external;
+  NSDictionaryController = objcclass external;
+  NSMenuItem = objcclass external;
+  NSPageLayout = objcclass external;
+  NSPrintInfo = objcclass external;
+  NSPrintOperation = objcclass external;
+  NSSavePanel = objcclass external;
+  NSWindowController = objcclass external;
+  NSDocument = objcclass external;
+  NSOpenPanel = objcclass external;
+  NSDocumentController = objcclass external;
+  NSDrawer = objcclass external;
+  NSPDFImageRep = objcclass external;
+  NSEPSImageRep = objcclass external;
+  NSTrackingArea = objcclass external;
+  NSFontDescriptor = objcclass external;
+  NSFontPanel = objcclass external;
+  NSFontManager = objcclass external;
+  NSFormCell = objcclass external;
+  NSGlyphGenerator = objcclass external;
+  NSGlyphInfo = objcclass external;
+  NSGradient = objcclass external;
+  CIContext = objcclass external;
+  NSHelpManager = objcclass external;
+  NSImageRep = objcclass external;
+  _NSImageAuxiliary = objcclass external;
+  NSImageCell = objcclass external;
+  NSImageView = objcclass external;
+  NSInputServer = objcclass external;
+  NSInputManager = objcclass external;
+  NSTextStorage = objcclass external;
+  NSTypesetter = objcclass external;
+  NSTextContainer = objcclass external;
+  NSRulerView = objcclass external;
+  NSParagraphStyle = objcclass external;
+  NSRulerMarker = objcclass external;
+  NSTabWell = objcclass external;
+  NSStorage = objcclass external;
+  NSRunStorage = objcclass external;
+  NSSortedArray = objcclass external;
+  NSLayoutManager = objcclass external;
+  NSLevelIndicator = objcclass external;
+  NSLevelIndicatorCell = objcclass external;
+  NSMenuView = objcclass external;
+  NSMenuItemCell = objcclass external;
+  NSScreen = objcclass external;
+  QTMovie = objcclass external;
+  NSMovie = objcclass external;
+  NSMovieView = objcclass external;
+  NSIBObjectData = objcclass external;
+  NSNibConnector = objcclass external;
+  NSNibControlConnector = objcclass external;
+  NSNibOutletConnector = objcclass external;
+  NSManagedObjectContext = objcclass external;
+  NSFetchRequest = objcclass external;
+  NSObjectController = objcclass external;
+  NSOpenGLPixelFormat = objcclass external;
+  NSOpenGLPixelBuffer = objcclass external;
+  NSOpenGLContext = objcclass external;
+  NSOpenGLLayer = objcclass external;
+  NSOpenGLView = objcclass external;
+  NSTableHeaderView = objcclass external;
+  NSTableColumn = objcclass external;
+  NSMouseTracker = objcclass external;
+  NSOutlineView = objcclass external;
+  NSViewController = objcclass external;
+  NSTextTab = objcclass external;
+  NSMutableParagraphStyle = objcclass external;
+  NSPasteboardItem = objcclass external;
+  NSPathComponentCell = objcclass external;
+  NSPopUpButtonCell = objcclass external;
+  NSPathCell = objcclass external;
+  NSPathControl = objcclass external;
+  NSManagedObjectModel = objcclass external;
+  NSPersistentDocument = objcclass external;
+  NSPICTImageRep = objcclass external;
+  NSPopUpButton = objcclass external;
+  NSPredicateTemplate = objcclass external;
+  NSPredicateEditor = objcclass external;
+  NSEntityDescription = objcclass external;
+  NSPredicateEditorRowTemplate = objcclass external;
+  NSPrinter = objcclass external;
+  NSPrintPanel = objcclass external;
+  NSProgressIndicator = objcclass external;
+  NSQuickDrawView = objcclass external;
+  NSResponder = objcclass external;
+  NSRuleEditor = objcclass external;
+  NSScrollView = objcclass external;
+  NSRunningApplication = objcclass external;
+  NSNavView = objcclass external;
+  NSSavePanelAuxiliary = objcclass external;
+  NSSearchField = objcclass external;
+  NSSearchFieldCell = objcclass external;
+  NSSecureTextField = objcclass external;
+  NSSecureTextFieldCell = objcclass external;
+  NSSegmentedCell = objcclass external;
+  NSSegmentedControl = objcclass external;
+  NSShadow = objcclass external;
+  NSSimpleHorizontalTypesetter = objcclass external;
+  NSSlider = objcclass external;
+  NSSliderCell = objcclass external;
+  NSSpeechRecognizer = objcclass external;
+  NSSpeechSynthesizer = objcclass external;
+  NSSpellChecker = objcclass external;
+  NSSplitView = objcclass external;
+  NSStatusItem = objcclass external;
+  NSStatusBar = objcclass external;
+  NSStepper = objcclass external;
+  NSStepperCell = objcclass external;
+  NSTableHeaderCell = objcclass external;
+  NSTabViewItem = objcclass external;
+  NSTabView = objcclass external;
+  NSTextAttachment = objcclass external;
+  NSTextAttachmentCell = objcclass external;
+  NSTextFieldCell = objcclass external;
+  NSTextInputContext = objcclass external;
+  NSTextTableBlock = objcclass external;
+  NSTokenField = objcclass external;
+  NSTokenFieldCell = objcclass external;
+  NSToolbarItem = objcclass external;
+  NSToolbar = objcclass external;
+  NSToolbarItemViewer = objcclass external;
+  NSToolbarItemGroup = objcclass external;
+  NSTouch = objcclass external;
+  NSTreeNode = objcclass external;
+  NSTreeController = objcclass external;
+  NSUserDefaultsController = objcclass external;
+  CIFilter = objcclass external;
+  CALayer = objcclass external;
+  _NSViewAuxiliary = objcclass external;
+  NSWindowAuxiliary = objcclass external;
+  NSWorkspace = objcclass external;
+  CAMediaTimingFunction = objcclass external;
+  CAValueFunction = objcclass external;
+  CAAnimation = objcclass external;
+  CAPropertyAnimation = objcclass external;
+  CABasicAnimation = objcclass external;
+  CAKeyframeAnimation = objcclass external;
+  CATransition = objcclass external;
+  CAAnimationGroup = objcclass external;
+  CAConstraint = objcclass external;
+  CAConstraintLayoutManager = objcclass external;
+  CAEmitterCell = objcclass external;
+  CAEmitterLayer = objcclass external;
+  CAGradientLayer = objcclass external;
+  CALayerArray = objcclass external;
+  CAOpenGLLayer = objcclass external;
+  CARenderer = objcclass external;
+  CAReplicatorLayer = objcclass external;
+  CAScrollLayer = objcclass external;
+  CAShapeLayer = objcclass external;
+  CATextLayer = objcclass external;
+  CATiledLayer = objcclass external;
+  CATransaction = objcclass external;
+  CATransformLayer = objcclass external;
+  CIColor = objcclass external;
+  CIKernel = objcclass external;
+  CIFilterGenerator = objcclass external;
+  CIFilterShape = objcclass external;
+  CIImageAccumulator = objcclass external;
+  CIPlugIn = objcclass external;
+  CISampler = objcclass external;
+  CIVector = objcclass external;
 
 
 implementation
 implementation
 
 

+ 329 - 329
packages/cocoaint/src/AnonClassDefinitionsWebkit.pas

@@ -9,335 +9,335 @@ unit AnonClassDefinitionsWebkit;
 interface
 interface
 
 
 type
 type
-  Protocol = objcclass; external;
-  NSAffineTransform = objcclass; external;
-  NSData = objcclass; external;
-  NSAppleEventDescriptor = objcclass; external;
-  NSAppleEventManager = objcclass; external;
-  NSDictionary = objcclass; external;
-  NSString = objcclass; external;
-  NSURL = objcclass; external;
-  NSAppleScript = objcclass; external;
-  NSMutableData = objcclass; external;
-  NSMutableDictionary = objcclass; external;
-  NSMutableArray = objcclass; external;
-  NSArchiver = objcclass; external;
-  NSUnarchiver = objcclass; external;
-  NSIndexSet = objcclass; external;
-  NSArray = objcclass; external;
-  NSAttributedString = objcclass; external;
-  NSMutableAttributedString = objcclass; external;
-  NSAutoreleasePool = objcclass; external;
-  NSError = objcclass; external;
-  NSBundle = objcclass; external;
-  NSCache = objcclass; external;
-  NSDateComponents = objcclass; external;
-  NSLocale = objcclass; external;
-  NSTimeZone = objcclass; external;
-  NSCalendar = objcclass; external;
-  NSCalendarDate = objcclass; external;
-  NSCharacterSet = objcclass; external;
-  NSMutableCharacterSet = objcclass; external;
-  NSClassDescription = objcclass; external;
-  NSCoder = objcclass; external;
-  NSPredicateOperator = objcclass; external;
-  NSExpression = objcclass; external;
-  NSComparisonPredicate = objcclass; external;
-  NSCompoundPredicate = objcclass; external;
-  NSDistantObject = objcclass; external;
-  NSException = objcclass; external;
-  NSPort = objcclass; external;
-  NSRunLoop = objcclass; external;
-  NSPortNameServer = objcclass; external;
-  NSDistantObjectRequest = objcclass; external;
-  NSConnection = objcclass; external;
-  NSPurgeableData = objcclass; external;
-  NSDate = objcclass; external;
-  NSDateFormatter = objcclass; external;
-  NSDecimalNumber = objcclass; external;
-  NSDecimalNumberHandler = objcclass; external;
-  NSSet = objcclass; external;
-  NSDistributedLock = objcclass; external;
-  NSDistributedNotificationCenter = objcclass; external;
-  NSEnumerator = objcclass; external;
-  NSAssertionHandler = objcclass; external;
-  NSPredicate = objcclass; external;
-  NSFileHandle = objcclass; external;
-  NSPipe = objcclass; external;
-  NSDirectoryEnumerator = objcclass; external;
-  NSNumber = objcclass; external;
-  NSFileManager = objcclass; external;
-  NSFormatter = objcclass; external;
-  NSGarbageCollector = objcclass; external;
-  NSHashTable = objcclass; external;
-  NSHost = objcclass; external;
-  NSHTTPCookieInternal = objcclass; external;
-  NSHTTPCookie = objcclass; external;
-  NSHTTPCookieStorageInternal = objcclass; external;
-  NSHTTPCookieStorage = objcclass; external;
-  NSIndexPath = objcclass; external;
-  NSMutableIndexSet = objcclass; external;
-  NSMethodSignature = objcclass; external;
-  NSInvocation = objcclass; external;
-  NSKeyedArchiver = objcclass; external;
-  NSKeyedUnarchiver = objcclass; external;
-  NSLock = objcclass; external;
-  NSConditionLock = objcclass; external;
-  NSRecursiveLock = objcclass; external;
-  NSCondition = objcclass; external;
-  NSMapTable = objcclass; external;
-  NSMetadataItem = objcclass; external;
-  NSMetadataQueryAttributeValueTuple = objcclass; external;
-  NSMetadataQueryResultGroup = objcclass; external;
-  NSMetadataQuery = objcclass; external;
-  NSInputStream = objcclass; external;
-  NSOutputStream = objcclass; external;
-  NSNetService = objcclass; external;
-  NSNetServiceBrowser = objcclass; external;
-  NSOperationQueue = objcclass; external;
-  NSNotification = objcclass; external;
-  NSNotificationCenter = objcclass; external;
-  NSNotificationQueue = objcclass; external;
-  NSNull = objcclass; external;
-  NSNumberFormatter = objcclass; external;
-  NSObject = objcclass; external;
-  NSScriptObjectSpecifier = objcclass; external;
-  NSOperation = objcclass; external;
-  NSBlockOperation = objcclass; external;
-  NSInvocationOperation = objcclass; external;
-  NSOrthography = objcclass; external;
-  NSPointerArray = objcclass; external;
-  NSPointerFunctions = objcclass; external;
-  NSPortMessage = objcclass; external;
-  NSMachPort = objcclass; external;
-  NSMessagePort = objcclass; external;
-  NSSocketPort = objcclass; external;
-  NSPortCoder = objcclass; external;
-  NSMachBootstrapServer = objcclass; external;
-  NSMessagePortNameServer = objcclass; external;
-  NSSocketPortNameServer = objcclass; external;
-  NSProcessInfo = objcclass; external;
-  NSPropertyListSerialization = objcclass; external;
-  NSProtocolChecker = objcclass; external;
-  NSProxy = objcclass; external;
-  NSTimer = objcclass; external;
-  NSScanner = objcclass; external;
-  NSScriptCommandDescription = objcclass; external;
-  NSScriptClassDescription = objcclass; external;
-  NSScriptCoercionHandler = objcclass; external;
-  NSScriptCommand = objcclass; external;
-  NSScriptExecutionContext = objcclass; external;
-  NSScriptWhoseTest = objcclass; external;
-  NSIndexSpecifier = objcclass; external;
-  NSMiddleSpecifier = objcclass; external;
-  NSNameSpecifier = objcclass; external;
-  NSPositionalSpecifier = objcclass; external;
-  NSPropertySpecifier = objcclass; external;
-  NSRandomSpecifier = objcclass; external;
-  NSRangeSpecifier = objcclass; external;
-  NSRelativeSpecifier = objcclass; external;
-  NSUniqueIDSpecifier = objcclass; external;
-  NSWhoseSpecifier = objcclass; external;
-  NSCloneCommand = objcclass; external;
-  NSCloseCommand = objcclass; external;
-  NSCountCommand = objcclass; external;
-  NSCreateCommand = objcclass; external;
-  NSDeleteCommand = objcclass; external;
-  NSExistsCommand = objcclass; external;
-  NSGetCommand = objcclass; external;
-  NSMoveCommand = objcclass; external;
-  NSQuitCommand = objcclass; external;
-  NSSetCommand = objcclass; external;
-  NSMutableSet = objcclass; external;
-  NSScriptSuiteRegistry = objcclass; external;
-  NSLogicalTest = objcclass; external;
-  NSSpecifierTest = objcclass; external;
-  NSCountedSet = objcclass; external;
-  NSSortDescriptor = objcclass; external;
-  NSSpellServer = objcclass; external;
-  NSStream = objcclass; external;
-  NSMutableString = objcclass; external;
-  NSSimpleCString = objcclass; external;
-  NSConstantString = objcclass; external;
-  NSTask = objcclass; external;
-  NSTextCheckingResult = objcclass; external;
-  NSThread = objcclass; external;
-  NSUndoManager = objcclass; external;
-  NSURLAuthenticationChallenge = objcclass; external;
-  NSURLCredential = objcclass; external;
-  NSURLProtectionSpace = objcclass; external;
-  NSURLResponse = objcclass; external;
-  NSURLAuthenticationChallengeInternal = objcclass; external;
-  NSCachedURLResponseInternal = objcclass; external;
-  NSURLRequest = objcclass; external;
-  NSCachedURLResponse = objcclass; external;
-  NSURLCacheInternal = objcclass; external;
-  NSURLCache = objcclass; external;
-  NSURLConnectionInternal = objcclass; external;
-  NSURLConnection = objcclass; external;
-  NSURLCredentialInternal = objcclass; external;
-  NSURLCredentialStorageInternal = objcclass; external;
-  NSURLCredentialStorage = objcclass; external;
-  NSURLDownloadInternal = objcclass; external;
-  NSURLDownload = objcclass; external;
-  NSURLHandle = objcclass; external;
-  NSURLProtectionSpaceInternal = objcclass; external;
-  NSMutableURLRequest = objcclass; external;
-  NSURLProtocol = objcclass; external;
-  NSURLProtocolInternal = objcclass; external;
-  NSURLRequestInternal = objcclass; external;
-  NSURLResponseInternal = objcclass; external;
-  NSHTTPURLResponseInternal = objcclass; external;
-  NSHTTPURLResponse = objcclass; external;
-  NSUserDefaults = objcclass; external;
-  NSValue = objcclass; external;
-  NSValueTransformer = objcclass; external;
-  NSXMLDTD = objcclass; external;
-  NSXMLDocument = objcclass; external;
-  NSXMLDTDNode = objcclass; external;
-  NSXMLElement = objcclass; external;
-  NSXMLNode = objcclass; external;
-  NSXMLParser = objcclass; external;
-  NSImage = objcclass; external;
-  DOMDocument = objcclass; external;
-  DOMAbstractView = objcclass; external;
-  DOMCSSStyleDeclaration = objcclass; external;
-  DOMElement = objcclass; external;
-  DOMAttr = objcclass; external;
-  DOMCDATASection = objcclass; external;
-  DOMCharacterData = objcclass; external;
-  DOMComment = objcclass; external;
-  DOMCounter = objcclass; external;
-  DOMCSSCharsetRule = objcclass; external;
-  DOMCSSFontFaceRule = objcclass; external;
-  DOMCSSStyleSheet = objcclass; external;
-  DOMMediaList = objcclass; external;
-  DOMCSSImportRule = objcclass; external;
-  DOMCSSRuleList = objcclass; external;
-  DOMCSSMediaRule = objcclass; external;
-  DOMCSSPageRule = objcclass; external;
-  DOMRGBColor = objcclass; external;
-  DOMRect = objcclass; external;
-  DOMCSSPrimitiveValue = objcclass; external;
-  DOMCSSRule = objcclass; external;
-  DOMCSSValue = objcclass; external;
-  DOMCSSStyleRule = objcclass; external;
-  DOMCSSUnknownRule = objcclass; external;
-  DOMCSSValueList = objcclass; external;
-  DOMDocumentFragment = objcclass; external;
-  DOMDocumentType = objcclass; external;
-  DOMEntityReference = objcclass; external;
-  DOMEvent = objcclass; external;
-  DOMHTMLCollection = objcclass; external;
-  DOMHTMLElement = objcclass; external;
-  DOMImplementation = objcclass; external;
-  DOMNode = objcclass; external;
-  DOMNodeIterator = objcclass; external;
-  DOMNodeList = objcclass; external;
-  DOMProcessingInstruction = objcclass; external;
-  DOMRange = objcclass; external;
-  DOMStyleSheetList = objcclass; external;
-  DOMText = objcclass; external;
-  DOMTreeWalker = objcclass; external;
-  DOMXPathExpression = objcclass; external;
-  DOMXPathResult = objcclass; external;
-  DOMNamedNodeMap = objcclass; external;
-  DOMEntity = objcclass; external;
-  DOMFile = objcclass; external;
-  DOMFileList = objcclass; external;
-  DOMHTMLAnchorElement = objcclass; external;
-  DOMHTMLAppletElement = objcclass; external;
-  DOMHTMLAreaElement = objcclass; external;
-  DOMHTMLBaseElement = objcclass; external;
-  DOMHTMLBaseFontElement = objcclass; external;
-  DOMHTMLBodyElement = objcclass; external;
-  DOMHTMLBRElement = objcclass; external;
-  DOMHTMLFormElement = objcclass; external;
-  DOMHTMLButtonElement = objcclass; external;
-  DOMHTMLDirectoryElement = objcclass; external;
-  DOMHTMLDivElement = objcclass; external;
-  DOMHTMLDListElement = objcclass; external;
-  DOMHTMLDocument = objcclass; external;
-  DOMHTMLEmbedElement = objcclass; external;
-  DOMHTMLFieldSetElement = objcclass; external;
-  DOMHTMLFontElement = objcclass; external;
-  DOMHTMLFrameElement = objcclass; external;
-  DOMHTMLFrameSetElement = objcclass; external;
-  DOMHTMLHeadElement = objcclass; external;
-  DOMHTMLHeadingElement = objcclass; external;
-  DOMHTMLHRElement = objcclass; external;
-  DOMHTMLHtmlElement = objcclass; external;
-  DOMHTMLIFrameElement = objcclass; external;
-  DOMHTMLImageElement = objcclass; external;
-  DOMHTMLInputElement = objcclass; external;
-  DOMHTMLIsIndexElement = objcclass; external;
-  DOMHTMLLabelElement = objcclass; external;
-  DOMHTMLLegendElement = objcclass; external;
-  DOMHTMLLIElement = objcclass; external;
-  DOMStyleSheet = objcclass; external;
-  DOMHTMLLinkElement = objcclass; external;
-  DOMHTMLMapElement = objcclass; external;
-  DOMHTMLMarqueeElement = objcclass; external;
-  DOMHTMLMenuElement = objcclass; external;
-  DOMHTMLMetaElement = objcclass; external;
-  DOMHTMLModElement = objcclass; external;
-  DOMHTMLObjectElement = objcclass; external;
-  DOMHTMLOListElement = objcclass; external;
-  DOMHTMLOptGroupElement = objcclass; external;
-  DOMHTMLOptionElement = objcclass; external;
-  DOMHTMLOptionsCollection = objcclass; external;
-  DOMHTMLParagraphElement = objcclass; external;
-  DOMHTMLParamElement = objcclass; external;
-  DOMHTMLPreElement = objcclass; external;
-  DOMHTMLQuoteElement = objcclass; external;
-  DOMHTMLScriptElement = objcclass; external;
-  DOMHTMLSelectElement = objcclass; external;
-  DOMHTMLStyleElement = objcclass; external;
-  DOMHTMLTableCaptionElement = objcclass; external;
-  DOMHTMLTableCellElement = objcclass; external;
-  DOMHTMLTableColElement = objcclass; external;
-  DOMHTMLTableSectionElement = objcclass; external;
-  DOMHTMLTableElement = objcclass; external;
-  DOMHTMLTableRowElement = objcclass; external;
-  DOMHTMLTextAreaElement = objcclass; external;
-  DOMHTMLTitleElement = objcclass; external;
-  DOMHTMLUListElement = objcclass; external;
-  DOMKeyboardEvent = objcclass; external;
-  DOMMouseEvent = objcclass; external;
-  DOMMutationEvent = objcclass; external;
-  DOMNotation = objcclass; external;
-  DOMObject = objcclass; external;
-  DOMOverflowEvent = objcclass; external;
-  DOMProgressEvent = objcclass; external;
-  NSColor = objcclass; external;
-  DOMUIEvent = objcclass; external;
-  DOMWheelEvent = objcclass; external;
-  WebView = objcclass; external;
-  WebArchivePrivate = objcclass; external;
-  WebResource = objcclass; external;
-  WebArchive = objcclass; external;
-  WebHistoryItem = objcclass; external;
-  WebBackForwardListPrivate = objcclass; external;
-  WebBackForwardList = objcclass; external;
-  WebDataSourcePrivate = objcclass; external;
-  WebFrame = objcclass; external;
-  WebDataSource = objcclass; external;
-  WebDownloadInternal = objcclass; external;
-  WebDownload = objcclass; external;
-  WebFramePrivate = objcclass; external;
-  WebFrameView = objcclass; external;
-  WebScriptObject = objcclass; external;
-  WebFrameViewPrivate = objcclass; external;
-  WebHistoryPrivate = objcclass; external;
-  WebHistory = objcclass; external;
-  WebHistoryItemPrivate = objcclass; external;
-  WebPolicyPrivate = objcclass; external;
-  WebPreferencesPrivate = objcclass; external;
-  WebPreferences = objcclass; external;
-  WebResourcePrivate = objcclass; external;
-  WebScriptObjectPrivate = objcclass; external;
-  WebUndefined = objcclass; external;
-  WebViewPrivate = objcclass; external;
+  Protocol = objcclass external;
+  NSAffineTransform = objcclass external;
+  NSData = objcclass external;
+  NSAppleEventDescriptor = objcclass external;
+  NSAppleEventManager = objcclass external;
+  NSDictionary = objcclass external;
+  NSString = objcclass external;
+  NSURL = objcclass external;
+  NSAppleScript = objcclass external;
+  NSMutableData = objcclass external;
+  NSMutableDictionary = objcclass external;
+  NSMutableArray = objcclass external;
+  NSArchiver = objcclass external;
+  NSUnarchiver = objcclass external;
+  NSIndexSet = objcclass external;
+  NSArray = objcclass external;
+  NSAttributedString = objcclass external;
+  NSMutableAttributedString = objcclass external;
+  NSAutoreleasePool = objcclass external;
+  NSError = objcclass external;
+  NSBundle = objcclass external;
+  NSCache = objcclass external;
+  NSDateComponents = objcclass external;
+  NSLocale = objcclass external;
+  NSTimeZone = objcclass external;
+  NSCalendar = objcclass external;
+  NSCalendarDate = objcclass external;
+  NSCharacterSet = objcclass external;
+  NSMutableCharacterSet = objcclass external;
+  NSClassDescription = objcclass external;
+  NSCoder = objcclass external;
+  NSPredicateOperator = objcclass external;
+  NSExpression = objcclass external;
+  NSComparisonPredicate = objcclass external;
+  NSCompoundPredicate = objcclass external;
+  NSDistantObject = objcclass external;
+  NSException = objcclass external;
+  NSPort = objcclass external;
+  NSRunLoop = objcclass external;
+  NSPortNameServer = objcclass external;
+  NSDistantObjectRequest = objcclass external;
+  NSConnection = objcclass external;
+  NSPurgeableData = objcclass external;
+  NSDate = objcclass external;
+  NSDateFormatter = objcclass external;
+  NSDecimalNumber = objcclass external;
+  NSDecimalNumberHandler = objcclass external;
+  NSSet = objcclass external;
+  NSDistributedLock = objcclass external;
+  NSDistributedNotificationCenter = objcclass external;
+  NSEnumerator = objcclass external;
+  NSAssertionHandler = objcclass external;
+  NSPredicate = objcclass external;
+  NSFileHandle = objcclass external;
+  NSPipe = objcclass external;
+  NSDirectoryEnumerator = objcclass external;
+  NSNumber = objcclass external;
+  NSFileManager = objcclass external;
+  NSFormatter = objcclass external;
+  NSGarbageCollector = objcclass external;
+  NSHashTable = objcclass external;
+  NSHost = objcclass external;
+  NSHTTPCookieInternal = objcclass external;
+  NSHTTPCookie = objcclass external;
+  NSHTTPCookieStorageInternal = objcclass external;
+  NSHTTPCookieStorage = objcclass external;
+  NSIndexPath = objcclass external;
+  NSMutableIndexSet = objcclass external;
+  NSMethodSignature = objcclass external;
+  NSInvocation = objcclass external;
+  NSKeyedArchiver = objcclass external;
+  NSKeyedUnarchiver = objcclass external;
+  NSLock = objcclass external;
+  NSConditionLock = objcclass external;
+  NSRecursiveLock = objcclass external;
+  NSCondition = objcclass external;
+  NSMapTable = objcclass external;
+  NSMetadataItem = objcclass external;
+  NSMetadataQueryAttributeValueTuple = objcclass external;
+  NSMetadataQueryResultGroup = objcclass external;
+  NSMetadataQuery = objcclass external;
+  NSInputStream = objcclass external;
+  NSOutputStream = objcclass external;
+  NSNetService = objcclass external;
+  NSNetServiceBrowser = objcclass external;
+  NSOperationQueue = objcclass external;
+  NSNotification = objcclass external;
+  NSNotificationCenter = objcclass external;
+  NSNotificationQueue = objcclass external;
+  NSNull = objcclass external;
+  NSNumberFormatter = objcclass external;
+  NSObject = objcclass external;
+  NSScriptObjectSpecifier = objcclass external;
+  NSOperation = objcclass external;
+  NSBlockOperation = objcclass external;
+  NSInvocationOperation = objcclass external;
+  NSOrthography = objcclass external;
+  NSPointerArray = objcclass external;
+  NSPointerFunctions = objcclass external;
+  NSPortMessage = objcclass external;
+  NSMachPort = objcclass external;
+  NSMessagePort = objcclass external;
+  NSSocketPort = objcclass external;
+  NSPortCoder = objcclass external;
+  NSMachBootstrapServer = objcclass external;
+  NSMessagePortNameServer = objcclass external;
+  NSSocketPortNameServer = objcclass external;
+  NSProcessInfo = objcclass external;
+  NSPropertyListSerialization = objcclass external;
+  NSProtocolChecker = objcclass external;
+  NSProxy = objcclass external;
+  NSTimer = objcclass external;
+  NSScanner = objcclass external;
+  NSScriptCommandDescription = objcclass external;
+  NSScriptClassDescription = objcclass external;
+  NSScriptCoercionHandler = objcclass external;
+  NSScriptCommand = objcclass external;
+  NSScriptExecutionContext = objcclass external;
+  NSScriptWhoseTest = objcclass external;
+  NSIndexSpecifier = objcclass external;
+  NSMiddleSpecifier = objcclass external;
+  NSNameSpecifier = objcclass external;
+  NSPositionalSpecifier = objcclass external;
+  NSPropertySpecifier = objcclass external;
+  NSRandomSpecifier = objcclass external;
+  NSRangeSpecifier = objcclass external;
+  NSRelativeSpecifier = objcclass external;
+  NSUniqueIDSpecifier = objcclass external;
+  NSWhoseSpecifier = objcclass external;
+  NSCloneCommand = objcclass external;
+  NSCloseCommand = objcclass external;
+  NSCountCommand = objcclass external;
+  NSCreateCommand = objcclass external;
+  NSDeleteCommand = objcclass external;
+  NSExistsCommand = objcclass external;
+  NSGetCommand = objcclass external;
+  NSMoveCommand = objcclass external;
+  NSQuitCommand = objcclass external;
+  NSSetCommand = objcclass external;
+  NSMutableSet = objcclass external;
+  NSScriptSuiteRegistry = objcclass external;
+  NSLogicalTest = objcclass external;
+  NSSpecifierTest = objcclass external;
+  NSCountedSet = objcclass external;
+  NSSortDescriptor = objcclass external;
+  NSSpellServer = objcclass external;
+  NSStream = objcclass external;
+  NSMutableString = objcclass external;
+  NSSimpleCString = objcclass external;
+  NSConstantString = objcclass external;
+  NSTask = objcclass external;
+  NSTextCheckingResult = objcclass external;
+  NSThread = objcclass external;
+  NSUndoManager = objcclass external;
+  NSURLAuthenticationChallenge = objcclass external;
+  NSURLCredential = objcclass external;
+  NSURLProtectionSpace = objcclass external;
+  NSURLResponse = objcclass external;
+  NSURLAuthenticationChallengeInternal = objcclass external;
+  NSCachedURLResponseInternal = objcclass external;
+  NSURLRequest = objcclass external;
+  NSCachedURLResponse = objcclass external;
+  NSURLCacheInternal = objcclass external;
+  NSURLCache = objcclass external;
+  NSURLConnectionInternal = objcclass external;
+  NSURLConnection = objcclass external;
+  NSURLCredentialInternal = objcclass external;
+  NSURLCredentialStorageInternal = objcclass external;
+  NSURLCredentialStorage = objcclass external;
+  NSURLDownloadInternal = objcclass external;
+  NSURLDownload = objcclass external;
+  NSURLHandle = objcclass external;
+  NSURLProtectionSpaceInternal = objcclass external;
+  NSMutableURLRequest = objcclass external;
+  NSURLProtocol = objcclass external;
+  NSURLProtocolInternal = objcclass external;
+  NSURLRequestInternal = objcclass external;
+  NSURLResponseInternal = objcclass external;
+  NSHTTPURLResponseInternal = objcclass external;
+  NSHTTPURLResponse = objcclass external;
+  NSUserDefaults = objcclass external;
+  NSValue = objcclass external;
+  NSValueTransformer = objcclass external;
+  NSXMLDTD = objcclass external;
+  NSXMLDocument = objcclass external;
+  NSXMLDTDNode = objcclass external;
+  NSXMLElement = objcclass external;
+  NSXMLNode = objcclass external;
+  NSXMLParser = objcclass external;
+  NSImage = objcclass external;
+  DOMDocument = objcclass external;
+  DOMAbstractView = objcclass external;
+  DOMCSSStyleDeclaration = objcclass external;
+  DOMElement = objcclass external;
+  DOMAttr = objcclass external;
+  DOMCDATASection = objcclass external;
+  DOMCharacterData = objcclass external;
+  DOMComment = objcclass external;
+  DOMCounter = objcclass external;
+  DOMCSSCharsetRule = objcclass external;
+  DOMCSSFontFaceRule = objcclass external;
+  DOMCSSStyleSheet = objcclass external;
+  DOMMediaList = objcclass external;
+  DOMCSSImportRule = objcclass external;
+  DOMCSSRuleList = objcclass external;
+  DOMCSSMediaRule = objcclass external;
+  DOMCSSPageRule = objcclass external;
+  DOMRGBColor = objcclass external;
+  DOMRect = objcclass external;
+  DOMCSSPrimitiveValue = objcclass external;
+  DOMCSSRule = objcclass external;
+  DOMCSSValue = objcclass external;
+  DOMCSSStyleRule = objcclass external;
+  DOMCSSUnknownRule = objcclass external;
+  DOMCSSValueList = objcclass external;
+  DOMDocumentFragment = objcclass external;
+  DOMDocumentType = objcclass external;
+  DOMEntityReference = objcclass external;
+  DOMEvent = objcclass external;
+  DOMHTMLCollection = objcclass external;
+  DOMHTMLElement = objcclass external;
+  DOMImplementation = objcclass external;
+  DOMNode = objcclass external;
+  DOMNodeIterator = objcclass external;
+  DOMNodeList = objcclass external;
+  DOMProcessingInstruction = objcclass external;
+  DOMRange = objcclass external;
+  DOMStyleSheetList = objcclass external;
+  DOMText = objcclass external;
+  DOMTreeWalker = objcclass external;
+  DOMXPathExpression = objcclass external;
+  DOMXPathResult = objcclass external;
+  DOMNamedNodeMap = objcclass external;
+  DOMEntity = objcclass external;
+  DOMFile = objcclass external;
+  DOMFileList = objcclass external;
+  DOMHTMLAnchorElement = objcclass external;
+  DOMHTMLAppletElement = objcclass external;
+  DOMHTMLAreaElement = objcclass external;
+  DOMHTMLBaseElement = objcclass external;
+  DOMHTMLBaseFontElement = objcclass external;
+  DOMHTMLBodyElement = objcclass external;
+  DOMHTMLBRElement = objcclass external;
+  DOMHTMLFormElement = objcclass external;
+  DOMHTMLButtonElement = objcclass external;
+  DOMHTMLDirectoryElement = objcclass external;
+  DOMHTMLDivElement = objcclass external;
+  DOMHTMLDListElement = objcclass external;
+  DOMHTMLDocument = objcclass external;
+  DOMHTMLEmbedElement = objcclass external;
+  DOMHTMLFieldSetElement = objcclass external;
+  DOMHTMLFontElement = objcclass external;
+  DOMHTMLFrameElement = objcclass external;
+  DOMHTMLFrameSetElement = objcclass external;
+  DOMHTMLHeadElement = objcclass external;
+  DOMHTMLHeadingElement = objcclass external;
+  DOMHTMLHRElement = objcclass external;
+  DOMHTMLHtmlElement = objcclass external;
+  DOMHTMLIFrameElement = objcclass external;
+  DOMHTMLImageElement = objcclass external;
+  DOMHTMLInputElement = objcclass external;
+  DOMHTMLIsIndexElement = objcclass external;
+  DOMHTMLLabelElement = objcclass external;
+  DOMHTMLLegendElement = objcclass external;
+  DOMHTMLLIElement = objcclass external;
+  DOMStyleSheet = objcclass external;
+  DOMHTMLLinkElement = objcclass external;
+  DOMHTMLMapElement = objcclass external;
+  DOMHTMLMarqueeElement = objcclass external;
+  DOMHTMLMenuElement = objcclass external;
+  DOMHTMLMetaElement = objcclass external;
+  DOMHTMLModElement = objcclass external;
+  DOMHTMLObjectElement = objcclass external;
+  DOMHTMLOListElement = objcclass external;
+  DOMHTMLOptGroupElement = objcclass external;
+  DOMHTMLOptionElement = objcclass external;
+  DOMHTMLOptionsCollection = objcclass external;
+  DOMHTMLParagraphElement = objcclass external;
+  DOMHTMLParamElement = objcclass external;
+  DOMHTMLPreElement = objcclass external;
+  DOMHTMLQuoteElement = objcclass external;
+  DOMHTMLScriptElement = objcclass external;
+  DOMHTMLSelectElement = objcclass external;
+  DOMHTMLStyleElement = objcclass external;
+  DOMHTMLTableCaptionElement = objcclass external;
+  DOMHTMLTableCellElement = objcclass external;
+  DOMHTMLTableColElement = objcclass external;
+  DOMHTMLTableSectionElement = objcclass external;
+  DOMHTMLTableElement = objcclass external;
+  DOMHTMLTableRowElement = objcclass external;
+  DOMHTMLTextAreaElement = objcclass external;
+  DOMHTMLTitleElement = objcclass external;
+  DOMHTMLUListElement = objcclass external;
+  DOMKeyboardEvent = objcclass external;
+  DOMMouseEvent = objcclass external;
+  DOMMutationEvent = objcclass external;
+  DOMNotation = objcclass external;
+  DOMObject = objcclass external;
+  DOMOverflowEvent = objcclass external;
+  DOMProgressEvent = objcclass external;
+  NSColor = objcclass external;
+  DOMUIEvent = objcclass external;
+  DOMWheelEvent = objcclass external;
+  WebView = objcclass external;
+  WebArchivePrivate = objcclass external;
+  WebResource = objcclass external;
+  WebArchive = objcclass external;
+  WebHistoryItem = objcclass external;
+  WebBackForwardListPrivate = objcclass external;
+  WebBackForwardList = objcclass external;
+  WebDataSourcePrivate = objcclass external;
+  WebFrame = objcclass external;
+  WebDataSource = objcclass external;
+  WebDownloadInternal = objcclass external;
+  WebDownload = objcclass external;
+  WebFramePrivate = objcclass external;
+  WebFrameView = objcclass external;
+  WebScriptObject = objcclass external;
+  WebFrameViewPrivate = objcclass external;
+  WebHistoryPrivate = objcclass external;
+  WebHistory = objcclass external;
+  WebHistoryItemPrivate = objcclass external;
+  WebPolicyPrivate = objcclass external;
+  WebPreferencesPrivate = objcclass external;
+  WebPreferences = objcclass external;
+  WebResourcePrivate = objcclass external;
+  WebScriptObjectPrivate = objcclass external;
+  WebUndefined = objcclass external;
+  WebViewPrivate = objcclass external;
 
 
 implementation
 implementation
 
 

+ 11 - 13
packages/cocoaint/src/appkit/NSATSTypesetter.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSATSTypesetter.h }
 { Parsed from Appkit.framework NSATSTypesetter.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSATSTYPESETTER_PAS_C}
 {$define NSATSTYPESETTER_PAS_C}
 
 
 { NSATSTypesetter }
 { NSATSTypesetter }
-  NSATSTypesetter = objcclass(NSTypesetter)
+  NSATSTypesetter = objcclass external (NSTypesetter)
   private
   private
     _attributedString: NSAttributedString;
     _attributedString: NSAttributedString;
     _paragraphGlyphRange: NSRange;
     _paragraphGlyphRange: NSRange;
@@ -58,18 +58,16 @@
     _private: id;
     _private: id;
     
     
   public
   public
-    class function alloc: NSATSTypesetter; message 'alloc';
-
     class function sharedTypesetter: id; message 'sharedTypesetter';
     class function sharedTypesetter: id; message 'sharedTypesetter';
-  end; external;
+  end;
 
 
 { NSPantherCompatibilityCategory }
 { NSPantherCompatibilityCategory }
-  NSPantherCompatibilityCategory = objccategory(NSATSTypesetter)
+  NSPantherCompatibilityCategory = objccategory external (NSATSTypesetter)
     function lineFragmentRectForProposedRect_remainingRect(proposedRect: NSRect; remainingRect: NSRectPointer): NSRect; message 'lineFragmentRectForProposedRect:remainingRect:'; deprecated 'in Mac OS X 10.4 and later';
     function lineFragmentRectForProposedRect_remainingRect(proposedRect: NSRect; remainingRect: NSRectPointer): NSRect; message 'lineFragmentRectForProposedRect:remainingRect:'; deprecated 'in Mac OS X 10.4 and later';
-  end; external;
+  end;
 
 
 { NSPrimitiveInterfaceCategory }
 { NSPrimitiveInterfaceCategory }
-  NSPrimitiveInterfaceCategory = objccategory(NSATSTypesetter)
+  NSPrimitiveInterfaceCategory = objccategory external (NSATSTypesetter)
     function usesFontLeading: Boolean; message 'usesFontLeading';
     function usesFontLeading: Boolean; message 'usesFontLeading';
     procedure setUsesFontLeading(flag: Boolean); message 'setUsesFontLeading:';
     procedure setUsesFontLeading(flag: Boolean); message 'setUsesFontLeading:';
     function typesetterBehavior: NSTypesetterBehavior; message 'typesetterBehavior';
     function typesetterBehavior: NSTypesetterBehavior; message 'typesetterBehavior';
@@ -95,20 +93,20 @@
     function currentTextContainer: NSTextContainer; message 'currentTextContainer';
     function currentTextContainer: NSTextContainer; message 'currentTextContainer';
     procedure setHardInvalidation_forGlyphRange(flag: Boolean; glyphRange: NSRange); message 'setHardInvalidation:forGlyphRange:';
     procedure setHardInvalidation_forGlyphRange(flag: Boolean; glyphRange: NSRange); message 'setHardInvalidation:forGlyphRange:';
     procedure getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin(lineFragmentRect: NSRectPtr; lineFragmentUsedRect: NSRectPtr; paragraphSeparatorGlyphRange_: NSRange; lineOrigin: NSPoint); message 'getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:';
     procedure getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin(lineFragmentRect: NSRectPtr; lineFragmentUsedRect: NSRectPtr; paragraphSeparatorGlyphRange_: NSRange; lineOrigin: NSPoint); message 'getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:';
-  end; external;
+  end;
 
 
 { NSLayoutPhaseInterface_NSATSTypesetterCategory }
 { NSLayoutPhaseInterface_NSATSTypesetterCategory }
-  NSLayoutPhaseInterface_NSATSTypesetterCategory = objccategory(NSATSTypesetter)
+  NSLayoutPhaseInterface_NSATSTypesetterCategory = objccategory external name 'NSLayoutPhaseInterface' (NSATSTypesetter)
     procedure willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset(lineRect: NSRectPtr; glyphRange: NSRange; usedRect: NSRectPtr; baselineOffset: CGFloatPtr); message 'willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:';
     procedure willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset(lineRect: NSRectPtr; glyphRange: NSRange; usedRect: NSRectPtr; baselineOffset: CGFloatPtr); message 'willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:';
     function shouldBreakLineByWordBeforeCharacterAtIndex(charIndex: NSUInteger): Boolean; message 'shouldBreakLineByWordBeforeCharacterAtIndex:';
     function shouldBreakLineByWordBeforeCharacterAtIndex(charIndex: NSUInteger): Boolean; message 'shouldBreakLineByWordBeforeCharacterAtIndex:';
     function shouldBreakLineByHyphenatingBeforeCharacterAtIndex(charIndex: NSUInteger): Boolean; message 'shouldBreakLineByHyphenatingBeforeCharacterAtIndex:';
     function shouldBreakLineByHyphenatingBeforeCharacterAtIndex(charIndex: NSUInteger): Boolean; message 'shouldBreakLineByHyphenatingBeforeCharacterAtIndex:';
     function hyphenationFactorForGlyphAtIndex(glyphIndex: NSUInteger): single; message 'hyphenationFactorForGlyphAtIndex:';
     function hyphenationFactorForGlyphAtIndex(glyphIndex: NSUInteger): single; message 'hyphenationFactorForGlyphAtIndex:';
     function hyphenCharacterForGlyphAtIndex(glyphIndex: NSUInteger): UTF32Char; message 'hyphenCharacterForGlyphAtIndex:';
     function hyphenCharacterForGlyphAtIndex(glyphIndex: NSUInteger): UTF32Char; message 'hyphenCharacterForGlyphAtIndex:';
     function boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex(glyphIndex: NSUInteger; textContainer: NSTextContainer; proposedRect: NSRect; glyphPosition: NSPoint; charIndex: NSUInteger): NSRect; message 'boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:';
     function boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex(glyphIndex: NSUInteger; textContainer: NSTextContainer; proposedRect: NSRect; glyphPosition: NSPoint; charIndex: NSUInteger): NSRect; message 'boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:';
-  end; external name 'NSLayoutPhaseInterface';
+  end;
 
 
 { NSGlyphStorageInterface_NSATSTypesetterCategory }
 { NSGlyphStorageInterface_NSATSTypesetterCategory }
-  NSGlyphStorageInterface_NSATSTypesetterCategory = objccategory(NSATSTypesetter)
+  NSGlyphStorageInterface_NSATSTypesetterCategory = objccategory external name 'NSGlyphStorageInterface' (NSATSTypesetter)
     function characterRangeForGlyphRange_actualGlyphRange(glyphRange: NSRange; actualGlyphRange: NSRangePointer): NSRange; message 'characterRangeForGlyphRange:actualGlyphRange:';
     function characterRangeForGlyphRange_actualGlyphRange(glyphRange: NSRange; actualGlyphRange: NSRangePointer): NSRange; message 'characterRangeForGlyphRange:actualGlyphRange:';
     function glyphRangeForCharacterRange_actualCharacterRange(charRange: NSRange; actualCharRange: NSRangePointer): NSRange; message 'glyphRangeForCharacterRange:actualCharacterRange:';
     function glyphRangeForCharacterRange_actualCharacterRange(charRange: NSRange; actualCharRange: NSRangePointer): NSRange; message 'glyphRangeForCharacterRange:actualCharacterRange:';
     function getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits(glyphsRange: NSRange; glyphBuffer: NSGlyphPtr; charIndexBuffer: NSUIntegerPtr; inscribeBuffer: NSGlyphInscriptionPtr; elasticBuffer: pboolean): NSUInteger; message 'getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:';
     function getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits(glyphsRange: NSRange; glyphBuffer: NSGlyphPtr; charIndexBuffer: NSUIntegerPtr; inscribeBuffer: NSGlyphInscriptionPtr; elasticBuffer: pboolean): NSUInteger; message 'getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:';
@@ -121,7 +119,7 @@
     procedure setLocation_withAdvancements_forStartOfGlyphRange(location: NSPoint; advancements: CGFloatPtr; glyphRange: NSRange); message 'setLocation:withAdvancements:forStartOfGlyphRange:';
     procedure setLocation_withAdvancements_forStartOfGlyphRange(location: NSPoint; advancements: CGFloatPtr; glyphRange: NSRange); message 'setLocation:withAdvancements:forStartOfGlyphRange:';
     procedure setAttachmentSize_forGlyphRange(attachmentSize: NSSize; glyphRange: NSRange); message 'setAttachmentSize:forGlyphRange:';
     procedure setAttachmentSize_forGlyphRange(attachmentSize: NSSize; glyphRange: NSRange); message 'setAttachmentSize:forGlyphRange:';
     procedure setBidiLevels_forGlyphRange(levels: pbyte; glyphRange: NSRange); message 'setBidiLevels:forGlyphRange:';
     procedure setBidiLevels_forGlyphRange(levels: pbyte; glyphRange: NSRange); message 'setBidiLevels:forGlyphRange:';
-  end; external name 'NSGlyphStorageInterface';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 5
packages/cocoaint/src/appkit/NSAccessibility.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAccessibility.h }
 { Parsed from Appkit.framework NSAccessibility.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -337,7 +337,7 @@ var
 {$define NSACCESSIBILITY_PAS_C}
 {$define NSACCESSIBILITY_PAS_C}
 
 
 { NSAccessibilityCategory }
 { NSAccessibilityCategory }
-  NSAccessibilityCategory = objccategory(NSObject)
+  NSAccessibilityCategory = objccategory external (NSObject)
     function accessibilityAttributeNames: NSArray; message 'accessibilityAttributeNames';
     function accessibilityAttributeNames: NSArray; message 'accessibilityAttributeNames';
     function accessibilityAttributeValue(attribute: NSString): id; message 'accessibilityAttributeValue:';
     function accessibilityAttributeValue(attribute: NSString): id; message 'accessibilityAttributeValue:';
     function accessibilityIsAttributeSettable(attribute: NSString): Boolean; message 'accessibilityIsAttributeSettable:';
     function accessibilityIsAttributeSettable(attribute: NSString): Boolean; message 'accessibilityIsAttributeSettable:';
@@ -353,12 +353,12 @@ var
     function accessibilityIndexOfChild(child: id): NSUInteger; message 'accessibilityIndexOfChild:';
     function accessibilityIndexOfChild(child: id): NSUInteger; message 'accessibilityIndexOfChild:';
     function accessibilityArrayAttributeCount(attribute: NSString): NSUInteger; message 'accessibilityArrayAttributeCount:';
     function accessibilityArrayAttributeCount(attribute: NSString): NSUInteger; message 'accessibilityArrayAttributeCount:';
     function accessibilityArrayAttributeValues_index_maxCount(attribute: NSString; index: NSUInteger; maxCount: NSUInteger): NSArray; message 'accessibilityArrayAttributeValues:index:maxCount:';
     function accessibilityArrayAttributeValues_index_maxCount(attribute: NSString; index: NSUInteger; maxCount: NSUInteger): NSArray; message 'accessibilityArrayAttributeValues:index:maxCount:';
-  end; external;
+  end;
 
 
 { NSAccessibilityAdditionsCategory }
 { NSAccessibilityAdditionsCategory }
-  NSAccessibilityAdditionsCategory = objccategory(NSObject)
+  NSAccessibilityAdditionsCategory = objccategory external (NSObject)
     function accessibilitySetOverrideValue_forAttribute(value: id; attribute: NSString): Boolean; message 'accessibilitySetOverrideValue:forAttribute:';
     function accessibilitySetOverrideValue_forAttribute(value: id; attribute: NSString): Boolean; message 'accessibilitySetOverrideValue:forAttribute:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSActionCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSActionCell.h }
 { Parsed from Appkit.framework NSActionCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSACTIONCELL_PAS_C}
 {$define NSACTIONCELL_PAS_C}
 
 
 { NSActionCell }
 { NSActionCell }
-  NSActionCell = objcclass(NSCell)
+  NSActionCell = objcclass external (NSCell)
   private
   private
     _tag: NSInteger;
     _tag: NSInteger;
     _target: id;
     _target: id;
@@ -50,15 +50,13 @@
     _controlView: id;
     _controlView: id;
     
     
   public
   public
-    class function alloc: NSActionCell; message 'alloc';
-
     function target: id; message 'target';
     function target: id; message 'target';
     procedure setTarget(anObject: id); message 'setTarget:';
     procedure setTarget(anObject: id); message 'setTarget:';
     function action: SEL; message 'action';
     function action: SEL; message 'action';
     procedure setAction(aSelector: SEL); message 'setAction:';
     procedure setAction(aSelector: SEL); message 'setAction:';
     function tag: NSInteger; message 'tag';
     function tag: NSInteger; message 'tag';
     procedure setTag(anInt: NSInteger); message 'setTag:';
     procedure setTag(anInt: NSInteger); message 'setTag:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSAffineTransform.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAffineTransform.h }
 { Parsed from Appkit.framework NSAffineTransform.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -51,13 +51,11 @@ NSAffineTransformStructPtr = ^NSAffineTransformStruct;
 {$define NSAFFINETRANSFORM_PAS_C}
 {$define NSAFFINETRANSFORM_PAS_C}
 
 
 { NSAffineTransform }
 { NSAffineTransform }
-  NSAffineTransform = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
+  NSAffineTransform = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
   private
   private
     _transformStruct: NSAffineTransformStruct;
     _transformStruct: NSAffineTransformStruct;
     
     
   public
   public
-    class function alloc: NSAffineTransform; message 'alloc';
-
     class function transform: NSAffineTransform; message 'transform';
     class function transform: NSAffineTransform; message 'transform';
     function initWithTransform(transform_: NSAffineTransform): id; message 'initWithTransform:';
     function initWithTransform(transform_: NSAffineTransform): id; message 'initWithTransform:';
     procedure translateXBy_yBy(deltaX: CGFloat; deltaY: CGFloat); message 'translateXBy:yBy:';
     procedure translateXBy_yBy(deltaX: CGFloat; deltaY: CGFloat); message 'translateXBy:yBy:';
@@ -77,14 +75,14 @@ NSAffineTransformStructPtr = ^NSAffineTransformStruct;
     function copyWithZone(zone_: NSZonePtr): id;
     function copyWithZone(zone_: NSZonePtr): id;
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSAppKitAdditonsCategory }
 { NSAppKitAdditonsCategory }
-  NSAppKitAdditonsCategory = objccategory(NSAffineTransform)
+  NSAppKitAdditonsCategory = objccategory external (NSAffineTransform)
     function transformBezierPath(aPath: NSBezierPath): NSBezierPath; message 'transformBezierPath:';
     function transformBezierPath(aPath: NSBezierPath): NSBezierPath; message 'transformBezierPath:';
     procedure set_; message 'set';
     procedure set_; message 'set';
     procedure concat; message 'concat';
     procedure concat; message 'concat';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSAlert.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAlert.h }
 { Parsed from Appkit.framework NSAlert.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -60,7 +60,7 @@ type
 {$define NSALERT_PAS_C}
 {$define NSALERT_PAS_C}
 
 
 { NSAlert }
 { NSAlert }
-  NSAlert = objcclass(NSObject)
+  NSAlert = objcclass external (NSObject)
   private
   private
     _informationField: NSTextField;
     _informationField: NSTextField;
     _first: id;
     _first: id;
@@ -94,8 +94,6 @@ type
     _accessoryView: id;
     _accessoryView: id;
     
     
   public
   public
-    class function alloc: NSAlert; message 'alloc';
-
     class function alertWithError(error: NSError): NSAlert; message 'alertWithError:';
     class function alertWithError(error: NSError): NSAlert; message 'alertWithError:';
     class function alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat(message: NSString; defaultButton: NSString; alternateButton: NSString; otherButton: NSString; firstKey: id): NSAlert; varargs; message 'alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:';
     class function alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat(message: NSString; defaultButton: NSString; alternateButton: NSString; otherButton: NSString; firstKey: id): NSAlert; varargs; message 'alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:';
     procedure setMessageText(messageText_: NSString); message 'setMessageText:';
     procedure setMessageText(messageText_: NSString); message 'setMessageText:';
@@ -124,7 +122,7 @@ type
     procedure alertDidEnd_returnCode_contextInfo(alert: NSAlert; returnCode: NSInteger; contextInfo: Pointer); message 'alertDidEnd:returnCode:contextInfo:';
     procedure alertDidEnd_returnCode_contextInfo(alert: NSAlert; returnCode: NSInteger; contextInfo: Pointer); message 'alertDidEnd:returnCode:contextInfo:';
     procedure beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo(window_: NSWindow; delegate_: id; didEndSelector: SEL; contextInfo: Pointer); message 'beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:';
     procedure beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo(window_: NSWindow; delegate_: id; didEndSelector: SEL; contextInfo: Pointer); message 'beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:';
     function window: id; message 'window';
     function window: id; message 'window';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -133,8 +131,8 @@ type
 {$define NSALERT_PAS_P}
 {$define NSALERT_PAS_P}
   
   
 { NSAlertDelegate Protocol }
 { NSAlertDelegate Protocol }
-  NSAlertDelegateProtocol = objcprotocol
+  NSAlertDelegateProtocol = objcprotocol external name 'NSAlertDelegate'
     function alertShowHelp(alert: NSAlert): Boolean; message 'alertShowHelp:';
     function alertShowHelp(alert: NSAlert): Boolean; message 'alertShowHelp:';
-  end; external name 'NSAlertDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 9 - 13
packages/cocoaint/src/appkit/NSAnimation.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAnimation.h }
 { Parsed from Appkit.framework NSAnimation.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:07 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -82,7 +82,7 @@ var
 {$define NSANIMATION_PAS_C}
 {$define NSANIMATION_PAS_C}
 
 
 { NSAnimation }
 { NSAnimation }
-  NSAnimation = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
+  NSAnimation = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
   private
   private
     _duration: NSTimeInterval;
     _duration: NSTimeInterval;
     _currentProgress: NSAnimationProgress;
     _currentProgress: NSAnimationProgress;
@@ -123,8 +123,6 @@ var
     _reserved4: NSInteger;
     _reserved4: NSInteger;
     
     
   public
   public
-    class function alloc: NSAnimation; message 'alloc';
-
     function initWithDuration_animationCurve(duration_: NSTimeInterval; animationCurve_: NSAnimationCurve): id; message 'initWithDuration:animationCurve:';
     function initWithDuration_animationCurve(duration_: NSTimeInterval; animationCurve_: NSAnimationCurve): id; message 'initWithDuration:animationCurve:';
     procedure startAnimation; message 'startAnimation';
     procedure startAnimation; message 'startAnimation';
     procedure stopAnimation; message 'stopAnimation';
     procedure stopAnimation; message 'stopAnimation';
@@ -156,10 +154,10 @@ var
     function copyWithZone(zone_: NSZonePtr): id;
     function copyWithZone(zone_: NSZonePtr): id;
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSViewAnimation }
 { NSViewAnimation }
-  NSViewAnimation = objcclass(NSAnimation)
+  NSViewAnimation = objcclass external (NSAnimation)
   private
   private
     _viewAnimations: NSArray;
     _viewAnimations: NSArray;
     _viewAnimationInfo: CFMutableDictionaryRef;
     _viewAnimationInfo: CFMutableDictionaryRef;
@@ -180,12 +178,10 @@ var
     _reserved8: NSUInteger;
     _reserved8: NSUInteger;
     
     
   public
   public
-    class function alloc: NSViewAnimation; message 'alloc';
-
     function initWithViewAnimations(viewAnimations_: NSArray): id; message 'initWithViewAnimations:';
     function initWithViewAnimations(viewAnimations_: NSArray): id; message 'initWithViewAnimations:';
     function viewAnimations: NSArray; message 'viewAnimations';
     function viewAnimations: NSArray; message 'viewAnimations';
     procedure setViewAnimations(viewAnimations_: NSArray); message 'setViewAnimations:';
     procedure setViewAnimations(viewAnimations_: NSArray); message 'setViewAnimations:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -194,20 +190,20 @@ var
 {$define NSANIMATION_PAS_P}
 {$define NSANIMATION_PAS_P}
   
   
 { NSAnimationDelegate Protocol }
 { NSAnimationDelegate Protocol }
-  NSAnimationDelegateProtocol = objcprotocol
+  NSAnimationDelegateProtocol = objcprotocol external name 'NSAnimationDelegate'
     function animationShouldStart(animation: NSAnimation): Boolean; message 'animationShouldStart:';
     function animationShouldStart(animation: NSAnimation): Boolean; message 'animationShouldStart:';
     procedure animationDidStop(animation: NSAnimation); message 'animationDidStop:';
     procedure animationDidStop(animation: NSAnimation); message 'animationDidStop:';
     procedure animationDidEnd(animation: NSAnimation); message 'animationDidEnd:';
     procedure animationDidEnd(animation: NSAnimation); message 'animationDidEnd:';
     function animation_valueForProgress(animation: NSAnimation; progress: NSAnimationProgress): single; message 'animation:valueForProgress:';
     function animation_valueForProgress(animation: NSAnimation; progress: NSAnimationProgress): single; message 'animation:valueForProgress:';
     procedure animation_didReachProgressMark(animation: NSAnimation; progress: NSAnimationProgress); message 'animation:didReachProgressMark:';
     procedure animation_didReachProgressMark(animation: NSAnimation; progress: NSAnimationProgress); message 'animation:didReachProgressMark:';
-  end; external name 'NSAnimationDelegate';
+  end;
   
   
 { NSAnimatablePropertyContainer Protocol }
 { NSAnimatablePropertyContainer Protocol }
-  NSAnimatablePropertyContainerProtocol = objcprotocol
+  NSAnimatablePropertyContainerProtocol = objcprotocol external name 'NSAnimatablePropertyContainer'
     function animator: id; message 'animator';
     function animator: id; message 'animator';
     function animations: NSDictionary; message 'animations';
     function animations: NSDictionary; message 'animations';
     procedure setAnimations(dict: NSDictionary); message 'setAnimations:';
     procedure setAnimations(dict: NSDictionary); message 'setAnimations:';
     function animationForKey(key: NSString): id; message 'animationForKey:';
     function animationForKey(key: NSString): id; message 'animationForKey:';
-  end; external name 'NSAnimatablePropertyContainer';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSAnimationContext.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAnimationContext.h }
 { Parsed from Appkit.framework NSAnimationContext.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,20 +42,18 @@
 {$define NSANIMATIONCONTEXT_PAS_C}
 {$define NSANIMATIONCONTEXT_PAS_C}
 
 
 { NSAnimationContext }
 { NSAnimationContext }
-  NSAnimationContext = objcclass(NSObject)
+  NSAnimationContext = objcclass external (NSObject)
   private
   private
     _duration: NSTimeInterval;
     _duration: NSTimeInterval;
         _reserved: array[0..4] of id;
         _reserved: array[0..4] of id;
     
     
   public
   public
-    class function alloc: NSAnimationContext; message 'alloc';
-
     class procedure beginGrouping; message 'beginGrouping';
     class procedure beginGrouping; message 'beginGrouping';
     class procedure endGrouping; message 'endGrouping';
     class procedure endGrouping; message 'endGrouping';
     class function currentContext: NSAnimationContext; message 'currentContext';
     class function currentContext: NSAnimationContext; message 'currentContext';
     procedure setDuration(duration_: NSTimeInterval); message 'setDuration:';
     procedure setDuration(duration_: NSTimeInterval); message 'setDuration:';
     function duration: NSTimeInterval; message 'duration';
     function duration: NSTimeInterval; message 'duration';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 3
packages/cocoaint/src/appkit/NSAppleScriptExtensions.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAppleScriptExtensions.h }
 { Parsed from Appkit.framework NSAppleScriptExtensions.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -39,9 +39,9 @@
 {$define NSAPPLESCRIPTEXTENSIONS_PAS_C}
 {$define NSAPPLESCRIPTEXTENSIONS_PAS_C}
 
 
 { NSExtensionsCategory }
 { NSExtensionsCategory }
-  NSExtensionsCategory = objccategory(NSAppleScript)
+  NSExtensionsCategory = objccategory external (NSAppleScript)
     function richTextSource: NSAttributedString; message 'richTextSource';
     function richTextSource: NSAttributedString; message 'richTextSource';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 21 - 23
packages/cocoaint/src/appkit/NSApplication.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSApplication.h }
 { Parsed from Appkit.framework NSApplication.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -165,7 +165,7 @@ var
 {$define NSAPPLICATION_PAS_C}
 {$define NSAPPLICATION_PAS_C}
 
 
 { NSApplication }
 { NSApplication }
-  NSApplication = objcclass(NSResponder, NSUserInterfaceValidationsProtocol)
+  NSApplication = objcclass external (NSResponder, NSUserInterfaceValidationsProtocol)
   private
   private
     _currentEvent: NSEvent;
     _currentEvent: NSEvent;
     _windowList: id;
     _windowList: id;
@@ -220,8 +220,6 @@ var
     _threadingSupport: _NSThreadPrivatePtr;
     _threadingSupport: _NSThreadPrivatePtr;
     
     
   public
   public
-    class function alloc: NSApplication; message 'alloc';
-
     class function sharedApplication: NSApplication; message 'sharedApplication';
     class function sharedApplication: NSApplication; message 'sharedApplication';
     procedure setDelegate(anObject: id); message 'setDelegate:';
     procedure setDelegate(anObject: id); message 'setDelegate:';
     function delegate: id; message 'delegate';
     function delegate: id; message 'delegate';
@@ -291,10 +289,10 @@ var
 
 
     { Adopted Protocols }
     { Adopted Protocols }
     function validateUserInterfaceItem(anItem: id): Boolean;
     function validateUserInterfaceItem(anItem: id): Boolean;
-  end; external;
+  end;
 
 
 { NSWindowsMenuCategory }
 { NSWindowsMenuCategory }
-  NSWindowsMenuCategory = objccategory(NSApplication)
+  NSWindowsMenuCategory = objccategory external (NSApplication)
     procedure setWindowsMenu(aMenu: NSMenu); message 'setWindowsMenu:';
     procedure setWindowsMenu(aMenu: NSMenu); message 'setWindowsMenu:';
     function windowsMenu: NSMenu; message 'windowsMenu';
     function windowsMenu: NSMenu; message 'windowsMenu';
     procedure arrangeInFront(sender: id); message 'arrangeInFront:';
     procedure arrangeInFront(sender: id); message 'arrangeInFront:';
@@ -303,49 +301,49 @@ var
     procedure changeWindowsItem_title_filename(win: NSWindow; aString: NSString; isFilename: Boolean); message 'changeWindowsItem:title:filename:';
     procedure changeWindowsItem_title_filename(win: NSWindow; aString: NSString; isFilename: Boolean); message 'changeWindowsItem:title:filename:';
     procedure updateWindowsItem(win: NSWindow); message 'updateWindowsItem:';
     procedure updateWindowsItem(win: NSWindow); message 'updateWindowsItem:';
     procedure miniaturizeAll(sender: id); message 'miniaturizeAll:';
     procedure miniaturizeAll(sender: id); message 'miniaturizeAll:';
-  end; external;
+  end;
 
 
 { NSFullKeyboardAccessCategory }
 { NSFullKeyboardAccessCategory }
-  NSFullKeyboardAccessCategory = objccategory(NSApplication)
+  NSFullKeyboardAccessCategory = objccategory external (NSApplication)
     function isFullKeyboardAccessEnabled: Boolean; message 'isFullKeyboardAccessEnabled';
     function isFullKeyboardAccessEnabled: Boolean; message 'isFullKeyboardAccessEnabled';
-  end; external;
+  end;
 
 
 { NSServicesMenuCategory }
 { NSServicesMenuCategory }
-  NSServicesMenuCategory = objccategory(NSApplication)
+  NSServicesMenuCategory = objccategory external (NSApplication)
     procedure setServicesMenu(aMenu: NSMenu); message 'setServicesMenu:';
     procedure setServicesMenu(aMenu: NSMenu); message 'setServicesMenu:';
     function servicesMenu: NSMenu; message 'servicesMenu';
     function servicesMenu: NSMenu; message 'servicesMenu';
     procedure registerServicesMenuSendTypes_returnTypes(sendTypes: NSArray; returnTypes: NSArray); message 'registerServicesMenuSendTypes:returnTypes:';
     procedure registerServicesMenuSendTypes_returnTypes(sendTypes: NSArray; returnTypes: NSArray); message 'registerServicesMenuSendTypes:returnTypes:';
-  end; external;
+  end;
 
 
 { NSServicesRequestsCategory }
 { NSServicesRequestsCategory }
-  NSServicesRequestsCategory = objccategory(NSObject)
+  NSServicesRequestsCategory = objccategory external (NSObject)
     function writeSelectionToPasteboard_types(pboard: NSPasteboard; types: NSArray): Boolean; message 'writeSelectionToPasteboard:types:';
     function writeSelectionToPasteboard_types(pboard: NSPasteboard; types: NSArray): Boolean; message 'writeSelectionToPasteboard:types:';
     function readSelectionFromPasteboard(pboard: NSPasteboard): Boolean; message 'readSelectionFromPasteboard:';
     function readSelectionFromPasteboard(pboard: NSPasteboard): Boolean; message 'readSelectionFromPasteboard:';
-  end; external;
+  end;
 
 
 { NSServicesHandlingCategory }
 { NSServicesHandlingCategory }
-  NSServicesHandlingCategory = objccategory(NSApplication)
+  NSServicesHandlingCategory = objccategory external (NSApplication)
     procedure setServicesProvider(provider: id); message 'setServicesProvider:';
     procedure setServicesProvider(provider: id); message 'setServicesProvider:';
     function servicesProvider: id; message 'servicesProvider';
     function servicesProvider: id; message 'servicesProvider';
-  end; external;
+  end;
 
 
 { NSStandardAboutPanelCategory }
 { NSStandardAboutPanelCategory }
-  NSStandardAboutPanelCategory = objccategory(NSApplication)
+  NSStandardAboutPanelCategory = objccategory external (NSApplication)
     procedure orderFrontStandardAboutPanel(sender: id); message 'orderFrontStandardAboutPanel:';
     procedure orderFrontStandardAboutPanel(sender: id); message 'orderFrontStandardAboutPanel:';
     procedure orderFrontStandardAboutPanelWithOptions(optionsDictionary: NSDictionary); message 'orderFrontStandardAboutPanelWithOptions:';
     procedure orderFrontStandardAboutPanelWithOptions(optionsDictionary: NSDictionary); message 'orderFrontStandardAboutPanelWithOptions:';
-  end; external;
+  end;
 
 
 { NSApplicationLayoutDirectionCategory }
 { NSApplicationLayoutDirectionCategory }
-  NSApplicationLayoutDirectionCategory = objccategory(NSApplication)
+  NSApplicationLayoutDirectionCategory = objccategory external (NSApplication)
     function userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection; message 'userInterfaceLayoutDirection';
     function userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection; message 'userInterfaceLayoutDirection';
-  end; external;
+  end;
 
 
 { NSDeprecated_NSApplicationCategory }
 { NSDeprecated_NSApplicationCategory }
-  NSDeprecated_NSApplicationCategory = objccategory(NSApplication)
+  NSDeprecated_NSApplicationCategory = objccategory external name 'NSDeprecated' (NSApplication)
     function runModalForWindow_relativeToWindow(theWindow: NSWindow; docWindow: NSWindow): NSInteger; message 'runModalForWindow:relativeToWindow:'; deprecated 'in Mac OS X 10 and later';
     function runModalForWindow_relativeToWindow(theWindow: NSWindow; docWindow: NSWindow): NSInteger; message 'runModalForWindow:relativeToWindow:'; deprecated 'in Mac OS X 10 and later';
     function beginModalSessionForWindow_relativeToWindow(theWindow: NSWindow; docWindow: NSWindow): NSModalSession; message 'beginModalSessionForWindow:relativeToWindow:'; deprecated 'in Mac OS X 10 and later';
     function beginModalSessionForWindow_relativeToWindow(theWindow: NSWindow; docWindow: NSWindow): NSModalSession; message 'beginModalSessionForWindow:relativeToWindow:'; deprecated 'in Mac OS X 10 and later';
     procedure application_printFiles(sender: NSApplication; filenames: NSArray); message 'application:printFiles:';
     procedure application_printFiles(sender: NSApplication; filenames: NSArray); message 'application:printFiles:';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -354,7 +352,7 @@ var
 {$define NSAPPLICATION_PAS_P}
 {$define NSAPPLICATION_PAS_P}
   
   
 { NSApplicationDelegate Protocol }
 { NSApplicationDelegate Protocol }
-  NSApplicationDelegateProtocol = objcprotocol
+  NSApplicationDelegateProtocol = objcprotocol external name 'NSApplicationDelegate'
     function applicationShouldTerminate(sender: NSApplication): NSApplicationTerminateReply; message 'applicationShouldTerminate:';
     function applicationShouldTerminate(sender: NSApplication): NSApplicationTerminateReply; message 'applicationShouldTerminate:';
     function application_openFile(sender: NSApplication; filename: NSString): Boolean; message 'application:openFile:';
     function application_openFile(sender: NSApplication; filename: NSString): Boolean; message 'application:openFile:';
     procedure application_openFiles(sender: NSApplication; filenames: NSArray); message 'application:openFiles:';
     procedure application_openFiles(sender: NSApplication; filenames: NSArray); message 'application:openFiles:';
@@ -382,6 +380,6 @@ var
     procedure applicationDidUpdate(notification: NSNotification); message 'applicationDidUpdate:';
     procedure applicationDidUpdate(notification: NSNotification); message 'applicationDidUpdate:';
     procedure applicationWillTerminate(notification: NSNotification); message 'applicationWillTerminate:';
     procedure applicationWillTerminate(notification: NSNotification); message 'applicationWillTerminate:';
     procedure applicationDidChangeScreenParameters(notification: NSNotification); message 'applicationDidChangeScreenParameters:';
     procedure applicationDidChangeScreenParameters(notification: NSNotification); message 'applicationDidChangeScreenParameters:';
-  end; external name 'NSApplicationDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 5
packages/cocoaint/src/appkit/NSApplicationScripting.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSApplicationScripting.h }
 { Parsed from Appkit.framework NSApplicationScripting.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -39,15 +39,15 @@
 {$define NSAPPLICATIONSCRIPTING_PAS_C}
 {$define NSAPPLICATIONSCRIPTING_PAS_C}
 
 
 { NSScripting_NSApplicationCategory }
 { NSScripting_NSApplicationCategory }
-  NSScripting_NSApplicationCategory = objccategory(NSApplication)
+  NSScripting_NSApplicationCategory = objccategory external name 'NSScripting' (NSApplication)
     function orderedDocuments: NSArray; message 'orderedDocuments';
     function orderedDocuments: NSArray; message 'orderedDocuments';
     function orderedWindows: NSArray; message 'orderedWindows';
     function orderedWindows: NSArray; message 'orderedWindows';
-  end; external name 'NSScripting';
+  end;
 
 
 { NSApplicationScriptingDelegationCategory }
 { NSApplicationScriptingDelegationCategory }
-  NSApplicationScriptingDelegationCategory = objccategory(NSObject)
+  NSApplicationScriptingDelegationCategory = objccategory external (NSObject)
     function application_delegateHandlesKey(sender: NSApplication; key: NSString): Boolean; message 'application:delegateHandlesKey:';
     function application_delegateHandlesKey(sender: NSApplication; key: NSString): Boolean; message 'application:delegateHandlesKey:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSArrayController.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSArrayController.h }
 { Parsed from Appkit.framework NSArrayController.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSARRAYCONTROLLER_PAS_C}
 {$define NSARRAYCONTROLLER_PAS_C}
 
 
 { NSArrayController }
 { NSArrayController }
-  NSArrayController = objcclass(NSObjectController)
+  NSArrayController = objcclass external (NSObjectController)
   private
   private
     _reserved4: Pointer;
     _reserved4: Pointer;
     _rearrangementExtensions: id;
     _rearrangementExtensions: id;
@@ -77,8 +77,6 @@
     _arrangedObjects: NSArray;
     _arrangedObjects: NSArray;
     
     
   public
   public
-    class function alloc: NSArrayController; message 'alloc';
-
     procedure rearrangeObjects; message 'rearrangeObjects';
     procedure rearrangeObjects; message 'rearrangeObjects';
     procedure setAutomaticallyRearrangesObjects(flag: Boolean); message 'setAutomaticallyRearrangesObjects:';
     procedure setAutomaticallyRearrangesObjects(flag: Boolean); message 'setAutomaticallyRearrangesObjects:';
     function automaticallyRearrangesObjects: Boolean; message 'automaticallyRearrangesObjects';
     function automaticallyRearrangesObjects: Boolean; message 'automaticallyRearrangesObjects';
@@ -126,7 +124,7 @@
     procedure removeObjectsAtArrangedObjectIndexes(indexes: NSIndexSet); message 'removeObjectsAtArrangedObjectIndexes:';
     procedure removeObjectsAtArrangedObjectIndexes(indexes: NSIndexSet); message 'removeObjectsAtArrangedObjectIndexes:';
     procedure removeObject(object_: id); message 'removeObject:';
     procedure removeObject(object_: id); message 'removeObject:';
     procedure removeObjects(objects: NSArray); message 'removeObjects:';
     procedure removeObjects(objects: NSArray); message 'removeObjects:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 15 - 19
packages/cocoaint/src/appkit/NSAttributedString.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSAttributedString.h }
 { Parsed from Appkit.framework NSAttributedString.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -154,11 +154,9 @@ var
 {$define NSATTRIBUTEDSTRING_PAS_C}
 {$define NSATTRIBUTEDSTRING_PAS_C}
 
 
 { NSAttributedString }
 { NSAttributedString }
-  NSAttributedString = objcclass(NSObject, NSCopyingProtocol, NSMutableCopyingProtocol, NSCodingProtocol)
+  NSAttributedString = objcclass external (NSObject, NSCopyingProtocol, NSMutableCopyingProtocol, NSCodingProtocol)
     
     
   public
   public
-    class function alloc: NSAttributedString; message 'alloc';
-
     function string_: NSString; message 'string';
     function string_: NSString; message 'string';
     function attributesAtIndex_effectiveRange(location: NSUInteger; range: NSRangePointer): NSDictionary; message 'attributesAtIndex:effectiveRange:';
     function attributesAtIndex_effectiveRange(location: NSUInteger; range: NSRangePointer): NSDictionary; message 'attributesAtIndex:effectiveRange:';
 
 
@@ -167,20 +165,18 @@ var
     function mutableCopyWithZone(zone_: NSZonePtr): id;
     function mutableCopyWithZone(zone_: NSZonePtr): id;
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSMutableAttributedString }
 { NSMutableAttributedString }
-  NSMutableAttributedString = objcclass(NSAttributedString)
+  NSMutableAttributedString = objcclass external (NSAttributedString)
     
     
   public
   public
-    class function alloc: NSMutableAttributedString; message 'alloc';
-
     procedure replaceCharactersInRange_withString(range: NSRange; str: NSString); message 'replaceCharactersInRange:withString:';
     procedure replaceCharactersInRange_withString(range: NSRange; str: NSString); message 'replaceCharactersInRange:withString:';
     procedure setAttributes_range(attrs: NSDictionary; range: NSRange); message 'setAttributes:range:';
     procedure setAttributes_range(attrs: NSDictionary; range: NSRange); message 'setAttributes:range:';
-  end; external;
+  end;
 
 
 { NSExtendedAttributedStringCategory }
 { NSExtendedAttributedStringCategory }
-  NSExtendedAttributedStringCategory = objccategory(NSAttributedString)
+  NSExtendedAttributedStringCategory = objccategory external (NSAttributedString)
     function length: NSUInteger; message 'length';
     function length: NSUInteger; message 'length';
     function attribute_atIndex_effectiveRange(attrName: NSString; location: NSUInteger; range: NSRangePointer): id; message 'attribute:atIndex:effectiveRange:';
     function attribute_atIndex_effectiveRange(attrName: NSString; location: NSUInteger; range: NSRangePointer): id; message 'attribute:atIndex:effectiveRange:';
     function attributedSubstringFromRange(range: NSRange): NSAttributedString; message 'attributedSubstringFromRange:';
     function attributedSubstringFromRange(range: NSRange): NSAttributedString; message 'attributedSubstringFromRange:';
@@ -190,10 +186,10 @@ var
     function initWithString(str: NSString): id; message 'initWithString:';
     function initWithString(str: NSString): id; message 'initWithString:';
     function initWithString_attributes(str: NSString; attrs: NSDictionary): id; message 'initWithString:attributes:';
     function initWithString_attributes(str: NSString; attrs: NSDictionary): id; message 'initWithString:attributes:';
     function initWithAttributedString(attrStr: NSAttributedString): id; message 'initWithAttributedString:';
     function initWithAttributedString(attrStr: NSAttributedString): id; message 'initWithAttributedString:';
-  end; external;
+  end;
 
 
 { NSExtendedMutableAttributedStringCategory }
 { NSExtendedMutableAttributedStringCategory }
-  NSExtendedMutableAttributedStringCategory = objccategory(NSMutableAttributedString)
+  NSExtendedMutableAttributedStringCategory = objccategory external (NSMutableAttributedString)
     function mutableString: NSMutableString; message 'mutableString';
     function mutableString: NSMutableString; message 'mutableString';
     procedure addAttribute_value_range(name: NSString; value: id; range: NSRange); message 'addAttribute:value:range:';
     procedure addAttribute_value_range(name: NSString; value: id; range: NSRange); message 'addAttribute:value:range:';
     procedure addAttributes_range(attrs: NSDictionary; range: NSRange); message 'addAttributes:range:';
     procedure addAttributes_range(attrs: NSDictionary; range: NSRange); message 'addAttributes:range:';
@@ -205,10 +201,10 @@ var
     procedure setAttributedString(attrString: NSAttributedString); message 'setAttributedString:';
     procedure setAttributedString(attrString: NSAttributedString); message 'setAttributedString:';
     procedure beginEditing; message 'beginEditing';
     procedure beginEditing; message 'beginEditing';
     procedure endEditing; message 'endEditing';
     procedure endEditing; message 'endEditing';
-  end; external;
+  end;
 
 
 { NSAttributedStringKitAdditionsCategory }
 { NSAttributedStringKitAdditionsCategory }
-  NSAttributedStringKitAdditionsCategory = objccategory(NSAttributedString)
+  NSAttributedStringKitAdditionsCategory = objccategory external (NSAttributedString)
     function fontAttributesInRange(range: NSRange): NSDictionary; message 'fontAttributesInRange:';
     function fontAttributesInRange(range: NSRange): NSDictionary; message 'fontAttributesInRange:';
     function rulerAttributesInRange(range: NSRange): NSDictionary; message 'rulerAttributesInRange:';
     function rulerAttributesInRange(range: NSRange): NSDictionary; message 'rulerAttributesInRange:';
     function containsAttachments: Boolean; message 'containsAttachments';
     function containsAttachments: Boolean; message 'containsAttachments';
@@ -240,18 +236,18 @@ var
     function RTFDFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'RTFDFromRange:documentAttributes:';
     function RTFDFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'RTFDFromRange:documentAttributes:';
     function RTFDFileWrapperFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSFileWrapper; message 'RTFDFileWrapperFromRange:documentAttributes:';
     function RTFDFileWrapperFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSFileWrapper; message 'RTFDFileWrapperFromRange:documentAttributes:';
     function docFormatFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'docFormatFromRange:documentAttributes:';
     function docFormatFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'docFormatFromRange:documentAttributes:';
-  end; external;
+  end;
 
 
 { NSDeprecatedKitAdditionsCategory }
 { NSDeprecatedKitAdditionsCategory }
-  NSDeprecatedKitAdditionsCategory = objccategory(NSAttributedString)
+  NSDeprecatedKitAdditionsCategory = objccategory external (NSAttributedString)
     class function textFileTypes: NSArray; message 'textFileTypes';
     class function textFileTypes: NSArray; message 'textFileTypes';
     class function textPasteboardTypes: NSArray; message 'textPasteboardTypes';
     class function textPasteboardTypes: NSArray; message 'textPasteboardTypes';
     class function textUnfilteredFileTypes: NSArray; message 'textUnfilteredFileTypes';
     class function textUnfilteredFileTypes: NSArray; message 'textUnfilteredFileTypes';
     class function textUnfilteredPasteboardTypes: NSArray; message 'textUnfilteredPasteboardTypes';
     class function textUnfilteredPasteboardTypes: NSArray; message 'textUnfilteredPasteboardTypes';
-  end; external;
+  end;
 
 
 { NSMutableAttributedStringKitAdditionsCategory }
 { NSMutableAttributedStringKitAdditionsCategory }
-  NSMutableAttributedStringKitAdditionsCategory = objccategory(NSMutableAttributedString)
+  NSMutableAttributedStringKitAdditionsCategory = objccategory external (NSMutableAttributedString)
     function readFromURL_options_documentAttributes_error(url: NSURL; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromURL:options:documentAttributes:error:';
     function readFromURL_options_documentAttributes_error(url: NSURL; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromURL:options:documentAttributes:error:';
     function readFromData_options_documentAttributes_error(data: NSData; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromData:options:documentAttributes:error:';
     function readFromData_options_documentAttributes_error(data: NSData; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromData:options:documentAttributes:error:';
     function readFromURL_options_documentAttributes(url: NSURL; options: NSDictionary; dict: NSDictionaryPointer): Boolean; message 'readFromURL:options:documentAttributes:';
     function readFromURL_options_documentAttributes(url: NSURL; options: NSDictionary; dict: NSDictionaryPointer): Boolean; message 'readFromURL:options:documentAttributes:';
@@ -266,7 +262,7 @@ var
     procedure fixFontAttributeInRange(range: NSRange); message 'fixFontAttributeInRange:';
     procedure fixFontAttributeInRange(range: NSRange); message 'fixFontAttributeInRange:';
     procedure fixParagraphStyleAttributeInRange(range: NSRange); message 'fixParagraphStyleAttributeInRange:';
     procedure fixParagraphStyleAttributeInRange(range: NSRange); message 'fixParagraphStyleAttributeInRange:';
     procedure fixAttachmentAttributeInRange(range: NSRange); message 'fixAttachmentAttributeInRange:';
     procedure fixAttachmentAttributeInRange(range: NSRange); message 'fixAttachmentAttributeInRange:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSBezierPath.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSBezierPath.h }
 { Parsed from Appkit.framework NSBezierPath.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -75,7 +75,7 @@ type
 {$define NSBEZIERPATH_PAS_C}
 {$define NSBEZIERPATH_PAS_C}
 
 
 { NSBezierPath }
 { NSBezierPath }
-  NSBezierPath = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
+  NSBezierPath = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
   private
   private
     _elementCount: NSInteger;
     _elementCount: NSInteger;
     _elementMax: NSInteger;
     _elementMax: NSInteger;
@@ -105,8 +105,6 @@ type
       end;
       end;
     
     
   public
   public
-    class function alloc: NSBezierPath; message 'alloc';
-
     class function bezierPath: NSBezierPath; message 'bezierPath';
     class function bezierPath: NSBezierPath; message 'bezierPath';
     class function bezierPathWithRect(rect: NSRect): NSBezierPath; message 'bezierPathWithRect:';
     class function bezierPathWithRect(rect: NSRect): NSBezierPath; message 'bezierPathWithRect:';
     class function bezierPathWithOvalInRect(rect: NSRect): NSBezierPath; message 'bezierPathWithOvalInRect:';
     class function bezierPathWithOvalInRect(rect: NSRect): NSBezierPath; message 'bezierPathWithOvalInRect:';
@@ -182,13 +180,13 @@ type
     function copyWithZone(zone_: NSZonePtr): id;
     function copyWithZone(zone_: NSZonePtr): id;
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSBezierPathDeprecatedCategory }
 { NSBezierPathDeprecatedCategory }
-  NSBezierPathDeprecatedCategory = objccategory(NSBezierPath)
+  NSBezierPathDeprecatedCategory = objccategory external (NSBezierPath)
     function cachesBezierPath: Boolean; message 'cachesBezierPath'; deprecated 'in Mac OS X 10 and later';
     function cachesBezierPath: Boolean; message 'cachesBezierPath'; deprecated 'in Mac OS X 10 and later';
     procedure setCachesBezierPath(flag: Boolean); message 'setCachesBezierPath:'; deprecated 'in Mac OS X 10 and later';
     procedure setCachesBezierPath(flag: Boolean); message 'setCachesBezierPath:'; deprecated 'in Mac OS X 10 and later';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSBitmapImageRep.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSBitmapImageRep.h }
 { Parsed from Appkit.framework NSBitmapImageRep.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -103,7 +103,7 @@ var
 {$define NSBITMAPIMAGEREP_PAS_C}
 {$define NSBITMAPIMAGEREP_PAS_C}
 
 
 { NSBitmapImageRep }
 { NSBitmapImageRep }
-  NSBitmapImageRep = objcclass(NSImageRep)
+  NSBitmapImageRep = objcclass external (NSImageRep)
   private
   private
     __moreRepFlags: bitpacked record
     __moreRepFlags: bitpacked record
       case byte of
       case byte of
@@ -130,8 +130,6 @@ var
     _properties: id;
     _properties: id;
     
     
   public
   public
-    class function alloc: NSBitmapImageRep; message 'alloc';
-
     function initWithFocusedViewRect(rect: NSRect): id; message 'initWithFocusedViewRect:';
     function initWithFocusedViewRect(rect: NSRect): id; message 'initWithFocusedViewRect:';
     function initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel(planes: PChar; width: NSInteger; height: NSInteger; bps: NSInteger; spp: NSInteger; alpha: Boolean; isPlanar_: Boolean; colorSpaceName_: NSString; rBytes: NSInteger; pBits: NSInteger): id; message 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:';
     function initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel(planes: PChar; width: NSInteger; height: NSInteger; bps: NSInteger; spp: NSInteger; alpha: Boolean; isPlanar_: Boolean; colorSpaceName_: NSString; rBytes: NSInteger; pBits: NSInteger): id; message 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:';
     function initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel(planes: PChar; width: NSInteger; height: NSInteger; bps: NSInteger; spp: NSInteger; alpha: Boolean; isPlanar_: Boolean; colorSpaceName_: NSString; bitmapFormat_: NSBitmapFormat; rBytes: NSInteger; pBits: NSInteger): id; message 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:';
     function initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel(planes: PChar; width: NSInteger; height: NSInteger; bps: NSInteger; spp: NSInteger; alpha: Boolean; isPlanar_: Boolean; colorSpaceName_: NSString; bitmapFormat_: NSBitmapFormat; rBytes: NSInteger; pBits: NSInteger): id; message 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:';
@@ -169,15 +167,15 @@ var
     function colorSpace: NSColorSpace; message 'colorSpace';
     function colorSpace: NSColorSpace; message 'colorSpace';
     function bitmapImageRepByConvertingToColorSpace_renderingIntent(targetSpace: NSColorSpace; renderingIntent: NSColorRenderingIntent): NSBitmapImageRep; message 'bitmapImageRepByConvertingToColorSpace:renderingIntent:';
     function bitmapImageRepByConvertingToColorSpace_renderingIntent(targetSpace: NSColorSpace; renderingIntent: NSColorRenderingIntent): NSBitmapImageRep; message 'bitmapImageRepByConvertingToColorSpace:renderingIntent:';
     function bitmapImageRepByRetaggingWithColorSpace(newSpace: NSColorSpace): NSBitmapImageRep; message 'bitmapImageRepByRetaggingWithColorSpace:';
     function bitmapImageRepByRetaggingWithColorSpace(newSpace: NSColorSpace): NSBitmapImageRep; message 'bitmapImageRepByRetaggingWithColorSpace:';
-  end; external;
+  end;
 
 
 { NSBitmapImageFileTypeExtensionsCategory }
 { NSBitmapImageFileTypeExtensionsCategory }
-  NSBitmapImageFileTypeExtensionsCategory = objccategory(NSBitmapImageRep)
+  NSBitmapImageFileTypeExtensionsCategory = objccategory external (NSBitmapImageRep)
     class function representationOfImageRepsInArray_usingType_properties(imageReps: NSArray; storageType: NSBitmapImageFileType; properties: NSDictionary): NSData; message 'representationOfImageRepsInArray:usingType:properties:';
     class function representationOfImageRepsInArray_usingType_properties(imageReps: NSArray; storageType: NSBitmapImageFileType; properties: NSDictionary): NSData; message 'representationOfImageRepsInArray:usingType:properties:';
     function representationUsingType_properties(storageType: NSBitmapImageFileType; properties: NSDictionary): NSData; message 'representationUsingType:properties:';
     function representationUsingType_properties(storageType: NSBitmapImageFileType; properties: NSDictionary): NSData; message 'representationUsingType:properties:';
     procedure setProperty_withValue(property_: NSString; value: id); message 'setProperty:withValue:';
     procedure setProperty_withValue(property_: NSString; value: id); message 'setProperty:withValue:';
     function valueForProperty(property_: NSString): id; message 'valueForProperty:';
     function valueForProperty(property_: NSString): id; message 'valueForProperty:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 7 - 9
packages/cocoaint/src/appkit/NSBox.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSBox.h }
 { Parsed from Appkit.framework NSBox.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -67,7 +67,7 @@ type
 {$define NSBOX_PAS_C}
 {$define NSBOX_PAS_C}
 
 
 { NSBox }
 { NSBox }
-  NSBox = objcclass(NSView)
+  NSBox = objcclass external (NSView)
   private
   private
     _titleCell: id;
     _titleCell: id;
     _contentView: id;
     _contentView: id;
@@ -92,8 +92,6 @@ type
     _unused: id;
     _unused: id;
     
     
   public
   public
-    class function alloc: NSBox; message 'alloc';
-
     function borderType: NSBorderType; message 'borderType';
     function borderType: NSBorderType; message 'borderType';
     function titlePosition: NSTitlePosition; message 'titlePosition';
     function titlePosition: NSTitlePosition; message 'titlePosition';
     procedure setBorderType(aType: NSBorderType); message 'setBorderType:';
     procedure setBorderType(aType: NSBorderType); message 'setBorderType:';
@@ -115,15 +113,15 @@ type
     procedure setContentView(aView: NSView); message 'setContentView:';
     procedure setContentView(aView: NSView); message 'setContentView:';
     function isTransparent: Boolean; message 'isTransparent';
     function isTransparent: Boolean; message 'isTransparent';
     procedure setTransparent(flag: Boolean); message 'setTransparent:';
     procedure setTransparent(flag: Boolean); message 'setTransparent:';
-  end; external;
+  end;
 
 
 { NSKeyboardUI_NSBoxCategory }
 { NSKeyboardUI_NSBoxCategory }
-  NSKeyboardUI_NSBoxCategory = objccategory(NSBox)
+  NSKeyboardUI_NSBoxCategory = objccategory external name 'NSKeyboardUI' (NSBox)
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
-  end; external name 'NSKeyboardUI';
+  end;
 
 
 { NSCustomBoxTypePropertiesCategory }
 { NSCustomBoxTypePropertiesCategory }
-  NSCustomBoxTypePropertiesCategory = objccategory(NSBox)
+  NSCustomBoxTypePropertiesCategory = objccategory external (NSBox)
     function borderWidth: CGFloat; message 'borderWidth';
     function borderWidth: CGFloat; message 'borderWidth';
     procedure setBorderWidth(borderWidth_: CGFloat); message 'setBorderWidth:';
     procedure setBorderWidth(borderWidth_: CGFloat); message 'setBorderWidth:';
     function cornerRadius: CGFloat; message 'cornerRadius';
     function cornerRadius: CGFloat; message 'cornerRadius';
@@ -132,7 +130,7 @@ type
     procedure setBorderColor(borderColor_: NSColor); message 'setBorderColor:';
     procedure setBorderColor(borderColor_: NSColor); message 'setBorderColor:';
     function fillColor: NSColor; message 'fillColor';
     function fillColor: NSColor; message 'fillColor';
     procedure setFillColor(fillColor_: NSColor); message 'setFillColor:';
     procedure setFillColor(fillColor_: NSColor); message 'setFillColor:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 7 - 9
packages/cocoaint/src/appkit/NSBrowser.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSBrowser.h }
 { Parsed from Appkit.framework NSBrowser.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -135,7 +135,7 @@ var
 {$define NSBROWSER_PAS_C}
 {$define NSBROWSER_PAS_C}
 
 
 { NSBrowser }
 { NSBrowser }
-  NSBrowser = objcclass(NSControl)
+  NSBrowser = objcclass external (NSControl)
   private
   private
     _target: id;
     _target: id;
     _action: SEL;
     _action: SEL;
@@ -157,8 +157,6 @@ var
     _brflags: _Brflags;
     _brflags: _Brflags;
     
     
   public
   public
-    class function alloc: NSBrowser; message 'alloc';
-
     class function cellClass: Pobjc_class; message 'cellClass';
     class function cellClass: Pobjc_class; message 'cellClass';
     procedure loadColumnZero; message 'loadColumnZero';
     procedure loadColumnZero; message 'loadColumnZero';
     function isLoaded: Boolean; message 'isLoaded';
     function isLoaded: Boolean; message 'isLoaded';
@@ -273,17 +271,17 @@ var
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
     function backgroundColor: NSColor; message 'backgroundColor';
     function backgroundColor: NSColor; message 'backgroundColor';
     procedure editItemAtIndexPath_withEvent_select(indexPath: NSIndexPath; theEvent: NSEvent; select: Boolean); message 'editItemAtIndexPath:withEvent:select:';
     procedure editItemAtIndexPath_withEvent_select(indexPath: NSIndexPath; theEvent: NSEvent; select: Boolean); message 'editItemAtIndexPath:withEvent:select:';
-  end; external;
+  end;
 
 
 { NSDeprecated_NSBrowserCategory }
 { NSDeprecated_NSBrowserCategory }
-  NSDeprecated_NSBrowserCategory = objccategory(NSBrowser)
+  NSDeprecated_NSBrowserCategory = objccategory external name 'NSDeprecated' (NSBrowser)
     procedure setAcceptsArrowKeys(flag: Boolean); message 'setAcceptsArrowKeys:'; deprecated 'in Mac OS X 10.6 and later';
     procedure setAcceptsArrowKeys(flag: Boolean); message 'setAcceptsArrowKeys:'; deprecated 'in Mac OS X 10.6 and later';
     function acceptsArrowKeys: Boolean; message 'acceptsArrowKeys'; deprecated 'in Mac OS X 10.6 and later';
     function acceptsArrowKeys: Boolean; message 'acceptsArrowKeys'; deprecated 'in Mac OS X 10.6 and later';
     procedure displayColumn(column: NSInteger); message 'displayColumn:'; deprecated 'in Mac OS X 10.3 and later';
     procedure displayColumn(column: NSInteger); message 'displayColumn:'; deprecated 'in Mac OS X 10.3 and later';
     procedure displayAllColumns; message 'displayAllColumns'; deprecated 'in Mac OS X 10.3 and later';
     procedure displayAllColumns; message 'displayAllColumns'; deprecated 'in Mac OS X 10.3 and later';
     procedure scrollViaScroller(sender: NSScroller); message 'scrollViaScroller:'; deprecated 'in Mac OS X 10.3 and later';
     procedure scrollViaScroller(sender: NSScroller); message 'scrollViaScroller:'; deprecated 'in Mac OS X 10.3 and later';
     procedure updateScroller; message 'updateScroller'; deprecated 'in Mac OS X 10.3 and later';
     procedure updateScroller; message 'updateScroller'; deprecated 'in Mac OS X 10.3 and later';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -292,7 +290,7 @@ var
 {$define NSBROWSER_PAS_P}
 {$define NSBROWSER_PAS_P}
   
   
 { NSBrowserDelegate Protocol }
 { NSBrowserDelegate Protocol }
-  NSBrowserDelegateProtocol = objcprotocol
+  NSBrowserDelegateProtocol = objcprotocol external name 'NSBrowserDelegate'
     function browser_numberOfRowsInColumn(sender: NSBrowser; column: NSInteger): NSInteger; message 'browser:numberOfRowsInColumn:';
     function browser_numberOfRowsInColumn(sender: NSBrowser; column: NSInteger): NSInteger; message 'browser:numberOfRowsInColumn:';
     procedure browser_createRowsForColumn_inMatrix(sender: NSBrowser; column: NSInteger; matrix: NSMatrix); message 'browser:createRowsForColumn:inMatrix:';
     procedure browser_createRowsForColumn_inMatrix(sender: NSBrowser; column: NSInteger; matrix: NSMatrix); message 'browser:createRowsForColumn:inMatrix:';
     function browser_numberOfChildrenOfItem(browser: NSBrowser; item: id): NSInteger; message 'browser:numberOfChildrenOfItem:';
     function browser_numberOfChildrenOfItem(browser: NSBrowser; item: id): NSInteger; message 'browser:numberOfChildrenOfItem:';
@@ -327,6 +325,6 @@ var
     function browser_headerViewControllerForItem(browser: NSBrowser; item: id): NSViewController; message 'browser:headerViewControllerForItem:';
     function browser_headerViewControllerForItem(browser: NSBrowser; item: id): NSViewController; message 'browser:headerViewControllerForItem:';
     procedure browser_didChangeLastColumn_toColumn(browser: NSBrowser; oldLastColumn: NSInteger; column: NSInteger); message 'browser:didChangeLastColumn:toColumn:';
     procedure browser_didChangeLastColumn_toColumn(browser: NSBrowser; oldLastColumn: NSInteger; column: NSInteger); message 'browser:didChangeLastColumn:toColumn:';
     function browser_selectionIndexesForProposedSelection_inColumn(browser: NSBrowser; proposedSelectionIndexes: NSIndexSet; column: NSInteger): NSIndexSet; message 'browser:selectionIndexesForProposedSelection:inColumn:';
     function browser_selectionIndexesForProposedSelection_inColumn(browser: NSBrowser; proposedSelectionIndexes: NSIndexSet; column: NSInteger): NSIndexSet; message 'browser:selectionIndexesForProposedSelection:inColumn:';
-  end; external name 'NSBrowserDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSBrowserCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSBrowserCell.h }
 { Parsed from Appkit.framework NSBrowserCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,11 +42,9 @@
 {$define NSBROWSERCELL_PAS_C}
 {$define NSBROWSERCELL_PAS_C}
 
 
 { NSBrowserCell }
 { NSBrowserCell }
-  NSBrowserCell = objcclass(NSCell)
+  NSBrowserCell = objcclass external (NSCell)
     
     
   public
   public
-    class function alloc: NSBrowserCell; message 'alloc';
-
     class function branchImage: NSImage; message 'branchImage';
     class function branchImage: NSImage; message 'branchImage';
     class function highlightedBranchImage: NSImage; message 'highlightedBranchImage';
     class function highlightedBranchImage: NSImage; message 'highlightedBranchImage';
     function highlightColorInView(controlView_: NSView): NSColor; message 'highlightColorInView:';
     function highlightColorInView(controlView_: NSView): NSColor; message 'highlightColorInView:';
@@ -60,7 +58,7 @@
     function image: NSImage; message 'image';
     function image: NSImage; message 'image';
     procedure setAlternateImage(newAltImage: NSImage); message 'setAlternateImage:';
     procedure setAlternateImage(newAltImage: NSImage); message 'setAlternateImage:';
     function alternateImage: NSImage; message 'alternateImage';
     function alternateImage: NSImage; message 'alternateImage';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 15 - 17
packages/cocoaint/src/appkit/NSButton.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSButton.h }
 { Parsed from Appkit.framework NSButton.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,11 +42,9 @@
 {$define NSBUTTON_PAS_C}
 {$define NSBUTTON_PAS_C}
 
 
 { NSButton }
 { NSButton }
-  NSButton = objcclass(NSControl, NSUserInterfaceValidationsProtocol)
+  NSButton = objcclass external (NSControl, NSUserInterfaceValidationsProtocol)
     
     
   public
   public
-    class function alloc: NSButton; message 'alloc';
-
     function title: NSString; message 'title';
     function title: NSString; message 'title';
     procedure setTitle(aString: NSString); message 'setTitle:';
     procedure setTitle(aString: NSString); message 'setTitle:';
     function alternateTitle: NSString; message 'alternateTitle';
     function alternateTitle: NSString; message 'alternateTitle';
@@ -75,45 +73,45 @@
 
 
     { Adopted Protocols }
     { Adopted Protocols }
     function validateUserInterfaceItem(anItem: id): Boolean;
     function validateUserInterfaceItem(anItem: id): Boolean;
-  end; external;
+  end;
 
 
 { NSKeyboardUI_NSButtonCategory }
 { NSKeyboardUI_NSButtonCategory }
-  NSKeyboardUI_NSButtonCategory = objccategory(NSButton)
+  NSKeyboardUI_NSButtonCategory = objccategory external name 'NSKeyboardUI' (NSButton)
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
-  end; external name 'NSKeyboardUI';
+  end;
 
 
 { NSButtonAttributedStringMethodsCategory }
 { NSButtonAttributedStringMethodsCategory }
-  NSButtonAttributedStringMethodsCategory = objccategory(NSButton)
+  NSButtonAttributedStringMethodsCategory = objccategory external (NSButton)
     function attributedTitle: NSAttributedString; message 'attributedTitle';
     function attributedTitle: NSAttributedString; message 'attributedTitle';
     procedure setAttributedTitle(aString: NSAttributedString); message 'setAttributedTitle:';
     procedure setAttributedTitle(aString: NSAttributedString); message 'setAttributedTitle:';
     function attributedAlternateTitle: NSAttributedString; message 'attributedAlternateTitle';
     function attributedAlternateTitle: NSAttributedString; message 'attributedAlternateTitle';
     procedure setAttributedAlternateTitle(obj: NSAttributedString); message 'setAttributedAlternateTitle:';
     procedure setAttributedAlternateTitle(obj: NSAttributedString); message 'setAttributedAlternateTitle:';
-  end; external;
+  end;
 
 
 { NSButtonBezelStylesCategory }
 { NSButtonBezelStylesCategory }
-  NSButtonBezelStylesCategory = objccategory(NSButton)
+  NSButtonBezelStylesCategory = objccategory external (NSButton)
     procedure setBezelStyle(bezelStyle_: NSBezelStyle); message 'setBezelStyle:';
     procedure setBezelStyle(bezelStyle_: NSBezelStyle); message 'setBezelStyle:';
     function bezelStyle: NSBezelStyle; message 'bezelStyle';
     function bezelStyle: NSBezelStyle; message 'bezelStyle';
-  end; external;
+  end;
 
 
 { NSButtonMixedStateCategory }
 { NSButtonMixedStateCategory }
-  NSButtonMixedStateCategory = objccategory(NSButton)
+  NSButtonMixedStateCategory = objccategory external (NSButton)
     procedure setAllowsMixedState(flag: Boolean); message 'setAllowsMixedState:';
     procedure setAllowsMixedState(flag: Boolean); message 'setAllowsMixedState:';
     function allowsMixedState: Boolean; message 'allowsMixedState';
     function allowsMixedState: Boolean; message 'allowsMixedState';
     procedure setNextState; message 'setNextState';
     procedure setNextState; message 'setNextState';
-  end; external;
+  end;
 
 
 { NSButtonBorderCategory }
 { NSButtonBorderCategory }
-  NSButtonBorderCategory = objccategory(NSButton)
+  NSButtonBorderCategory = objccategory external (NSButton)
     procedure setShowsBorderOnlyWhileMouseInside(show: Boolean); message 'setShowsBorderOnlyWhileMouseInside:';
     procedure setShowsBorderOnlyWhileMouseInside(show: Boolean); message 'setShowsBorderOnlyWhileMouseInside:';
     function showsBorderOnlyWhileMouseInside: Boolean; message 'showsBorderOnlyWhileMouseInside';
     function showsBorderOnlyWhileMouseInside: Boolean; message 'showsBorderOnlyWhileMouseInside';
-  end; external;
+  end;
 
 
 { NSButtonSoundExtensionsCategory }
 { NSButtonSoundExtensionsCategory }
-  NSButtonSoundExtensionsCategory = objccategory(NSButton)
+  NSButtonSoundExtensionsCategory = objccategory external (NSButton)
     procedure setSound(aSound: NSSound); message 'setSound:';
     procedure setSound(aSound: NSSound); message 'setSound:';
     function sound: NSSound; message 'sound';
     function sound: NSSound; message 'sound';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 13 - 15
packages/cocoaint/src/appkit/NSButtonCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSButtonCell.h }
 { Parsed from Appkit.framework NSButtonCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -167,7 +167,7 @@ __BCFlags2Ptr = ^__BCFlags2;
 {$define NSBUTTONCELL_PAS_C}
 {$define NSBUTTONCELL_PAS_C}
 
 
 { NSButtonCell }
 { NSButtonCell }
-  NSButtonCell = objcclass(NSActionCell)
+  NSButtonCell = objcclass external (NSActionCell)
   private
   private
     _altContents: NSString;
     _altContents: NSString;
     _sound: id;
     _sound: id;
@@ -180,8 +180,6 @@ __BCFlags2Ptr = ^__BCFlags2;
     _alternateImageOrKeyEquivalentFont: id;
     _alternateImageOrKeyEquivalentFont: id;
     
     
   public
   public
-    class function alloc: NSButtonCell; message 'alloc';
-
     function title: NSString; message 'title';
     function title: NSString; message 'title';
     procedure setTitle(aString: NSString); message 'setTitle:';
     procedure setTitle(aString: NSString); message 'setTitle:';
     function alternateTitle: NSString; message 'alternateTitle';
     function alternateTitle: NSString; message 'alternateTitle';
@@ -214,19 +212,19 @@ __BCFlags2Ptr = ^__BCFlags2;
     procedure drawImage_withFrame_inView(image_: NSImage; frame: NSRect; controlView_: NSView); message 'drawImage:withFrame:inView:';
     procedure drawImage_withFrame_inView(image_: NSImage; frame: NSRect; controlView_: NSView); message 'drawImage:withFrame:inView:';
     function drawTitle_withFrame_inView(title_: NSAttributedString; frame: NSRect; controlView_: NSView): NSRect; message 'drawTitle:withFrame:inView:';
     function drawTitle_withFrame_inView(title_: NSAttributedString; frame: NSRect; controlView_: NSView): NSRect; message 'drawTitle:withFrame:inView:';
     procedure drawBezelWithFrame_inView(frame: NSRect; controlView_: NSView); message 'drawBezelWithFrame:inView:';
     procedure drawBezelWithFrame_inView(frame: NSRect; controlView_: NSView); message 'drawBezelWithFrame:inView:';
-  end; external;
+  end;
 
 
 { NSKeyboardUI_NSButtonCellCategory }
 { NSKeyboardUI_NSButtonCellCategory }
-  NSKeyboardUI_NSButtonCellCategory = objccategory(NSButtonCell)
+  NSKeyboardUI_NSButtonCellCategory = objccategory external name 'NSKeyboardUI' (NSButtonCell)
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
     procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
     procedure setAlternateTitleWithMnemonic(stringWithAmpersand: NSString); message 'setAlternateTitleWithMnemonic:';
     procedure setAlternateTitleWithMnemonic(stringWithAmpersand: NSString); message 'setAlternateTitleWithMnemonic:';
     procedure setAlternateMnemonicLocation(location: NSUInteger); message 'setAlternateMnemonicLocation:';
     procedure setAlternateMnemonicLocation(location: NSUInteger); message 'setAlternateMnemonicLocation:';
     function alternateMnemonicLocation: NSUInteger; message 'alternateMnemonicLocation';
     function alternateMnemonicLocation: NSUInteger; message 'alternateMnemonicLocation';
     function alternateMnemonic: NSString; message 'alternateMnemonic';
     function alternateMnemonic: NSString; message 'alternateMnemonic';
-  end; external name 'NSKeyboardUI';
+  end;
 
 
 { NSButtonCellExtensionsCategory }
 { NSButtonCellExtensionsCategory }
-  NSButtonCellExtensionsCategory = objccategory(NSButtonCell)
+  NSButtonCellExtensionsCategory = objccategory external (NSButtonCell)
     function gradientType: NSGradientType; message 'gradientType';
     function gradientType: NSGradientType; message 'gradientType';
     procedure setGradientType(type__: NSGradientType); message 'setGradientType:';
     procedure setGradientType(type__: NSGradientType); message 'setGradientType:';
     procedure setImageDimsWhenDisabled(flag: Boolean); message 'setImageDimsWhenDisabled:';
     procedure setImageDimsWhenDisabled(flag: Boolean); message 'setImageDimsWhenDisabled:';
@@ -237,27 +235,27 @@ __BCFlags2Ptr = ^__BCFlags2;
     procedure mouseExited(event: NSEvent); message 'mouseExited:';
     procedure mouseExited(event: NSEvent); message 'mouseExited:';
     function backgroundColor: NSColor; message 'backgroundColor';
     function backgroundColor: NSColor; message 'backgroundColor';
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
-  end; external;
+  end;
 
 
 { NSButtonCellAttributedStringMethodsCategory }
 { NSButtonCellAttributedStringMethodsCategory }
-  NSButtonCellAttributedStringMethodsCategory = objccategory(NSButtonCell)
+  NSButtonCellAttributedStringMethodsCategory = objccategory external (NSButtonCell)
     function attributedTitle: NSAttributedString; message 'attributedTitle';
     function attributedTitle: NSAttributedString; message 'attributedTitle';
     procedure setAttributedTitle(obj: NSAttributedString); message 'setAttributedTitle:';
     procedure setAttributedTitle(obj: NSAttributedString); message 'setAttributedTitle:';
     function attributedAlternateTitle: NSAttributedString; message 'attributedAlternateTitle';
     function attributedAlternateTitle: NSAttributedString; message 'attributedAlternateTitle';
     procedure setAttributedAlternateTitle(obj: NSAttributedString); message 'setAttributedAlternateTitle:';
     procedure setAttributedAlternateTitle(obj: NSAttributedString); message 'setAttributedAlternateTitle:';
-  end; external;
+  end;
 
 
 { NSButtonCellBezelStylesCategory }
 { NSButtonCellBezelStylesCategory }
-  NSButtonCellBezelStylesCategory = objccategory(NSButtonCell)
+  NSButtonCellBezelStylesCategory = objccategory external (NSButtonCell)
     procedure setBezelStyle(bezelStyle_: NSBezelStyle); message 'setBezelStyle:';
     procedure setBezelStyle(bezelStyle_: NSBezelStyle); message 'setBezelStyle:';
     function bezelStyle: NSBezelStyle; message 'bezelStyle';
     function bezelStyle: NSBezelStyle; message 'bezelStyle';
-  end; external;
+  end;
 
 
 { NSButtonCellSoundExtensionsCategory }
 { NSButtonCellSoundExtensionsCategory }
-  NSButtonCellSoundExtensionsCategory = objccategory(NSButtonCell)
+  NSButtonCellSoundExtensionsCategory = objccategory external (NSButtonCell)
     procedure setSound(aSound: NSSound); message 'setSound:';
     procedure setSound(aSound: NSSound); message 'setSound:';
     function sound: NSSound; message 'sound';
     function sound: NSSound; message 'sound';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSCIImageRep.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCIImageRep.h }
 { Parsed from Appkit.framework NSCIImageRep.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,24 +42,22 @@
 {$define NSCIIMAGEREP_PAS_C}
 {$define NSCIIMAGEREP_PAS_C}
 
 
 { NSCIImageRep }
 { NSCIImageRep }
-  NSCIImageRep = objcclass(NSImageRep)
+  NSCIImageRep = objcclass external (NSImageRep)
   private
   private
     _ciImage: CIImage;
     _ciImage: CIImage;
     
     
   public
   public
-    class function alloc: NSCIImageRep; message 'alloc';
-
     class function imageRepWithCIImage(image: CIImage): id; message 'imageRepWithCIImage:';
     class function imageRepWithCIImage(image: CIImage): id; message 'imageRepWithCIImage:';
     function initWithCIImage(image: CIImage): id; message 'initWithCIImage:';
     function initWithCIImage(image: CIImage): id; message 'initWithCIImage:';
     function CIImage: CIImage; message 'CIImage';
     function CIImage: CIImage; message 'CIImage';
-  end; external;
+  end;
 
 
 { NSAppKitAdditions_CIImageCategory }
 { NSAppKitAdditions_CIImageCategory }
-  NSAppKitAdditions_CIImageCategory = objccategory(CIImage)
+  NSAppKitAdditions_CIImageCategory = objccategory external name 'NSAppKitAdditions' (CIImage)
     function initWithBitmapImageRep(bitmapImageRep: NSBitmapImageRep): id; message 'initWithBitmapImageRep:';
     function initWithBitmapImageRep(bitmapImageRep: NSBitmapImageRep): id; message 'initWithBitmapImageRep:';
     procedure drawInRect_fromRect_operation_fraction(rect: NSRect; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawInRect:fromRect:operation:fraction:';
     procedure drawInRect_fromRect_operation_fraction(rect: NSRect; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawInRect:fromRect:operation:fraction:';
     procedure drawAtPoint_fromRect_operation_fraction(point: NSPoint; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawAtPoint:fromRect:operation:fraction:';
     procedure drawAtPoint_fromRect_operation_fraction(point: NSPoint; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawAtPoint:fromRect:operation:fraction:';
-  end; external name 'NSAppKitAdditions';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSCachedImageRep.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCachedImageRep.h }
 { Parsed from Appkit.framework NSCachedImageRep.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,20 +42,18 @@
 {$define NSCACHEDIMAGEREP_PAS_C}
 {$define NSCACHEDIMAGEREP_PAS_C}
 
 
 { NSCachedImageRep }
 { NSCachedImageRep }
-  NSCachedImageRep = objcclass(NSImageRep)
+  NSCachedImageRep = objcclass external (NSImageRep)
   private
   private
     _origin: NSPoint;
     _origin: NSPoint;
     _window: NSWindow;
     _window: NSWindow;
     _cache: Pointer; {garbage collector: __strong }
     _cache: Pointer; {garbage collector: __strong }
     
     
   public
   public
-    class function alloc: NSCachedImageRep; message 'alloc';
-
     function initWithWindow_rect(win: NSWindow; rect: NSRect): id; message 'initWithWindow:rect:';
     function initWithWindow_rect(win: NSWindow; rect: NSRect): id; message 'initWithWindow:rect:';
     function initWithSize_depth_separate_alpha(size_: NSSize; depth: NSWindowDepth; flag: Boolean; alpha: Boolean): id; message 'initWithSize:depth:separate:alpha:';
     function initWithSize_depth_separate_alpha(size_: NSSize; depth: NSWindowDepth; flag: Boolean; alpha: Boolean): id; message 'initWithSize:depth:separate:alpha:';
     function window: NSWindow; message 'window';
     function window: NSWindow; message 'window';
     function rect: NSRect; message 'rect';
     function rect: NSRect; message 'rect';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 17 - 19
packages/cocoaint/src/appkit/NSCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCell.h }
 { Parsed from Appkit.framework NSCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -220,15 +220,13 @@ var
 {$define NSCELL_PAS_C}
 {$define NSCELL_PAS_C}
 
 
 { NSCell }
 { NSCell }
-  NSCell = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
+  NSCell = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
   private
   private
     _contents: id;
     _contents: id;
     _cFlags: _CFlags;
     _cFlags: _CFlags;
     _support: id;
     _support: id;
     
     
   public
   public
-    class function alloc: NSCell; message 'alloc';
-
     class function prefersTrackingUntilMouseUp: Boolean; message 'prefersTrackingUntilMouseUp';
     class function prefersTrackingUntilMouseUp: Boolean; message 'prefersTrackingUntilMouseUp';
     function initTextCell(aString: NSString): id; message 'initTextCell:';
     function initTextCell(aString: NSString): id; message 'initTextCell:';
     function initImageCell(image_: NSImage): id; message 'initImageCell:';
     function initImageCell(image_: NSImage): id; message 'initImageCell:';
@@ -349,10 +347,10 @@ var
     function copyWithZone(zone_: NSZonePtr): id;
     function copyWithZone(zone_: NSZonePtr): id;
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSKeyboardUI_NSCellCategory }
 { NSKeyboardUI_NSCellCategory }
-  NSKeyboardUI_NSCellCategory = objccategory(NSCell)
+  NSKeyboardUI_NSCellCategory = objccategory external name 'NSKeyboardUI' (NSCell)
     procedure setRefusesFirstResponder(flag: Boolean); message 'setRefusesFirstResponder:';
     procedure setRefusesFirstResponder(flag: Boolean); message 'setRefusesFirstResponder:';
     function refusesFirstResponder: Boolean; message 'refusesFirstResponder';
     function refusesFirstResponder: Boolean; message 'refusesFirstResponder';
     function acceptsFirstResponder: Boolean; message 'acceptsFirstResponder';
     function acceptsFirstResponder: Boolean; message 'acceptsFirstResponder';
@@ -367,50 +365,50 @@ var
     function focusRingType: NSFocusRingType; message 'focusRingType';
     function focusRingType: NSFocusRingType; message 'focusRingType';
     class function defaultFocusRingType: NSFocusRingType; message 'defaultFocusRingType';
     class function defaultFocusRingType: NSFocusRingType; message 'defaultFocusRingType';
     function wantsNotificationForMarkedText: Boolean; message 'wantsNotificationForMarkedText';
     function wantsNotificationForMarkedText: Boolean; message 'wantsNotificationForMarkedText';
-  end; external name 'NSKeyboardUI';
+  end;
 
 
 { NSCellAttributedStringMethodsCategory }
 { NSCellAttributedStringMethodsCategory }
-  NSCellAttributedStringMethodsCategory = objccategory(NSCell)
+  NSCellAttributedStringMethodsCategory = objccategory external (NSCell)
     function attributedStringValue: NSAttributedString; message 'attributedStringValue';
     function attributedStringValue: NSAttributedString; message 'attributedStringValue';
     procedure setAttributedStringValue(obj: NSAttributedString); message 'setAttributedStringValue:';
     procedure setAttributedStringValue(obj: NSAttributedString); message 'setAttributedStringValue:';
     function allowsEditingTextAttributes: Boolean; message 'allowsEditingTextAttributes';
     function allowsEditingTextAttributes: Boolean; message 'allowsEditingTextAttributes';
     procedure setAllowsEditingTextAttributes(flag: Boolean); message 'setAllowsEditingTextAttributes:';
     procedure setAllowsEditingTextAttributes(flag: Boolean); message 'setAllowsEditingTextAttributes:';
     function importsGraphics: Boolean; message 'importsGraphics';
     function importsGraphics: Boolean; message 'importsGraphics';
     procedure setImportsGraphics(flag: Boolean); message 'setImportsGraphics:';
     procedure setImportsGraphics(flag: Boolean); message 'setImportsGraphics:';
-  end; external;
+  end;
 
 
 { NSCellMixedStateCategory }
 { NSCellMixedStateCategory }
-  NSCellMixedStateCategory = objccategory(NSCell)
+  NSCellMixedStateCategory = objccategory external (NSCell)
     procedure setAllowsMixedState(flag: Boolean); message 'setAllowsMixedState:';
     procedure setAllowsMixedState(flag: Boolean); message 'setAllowsMixedState:';
     function allowsMixedState: Boolean; message 'allowsMixedState';
     function allowsMixedState: Boolean; message 'allowsMixedState';
     function nextState: NSInteger; message 'nextState';
     function nextState: NSInteger; message 'nextState';
     procedure setNextState; message 'setNextState';
     procedure setNextState; message 'setNextState';
-  end; external;
+  end;
 
 
 { NSCellHitTestCategory }
 { NSCellHitTestCategory }
-  NSCellHitTestCategory = objccategory(NSCell)
+  NSCellHitTestCategory = objccategory external (NSCell)
     function hitTestForEvent_inRect_ofView(event: NSEvent; cellFrame: NSRect; controlView_: NSView): NSUInteger; message 'hitTestForEvent:inRect:ofView:';
     function hitTestForEvent_inRect_ofView(event: NSEvent; cellFrame: NSRect; controlView_: NSView): NSUInteger; message 'hitTestForEvent:inRect:ofView:';
-  end; external;
+  end;
 
 
 { NSCellExpansionCategory }
 { NSCellExpansionCategory }
-  NSCellExpansionCategory = objccategory(NSCell)
+  NSCellExpansionCategory = objccategory external (NSCell)
     function expansionFrameWithFrame_inView(cellFrame: NSRect; view: NSView): NSRect; message 'expansionFrameWithFrame:inView:';
     function expansionFrameWithFrame_inView(cellFrame: NSRect; view: NSView): NSRect; message 'expansionFrameWithFrame:inView:';
     procedure drawWithExpansionFrame_inView(cellFrame: NSRect; view: NSView); message 'drawWithExpansionFrame:inView:';
     procedure drawWithExpansionFrame_inView(cellFrame: NSRect; view: NSView); message 'drawWithExpansionFrame:inView:';
-  end; external;
+  end;
 
 
 { NSCellBackgroundStyleCategory }
 { NSCellBackgroundStyleCategory }
-  NSCellBackgroundStyleCategory = objccategory(NSCell)
+  NSCellBackgroundStyleCategory = objccategory external (NSCell)
     function backgroundStyle: NSBackgroundStyle; message 'backgroundStyle';
     function backgroundStyle: NSBackgroundStyle; message 'backgroundStyle';
     procedure setBackgroundStyle(style: NSBackgroundStyle); message 'setBackgroundStyle:';
     procedure setBackgroundStyle(style: NSBackgroundStyle); message 'setBackgroundStyle:';
     function interiorBackgroundStyle: NSBackgroundStyle; message 'interiorBackgroundStyle';
     function interiorBackgroundStyle: NSBackgroundStyle; message 'interiorBackgroundStyle';
-  end; external;
+  end;
 
 
 { NSDeprecated_NSCellCategory }
 { NSDeprecated_NSCellCategory }
-  NSDeprecated_NSCellCategory = objccategory(NSCell)
+  NSDeprecated_NSCellCategory = objccategory external name 'NSDeprecated' (NSCell)
     function entryType: NSInteger; message 'entryType'; deprecated 'in Mac OS X 10 and later';
     function entryType: NSInteger; message 'entryType'; deprecated 'in Mac OS X 10 and later';
     procedure setEntryType(aType: NSInteger); message 'setEntryType:'; deprecated 'in Mac OS X 10 and later';
     procedure setEntryType(aType: NSInteger); message 'setEntryType:'; deprecated 'in Mac OS X 10 and later';
     procedure setFloatingPointFormat_left_right(autoRange: Boolean; leftDigits: NSUInteger; rightDigits: NSUInteger); message 'setFloatingPointFormat:left:right:'; deprecated 'in Mac OS X 10 and later';
     procedure setFloatingPointFormat_left_right(autoRange: Boolean; leftDigits: NSUInteger; rightDigits: NSUInteger); message 'setFloatingPointFormat:left:right:'; deprecated 'in Mac OS X 10 and later';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSClipView.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSClipView.h }
 { Parsed from Appkit.framework NSClipView.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSCLIPVIEW_PAS_C}
 {$define NSCLIPVIEW_PAS_C}
 
 
 { NSClipView }
 { NSClipView }
-  NSClipView = objcclass(NSView)
+  NSClipView = objcclass external (NSView)
   private
   private
     _backgroundColor: NSColor;
     _backgroundColor: NSColor;
     _docView: NSView;
     _docView: NSView;
@@ -75,8 +75,6 @@
       end;
       end;
     
     
   public
   public
-    class function alloc: NSClipView; message 'alloc';
-
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
     procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
     function backgroundColor: NSColor; message 'backgroundColor';
     function backgroundColor: NSColor; message 'backgroundColor';
     procedure setDrawsBackground(flag: Boolean); message 'setDrawsBackground:';
     procedure setDrawsBackground(flag: Boolean); message 'setDrawsBackground:';
@@ -94,13 +92,13 @@
     function autoscroll(theEvent: NSEvent): Boolean; message 'autoscroll:';
     function autoscroll(theEvent: NSEvent): Boolean; message 'autoscroll:';
     function constrainScrollPoint(newOrigin: NSPoint): NSPoint; message 'constrainScrollPoint:';
     function constrainScrollPoint(newOrigin: NSPoint): NSPoint; message 'constrainScrollPoint:';
     procedure scrollToPoint(newOrigin: NSPoint); message 'scrollToPoint:';
     procedure scrollToPoint(newOrigin: NSPoint); message 'scrollToPoint:';
-  end; external;
+  end;
 
 
 { NSClipViewSuperviewCategory }
 { NSClipViewSuperviewCategory }
-  NSClipViewSuperviewCategory = objccategory(NSView)
+  NSClipViewSuperviewCategory = objccategory external (NSView)
     procedure reflectScrolledClipView(aClipView: NSClipView); message 'reflectScrolledClipView:';
     procedure reflectScrolledClipView(aClipView: NSClipView); message 'reflectScrolledClipView:';
     procedure scrollClipView_toPoint(aClipView: NSClipView; aPoint: NSPoint); message 'scrollClipView:toPoint:';
     procedure scrollClipView_toPoint(aClipView: NSClipView; aPoint: NSPoint); message 'scrollClipView:toPoint:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 7 - 11
packages/cocoaint/src/appkit/NSCollectionView.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCollectionView.h }
 { Parsed from Appkit.framework NSCollectionView.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:07 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -57,7 +57,7 @@ const
 {$define NSCOLLECTIONVIEW_PAS_C}
 {$define NSCOLLECTIONVIEW_PAS_C}
 
 
 { NSCollectionViewItem }
 { NSCollectionViewItem }
-  NSCollectionViewItem = objcclass(NSViewController, NSCopyingProtocol)
+  NSCollectionViewItem = objcclass external (NSViewController, NSCopyingProtocol)
   private
   private
     _collectionView: NSCollectionView;
     _collectionView: NSCollectionView;
     __cviFlags: bitpacked record
     __cviFlags: bitpacked record
@@ -74,18 +74,16 @@ const
     _reserved2: Pointer;
     _reserved2: Pointer;
     
     
   public
   public
-    class function alloc: NSCollectionViewItem; message 'alloc';
-
     function collectionView: NSCollectionView; message 'collectionView';
     function collectionView: NSCollectionView; message 'collectionView';
     procedure setSelected(flag: Boolean); message 'setSelected:';
     procedure setSelected(flag: Boolean); message 'setSelected:';
     function isSelected: Boolean; message 'isSelected';
     function isSelected: Boolean; message 'isSelected';
 
 
     { Adopted Protocols }
     { Adopted Protocols }
     function copyWithZone(zone_: NSZonePtr): id;
     function copyWithZone(zone_: NSZonePtr): id;
-  end; external;
+  end;
 
 
 { NSCollectionView }
 { NSCollectionView }
-  NSCollectionView = objcclass(NSView)
+  NSCollectionView = objcclass external (NSView)
   private
   private
     _content: NSArray;
     _content: NSArray;
     _selectionIndexes: NSMutableIndexSet;
     _selectionIndexes: NSMutableIndexSet;
@@ -137,8 +135,6 @@ const
         _reserved: array[0..15] of Pointer;
         _reserved: array[0..15] of Pointer;
     
     
   public
   public
-    class function alloc: NSCollectionView; message 'alloc';
-
     procedure setDelegate(aDelegate: id); message 'setDelegate:';
     procedure setDelegate(aDelegate: id); message 'setDelegate:';
     function delegate: id; message 'delegate';
     function delegate: id; message 'delegate';
     function isFirstResponder: Boolean; message 'isFirstResponder';
     function isFirstResponder: Boolean; message 'isFirstResponder';
@@ -167,7 +163,7 @@ const
     function frameForItemAtIndex(index: NSUInteger): NSRect; message 'frameForItemAtIndex:';
     function frameForItemAtIndex(index: NSUInteger): NSRect; message 'frameForItemAtIndex:';
     procedure setDraggingSourceOperationMask_forLocal(dragOperationMask: NSDragOperation; localDestination: Boolean); message 'setDraggingSourceOperationMask:forLocal:';
     procedure setDraggingSourceOperationMask_forLocal(dragOperationMask: NSDragOperation; localDestination: Boolean); message 'setDraggingSourceOperationMask:forLocal:';
     function draggingImageForItemsAtIndexes_withEvent_offset(indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'draggingImageForItemsAtIndexes:withEvent:offset:';
     function draggingImageForItemsAtIndexes_withEvent_offset(indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'draggingImageForItemsAtIndexes:withEvent:offset:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -176,13 +172,13 @@ const
 {$define NSCOLLECTIONVIEW_PAS_P}
 {$define NSCOLLECTIONVIEW_PAS_P}
   
   
 { NSCollectionViewDelegate Protocol }
 { NSCollectionViewDelegate Protocol }
-  NSCollectionViewDelegateProtocol = objcprotocol
+  NSCollectionViewDelegateProtocol = objcprotocol external name 'NSCollectionViewDelegate'
     function collectionView_canDragItemsAtIndexes_withEvent(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent): Boolean; message 'collectionView:canDragItemsAtIndexes:withEvent:';
     function collectionView_canDragItemsAtIndexes_withEvent(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent): Boolean; message 'collectionView:canDragItemsAtIndexes:withEvent:';
     function collectionView_writeItemsAtIndexes_toPasteboard(collectionView: NSCollectionView; indexes: NSIndexSet; pasteboard: NSPasteboard): Boolean; message 'collectionView:writeItemsAtIndexes:toPasteboard:';
     function collectionView_writeItemsAtIndexes_toPasteboard(collectionView: NSCollectionView; indexes: NSIndexSet; pasteboard: NSPasteboard): Boolean; message 'collectionView:writeItemsAtIndexes:toPasteboard:';
     function collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes(collectionView: NSCollectionView; dropURL: NSURL; indexes: NSIndexSet): NSArray; message 'collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:';
     function collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes(collectionView: NSCollectionView; dropURL: NSURL; indexes: NSIndexSet): NSArray; message 'collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:';
     function collectionView_draggingImageForItemsAtIndexes_withEvent_offset(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'collectionView:draggingImageForItemsAtIndexes:withEvent:offset:';
     function collectionView_draggingImageForItemsAtIndexes_withEvent_offset(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'collectionView:draggingImageForItemsAtIndexes:withEvent:offset:';
     function collectionView_validateDrop_proposedIndex_dropOperation(collectionView: NSCollectionView; draggingInfo: id; proposedDropIndex: NSIntegerPtr; proposedDropOperation: NSCollectionViewDropOperationPtr): NSDragOperation; message 'collectionView:validateDrop:proposedIndex:dropOperation:';
     function collectionView_validateDrop_proposedIndex_dropOperation(collectionView: NSCollectionView; draggingInfo: id; proposedDropIndex: NSIntegerPtr; proposedDropOperation: NSCollectionViewDropOperationPtr): NSDragOperation; message 'collectionView:validateDrop:proposedIndex:dropOperation:';
     function collectionView_acceptDrop_index_dropOperation(collectionView: NSCollectionView; draggingInfo: id; index: NSInteger; dropOperation: NSCollectionViewDropOperation): Boolean; message 'collectionView:acceptDrop:index:dropOperation:';
     function collectionView_acceptDrop_index_dropOperation(collectionView: NSCollectionView; draggingInfo: id; index: NSInteger; dropOperation: NSCollectionViewDropOperation): Boolean; message 'collectionView:acceptDrop:index:dropOperation:';
-  end; external name 'NSCollectionViewDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 9 - 11
packages/cocoaint/src/appkit/NSColor.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColor.h }
 { Parsed from Appkit.framework NSColor.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -50,11 +50,9 @@ var
 {$define NSCOLOR_PAS_C}
 {$define NSCOLOR_PAS_C}
 
 
 { NSColor }
 { NSColor }
-  NSColor = objcclass(NSObject)
+  NSColor = objcclass external (NSObject)
     
     
   public
   public
-    class function alloc: NSColor; message 'alloc';
-
     class function colorWithCalibratedWhite_alpha(white: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedWhite:alpha:';
     class function colorWithCalibratedWhite_alpha(white: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedWhite:alpha:';
     class function colorWithCalibratedHue_saturation_brightness_alpha(hue: CGFloat; saturation: CGFloat; brightness: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedHue:saturation:brightness:alpha:';
     class function colorWithCalibratedHue_saturation_brightness_alpha(hue: CGFloat; saturation: CGFloat; brightness: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedHue:saturation:brightness:alpha:';
     class function colorWithCalibratedRed_green_blue_alpha(red: CGFloat; green: CGFloat; blue: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedRed:green:blue:alpha:';
     class function colorWithCalibratedRed_green_blue_alpha(red: CGFloat; green: CGFloat; blue: CGFloat; alpha: CGFloat): NSColor; message 'colorWithCalibratedRed:green:blue:alpha:';
@@ -154,22 +152,22 @@ var
     procedure drawSwatchInRect(rect: NSRect); message 'drawSwatchInRect:';
     procedure drawSwatchInRect(rect: NSRect); message 'drawSwatchInRect:';
     class procedure setIgnoresAlpha(flag: Boolean); message 'setIgnoresAlpha:';
     class procedure setIgnoresAlpha(flag: Boolean); message 'setIgnoresAlpha:';
     class function ignoresAlpha: Boolean; message 'ignoresAlpha';
     class function ignoresAlpha: Boolean; message 'ignoresAlpha';
-  end; external;
+  end;
 
 
 { NSQuartzCoreAdditions_NSColorCategory }
 { NSQuartzCoreAdditions_NSColorCategory }
-  NSQuartzCoreAdditions_NSColorCategory = objccategory(NSColor)
+  NSQuartzCoreAdditions_NSColorCategory = objccategory external name 'NSQuartzCoreAdditions' (NSColor)
     class function colorWithCIColor(color: CIColor): NSColor; message 'colorWithCIColor:';
     class function colorWithCIColor(color: CIColor): NSColor; message 'colorWithCIColor:';
-  end; external name 'NSQuartzCoreAdditions';
+  end;
 
 
 { NSAppKitAdditionsCategory }
 { NSAppKitAdditionsCategory }
-  NSAppKitAdditionsCategory = objccategory(CIColor)
+  NSAppKitAdditionsCategory = objccategory external (CIColor)
     function initWithColor(color: NSColor): id; message 'initWithColor:';
     function initWithColor(color: NSColor): id; message 'initWithColor:';
-  end; external;
+  end;
 
 
 { NSAppKitColorExtensionsCategory }
 { NSAppKitColorExtensionsCategory }
-  NSAppKitColorExtensionsCategory = objccategory(NSCoder)
+  NSAppKitColorExtensionsCategory = objccategory external (NSCoder)
     function decodeNXColor: NSColor; message 'decodeNXColor';
     function decodeNXColor: NSColor; message 'decodeNXColor';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSColorList.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorList.h }
 { Parsed from Appkit.framework NSColorList.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -46,7 +46,7 @@ var
 {$define NSCOLORLIST_PAS_C}
 {$define NSCOLORLIST_PAS_C}
 
 
 { NSColorList }
 { NSColorList }
-  NSColorList = objcclass(NSObject, NSCodingProtocol)
+  NSColorList = objcclass external (NSObject, NSCodingProtocol)
   private
   private
     _keyArray: NSMutableArray;
     _keyArray: NSMutableArray;
     _colorArray: NSMutableArray;
     _colorArray: NSMutableArray;
@@ -75,8 +75,6 @@ var
     _clAuxiliaryStorage: id;
     _clAuxiliaryStorage: id;
     
     
   public
   public
-    class function alloc: NSColorList; message 'alloc';
-
     class function availableColorLists: NSArray; message 'availableColorLists';
     class function availableColorLists: NSArray; message 'availableColorLists';
     class function colorListNamed(name_: NSString): NSColorList; message 'colorListNamed:';
     class function colorListNamed(name_: NSString): NSColorList; message 'colorListNamed:';
     function initWithName(name_: NSString): id; message 'initWithName:';
     function initWithName(name_: NSString): id; message 'initWithName:';
@@ -94,7 +92,7 @@ var
     { Adopted Protocols }
     { Adopted Protocols }
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 7 - 9
packages/cocoaint/src/appkit/NSColorPanel.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorPanel.h }
 { Parsed from Appkit.framework NSColorPanel.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -75,7 +75,7 @@ var
 {$define NSCOLORPANEL_PAS_C}
 {$define NSCOLORPANEL_PAS_C}
 
 
 { NSColorPanel }
 { NSColorPanel }
-  NSColorPanel = objcclass(NSPanel)
+  NSColorPanel = objcclass external (NSPanel)
   private
   private
     _colorSwatch: id;
     _colorSwatch: id;
     _reserved1: id;
     _reserved1: id;
@@ -110,8 +110,6 @@ var
     _opacityTextController: id;
     _opacityTextController: id;
     
     
   public
   public
-    class function alloc: NSColorPanel; message 'alloc';
-
     class function sharedColorPanel: NSColorPanel; message 'sharedColorPanel';
     class function sharedColorPanel: NSColorPanel; message 'sharedColorPanel';
     class function sharedColorPanelExists: Boolean; message 'sharedColorPanelExists';
     class function sharedColorPanelExists: Boolean; message 'sharedColorPanelExists';
     class function dragColor_withEvent_fromView(color_: NSColor; theEvent: NSEvent; sourceView: NSView): Boolean; message 'dragColor:withEvent:fromView:';
     class function dragColor_withEvent_fromView(color_: NSColor; theEvent: NSEvent; sourceView: NSView): Boolean; message 'dragColor:withEvent:fromView:';
@@ -132,17 +130,17 @@ var
     procedure setTarget(anObject: id); message 'setTarget:';
     procedure setTarget(anObject: id); message 'setTarget:';
     procedure attachColorList(colorList: NSColorList); message 'attachColorList:';
     procedure attachColorList(colorList: NSColorList); message 'attachColorList:';
     procedure detachColorList(colorList: NSColorList); message 'detachColorList:';
     procedure detachColorList(colorList: NSColorList); message 'detachColorList:';
-  end; external;
+  end;
 
 
 { NSColorPanel_NSApplicationCategory }
 { NSColorPanel_NSApplicationCategory }
-  NSColorPanel_NSApplicationCategory = objccategory(NSApplication)
+  NSColorPanel_NSApplicationCategory = objccategory external name 'NSColorPanel' (NSApplication)
     procedure orderFrontColorPanel(sender: id); message 'orderFrontColorPanel:';
     procedure orderFrontColorPanel(sender: id); message 'orderFrontColorPanel:';
-  end; external name 'NSColorPanel';
+  end;
 
 
 { NSColorPanelResponderMethodCategory }
 { NSColorPanelResponderMethodCategory }
-  NSColorPanelResponderMethodCategory = objccategory(NSObject)
+  NSColorPanelResponderMethodCategory = objccategory external (NSObject)
     procedure changeColor(sender: id); message 'changeColor:';
     procedure changeColor(sender: id); message 'changeColor:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSColorPicker.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorPicker.h }
 { Parsed from Appkit.framework NSColorPicker.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,15 +42,13 @@
 {$define NSCOLORPICKER_PAS_C}
 {$define NSCOLORPICKER_PAS_C}
 
 
 { NSColorPicker }
 { NSColorPicker }
-  NSColorPicker = objcclass(NSObject, NSColorPickingDefaultProtocol)
+  NSColorPicker = objcclass external (NSObject, NSColorPickingDefaultProtocol)
   private
   private
     _imageObject: id;
     _imageObject: id;
     _colorPanel: NSColorPanel;
     _colorPanel: NSColorPanel;
     _buttonToolTip: NSString;
     _buttonToolTip: NSString;
     
     
   public
   public
-    class function alloc: NSColorPicker; message 'alloc';
-
     function initWithPickerMask_colorPanel(mask: NSUInteger; owningColorPanel: NSColorPanel): id; message 'initWithPickerMask:colorPanel:';
     function initWithPickerMask_colorPanel(mask: NSUInteger; owningColorPanel: NSColorPanel): id; message 'initWithPickerMask:colorPanel:';
     function colorPanel: NSColorPanel; message 'colorPanel';
     function colorPanel: NSColorPanel; message 'colorPanel';
     function provideNewButtonImage: NSImage; message 'provideNewButtonImage';
     function provideNewButtonImage: NSImage; message 'provideNewButtonImage';
@@ -64,7 +62,7 @@
 
 
     { Adopted Protocols }
     { Adopted Protocols }
     procedure alphaControlAddedOrRemoved(sender: id);
     procedure alphaControlAddedOrRemoved(sender: id);
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 5
packages/cocoaint/src/appkit/NSColorPicking.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorPicking.h }
 { Parsed from Appkit.framework NSColorPicking.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -40,7 +40,7 @@
 {$define NSCOLORPICKING_PAS_P}
 {$define NSCOLORPICKING_PAS_P}
   
   
 { NSColorPickingDefault Protocol }
 { NSColorPickingDefault Protocol }
-  NSColorPickingDefaultProtocol = objcprotocol
+  NSColorPickingDefaultProtocol = objcprotocol external name 'NSColorPickingDefault'
     function initWithPickerMask_colorPanel(mask: NSUInteger; owningColorPanel: NSColorPanel): id; message 'initWithPickerMask:colorPanel:';
     function initWithPickerMask_colorPanel(mask: NSUInteger; owningColorPanel: NSColorPanel): id; message 'initWithPickerMask:colorPanel:';
     function provideNewButtonImage: NSImage; message 'provideNewButtonImage';
     function provideNewButtonImage: NSImage; message 'provideNewButtonImage';
     procedure insertNewButtonImage_in(newButtonImage: NSImage; buttonCell: NSButtonCell); message 'insertNewButtonImage:in:';
     procedure insertNewButtonImage_in(newButtonImage: NSImage; buttonCell: NSButtonCell); message 'insertNewButtonImage:in:';
@@ -51,14 +51,14 @@
     procedure setMode(mode: NSColorPanelMode); message 'setMode:';
     procedure setMode(mode: NSColorPanelMode); message 'setMode:';
     function buttonToolTip: NSString; message 'buttonToolTip';
     function buttonToolTip: NSString; message 'buttonToolTip';
     function minContentSize: NSSize; message 'minContentSize';
     function minContentSize: NSSize; message 'minContentSize';
-  end; external name 'NSColorPickingDefault';
+  end;
   
   
 { NSColorPickingCustom Protocol }
 { NSColorPickingCustom Protocol }
-  NSColorPickingCustomProtocol = objcprotocol
+  NSColorPickingCustomProtocol = objcprotocol external name 'NSColorPickingCustom'
     function supportsMode(mode: NSColorPanelMode): Boolean; message 'supportsMode:';
     function supportsMode(mode: NSColorPanelMode): Boolean; message 'supportsMode:';
     function currentMode: NSColorPanelMode; message 'currentMode';
     function currentMode: NSColorPanelMode; message 'currentMode';
     function provideNewView(initialRequest: Boolean): NSView; message 'provideNewView:';
     function provideNewView(initialRequest: Boolean): NSView; message 'provideNewView:';
     procedure setColor(newColor: NSColor); message 'setColor:';
     procedure setColor(newColor: NSColor); message 'setColor:';
-  end; external name 'NSColorPickingCustom';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSColorSpace.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorSpace.h }
 { Parsed from Appkit.framework NSColorSpace.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -59,7 +59,7 @@ type
 {$define NSCOLORSPACE_PAS_C}
 {$define NSCOLORSPACE_PAS_C}
 
 
 { NSColorSpace }
 { NSColorSpace }
-  NSColorSpace = objcclass(NSObject, NSCodingProtocol)
+  NSColorSpace = objcclass external (NSObject, NSCodingProtocol)
   private
   private
     _profile: id;
     _profile: id;
     __flags: bitpacked record
     __flags: bitpacked record
@@ -79,8 +79,6 @@ type
         _reserved: array[0..4] of Pointer;
         _reserved: array[0..4] of Pointer;
     
     
   public
   public
-    class function alloc: NSColorSpace; message 'alloc';
-
     function initWithICCProfileData(iccData: NSData): id; message 'initWithICCProfileData:';
     function initWithICCProfileData(iccData: NSData): id; message 'initWithICCProfileData:';
     function ICCProfileData: NSData; message 'ICCProfileData';
     function ICCProfileData: NSData; message 'ICCProfileData';
     function initWithColorSyncProfile(prof: Pointer): id; message 'initWithColorSyncProfile:';
     function initWithColorSyncProfile(prof: Pointer): id; message 'initWithColorSyncProfile:';
@@ -104,7 +102,7 @@ type
     { Adopted Protocols }
     { Adopted Protocols }
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSColorWell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSColorWell.h }
 { Parsed from Appkit.framework NSColorWell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSCOLORWELL_PAS_C}
 {$define NSCOLORWELL_PAS_C}
 
 
 { NSColorWell }
 { NSColorWell }
-  NSColorWell = objcclass(NSControl)
+  NSColorWell = objcclass external (NSControl)
   private
   private
     _color: NSColor;
     _color: NSColor;
     _target: id;
     _target: id;
@@ -60,8 +60,6 @@
       end;
       end;
     
     
   public
   public
-    class function alloc: NSColorWell; message 'alloc';
-
     procedure deactivate; message 'deactivate';
     procedure deactivate; message 'deactivate';
     procedure activate(exclusive: Boolean); message 'activate:';
     procedure activate(exclusive: Boolean); message 'activate:';
     function isActive: Boolean; message 'isActive';
     function isActive: Boolean; message 'isActive';
@@ -71,7 +69,7 @@
     procedure takeColorFrom(sender: id); message 'takeColorFrom:';
     procedure takeColorFrom(sender: id); message 'takeColorFrom:';
     procedure setColor(color_: NSColor); message 'setColor:';
     procedure setColor(color_: NSColor); message 'setColor:';
     function color: NSColor; message 'color';
     function color: NSColor; message 'color';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 7 - 9
packages/cocoaint/src/appkit/NSComboBox.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSComboBox.h }
 { Parsed from Appkit.framework NSComboBox.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -51,13 +51,11 @@ var
 {$define NSCOMBOBOX_PAS_C}
 {$define NSCOMBOBOX_PAS_C}
 
 
 { NSComboBox }
 { NSComboBox }
-  NSComboBox = objcclass(NSTextField)
+  NSComboBox = objcclass external (NSTextField)
   private
   private
     _dataSource: id;
     _dataSource: id;
     
     
   public
   public
-    class function alloc: NSComboBox; message 'alloc';
-
     function hasVerticalScroller: Boolean; message 'hasVerticalScroller';
     function hasVerticalScroller: Boolean; message 'hasVerticalScroller';
     procedure setHasVerticalScroller(flag: Boolean); message 'setHasVerticalScroller:';
     procedure setHasVerticalScroller(flag: Boolean); message 'setHasVerticalScroller:';
     function intercellSpacing: NSSize; message 'intercellSpacing';
     function intercellSpacing: NSSize; message 'intercellSpacing';
@@ -95,7 +93,7 @@ var
     function objectValueOfSelectedItem: id; message 'objectValueOfSelectedItem';
     function objectValueOfSelectedItem: id; message 'objectValueOfSelectedItem';
     function indexOfItemWithObjectValue(object_: id): NSInteger; message 'indexOfItemWithObjectValue:';
     function indexOfItemWithObjectValue(object_: id): NSInteger; message 'indexOfItemWithObjectValue:';
     function objectValues: NSArray; message 'objectValues';
     function objectValues: NSArray; message 'objectValues';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -104,19 +102,19 @@ var
 {$define NSCOMBOBOX_PAS_P}
 {$define NSCOMBOBOX_PAS_P}
   
   
 { NSComboBoxDataSource Protocol }
 { NSComboBoxDataSource Protocol }
-  NSComboBoxDataSourceProtocol = objcprotocol
+  NSComboBoxDataSourceProtocol = objcprotocol external name 'NSComboBoxDataSource'
     function numberOfItemsInComboBox(aComboBox: NSComboBox): NSInteger; message 'numberOfItemsInComboBox:';
     function numberOfItemsInComboBox(aComboBox: NSComboBox): NSInteger; message 'numberOfItemsInComboBox:';
     function comboBox_objectValueForItemAtIndex(aComboBox: NSComboBox; index: NSInteger): id; message 'comboBox:objectValueForItemAtIndex:';
     function comboBox_objectValueForItemAtIndex(aComboBox: NSComboBox; index: NSInteger): id; message 'comboBox:objectValueForItemAtIndex:';
     function comboBox_indexOfItemWithStringValue(aComboBox: NSComboBox; string_: NSString): NSUInteger; message 'comboBox:indexOfItemWithStringValue:';
     function comboBox_indexOfItemWithStringValue(aComboBox: NSComboBox; string_: NSString): NSUInteger; message 'comboBox:indexOfItemWithStringValue:';
     function comboBox_completedString(aComboBox: NSComboBox; string_: NSString): NSString; message 'comboBox:completedString:';
     function comboBox_completedString(aComboBox: NSComboBox; string_: NSString): NSString; message 'comboBox:completedString:';
-  end; external name 'NSComboBoxDataSource';
+  end;
   
   
 { NSComboBoxDelegate Protocol }
 { NSComboBoxDelegate Protocol }
-  NSComboBoxDelegateProtocol = objcprotocol
+  NSComboBoxDelegateProtocol = objcprotocol external name 'NSComboBoxDelegate'
     procedure comboBoxWillPopUp(notification: NSNotification); message 'comboBoxWillPopUp:';
     procedure comboBoxWillPopUp(notification: NSNotification); message 'comboBoxWillPopUp:';
     procedure comboBoxWillDismiss(notification: NSNotification); message 'comboBoxWillDismiss:';
     procedure comboBoxWillDismiss(notification: NSNotification); message 'comboBoxWillDismiss:';
     procedure comboBoxSelectionDidChange(notification: NSNotification); message 'comboBoxSelectionDidChange:';
     procedure comboBoxSelectionDidChange(notification: NSNotification); message 'comboBoxSelectionDidChange:';
     procedure comboBoxSelectionIsChanging(notification: NSNotification); message 'comboBoxSelectionIsChanging:';
     procedure comboBoxSelectionIsChanging(notification: NSNotification); message 'comboBoxSelectionIsChanging:';
-  end; external name 'NSComboBoxDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 6
packages/cocoaint/src/appkit/NSComboBoxCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSComboBoxCell.h }
 { Parsed from Appkit.framework NSComboBoxCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -43,7 +43,7 @@
 {$define NSCOMBOBOXCELL_PAS_C}
 {$define NSCOMBOBOXCELL_PAS_C}
 
 
 { NSComboBoxCell }
 { NSComboBoxCell }
-  NSComboBoxCell = objcclass(NSTextFieldCell)
+  NSComboBoxCell = objcclass external (NSTextFieldCell)
   private
   private
     _delegate: id;
     _delegate: id;
     _dataSource: id;
     _dataSource: id;
@@ -71,8 +71,7 @@
     _reserved: Pointer;
     _reserved: Pointer;
     
     
   public
   public
-    class function alloc: NSComboBoxCell; message 'alloc';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -81,11 +80,11 @@
 {$define NSCOMBOBOXCELL_PAS_P}
 {$define NSCOMBOBOXCELL_PAS_P}
   
   
 { NSComboBoxCellDataSource Protocol }
 { NSComboBoxCellDataSource Protocol }
-  NSComboBoxCellDataSourceProtocol = objcprotocol
+  NSComboBoxCellDataSourceProtocol = objcprotocol external name 'NSComboBoxCellDataSource'
     function numberOfItemsInComboBoxCell(comboBoxCell: NSComboBoxCell): NSInteger; message 'numberOfItemsInComboBoxCell:';
     function numberOfItemsInComboBoxCell(comboBoxCell: NSComboBoxCell): NSInteger; message 'numberOfItemsInComboBoxCell:';
     function comboBoxCell_objectValueForItemAtIndex(aComboBoxCell: NSComboBoxCell; index: NSInteger): id; message 'comboBoxCell:objectValueForItemAtIndex:';
     function comboBoxCell_objectValueForItemAtIndex(aComboBoxCell: NSComboBoxCell; index: NSInteger): id; message 'comboBoxCell:objectValueForItemAtIndex:';
     function comboBoxCell_indexOfItemWithStringValue(aComboBoxCell: NSComboBoxCell; string_: NSString): NSUInteger; message 'comboBoxCell:indexOfItemWithStringValue:';
     function comboBoxCell_indexOfItemWithStringValue(aComboBoxCell: NSComboBoxCell; string_: NSString): NSUInteger; message 'comboBoxCell:indexOfItemWithStringValue:';
     function comboBoxCell_completedString(aComboBoxCell: NSComboBoxCell; uncompletedString: NSString): NSString; message 'comboBoxCell:completedString:';
     function comboBoxCell_completedString(aComboBoxCell: NSComboBoxCell; uncompletedString: NSString): NSString; message 'comboBoxCell:completedString:';
-  end; external name 'NSComboBoxCellDataSource';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 13 - 15
packages/cocoaint/src/appkit/NSControl.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSControl.h }
 { Parsed from Appkit.framework NSControl.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -49,7 +49,7 @@ var
 {$define NSCONTROL_PAS_C}
 {$define NSCONTROL_PAS_C}
 
 
 { NSControl }
 { NSControl }
-  NSControl = objcclass(NSView)
+  NSControl = objcclass external (NSView)
   private
   private
     _tag: NSInteger;
     _tag: NSInteger;
     _cell: id;
     _cell: id;
@@ -68,8 +68,6 @@ var
       end;
       end;
     
     
   public
   public
-    class function alloc: NSControl; message 'alloc';
-
     class procedure setCellClass(factoryId: Pobjc_class); message 'setCellClass:';
     class procedure setCellClass(factoryId: Pobjc_class); message 'setCellClass:';
     class function cellClass: Pobjc_class; message 'cellClass';
     class function cellClass: Pobjc_class; message 'cellClass';
     function initWithFrame(frameRect: NSRect): id; message 'initWithFrame:';
     function initWithFrame(frameRect: NSRect): id; message 'initWithFrame:';
@@ -129,32 +127,32 @@ var
     function integerValue: NSInteger; message 'integerValue';
     function integerValue: NSInteger; message 'integerValue';
     procedure setIntegerValue(anInteger: NSInteger); message 'setIntegerValue:';
     procedure setIntegerValue(anInteger: NSInteger); message 'setIntegerValue:';
     procedure takeIntegerValueFrom(sender: id); message 'takeIntegerValueFrom:';
     procedure takeIntegerValueFrom(sender: id); message 'takeIntegerValueFrom:';
-  end; external;
+  end;
 
 
 { NSKeyboardUI_NSControlCategory }
 { NSKeyboardUI_NSControlCategory }
-  NSKeyboardUI_NSControlCategory = objccategory(NSControl)
+  NSKeyboardUI_NSControlCategory = objccategory external name 'NSKeyboardUI' (NSControl)
     procedure performClick(sender: id); message 'performClick:';
     procedure performClick(sender: id); message 'performClick:';
     procedure setRefusesFirstResponder(flag: Boolean); message 'setRefusesFirstResponder:';
     procedure setRefusesFirstResponder(flag: Boolean); message 'setRefusesFirstResponder:';
     function refusesFirstResponder: Boolean; message 'refusesFirstResponder';
     function refusesFirstResponder: Boolean; message 'refusesFirstResponder';
-  end; external name 'NSKeyboardUI';
+  end;
 
 
 { NSControlSubclassNotificationsCategory }
 { NSControlSubclassNotificationsCategory }
-  NSControlSubclassNotificationsCategory = objccategory(NSObject)
+  NSControlSubclassNotificationsCategory = objccategory external (NSObject)
     procedure controlTextDidBeginEditing(obj: NSNotification); message 'controlTextDidBeginEditing:';
     procedure controlTextDidBeginEditing(obj: NSNotification); message 'controlTextDidBeginEditing:';
     procedure controlTextDidEndEditing(obj: NSNotification); message 'controlTextDidEndEditing:';
     procedure controlTextDidEndEditing(obj: NSNotification); message 'controlTextDidEndEditing:';
     procedure controlTextDidChange(obj: NSNotification); message 'controlTextDidChange:';
     procedure controlTextDidChange(obj: NSNotification); message 'controlTextDidChange:';
-  end; external;
+  end;
 
 
 { NSControlAttributedStringMethodsCategory }
 { NSControlAttributedStringMethodsCategory }
-  NSControlAttributedStringMethodsCategory = objccategory(NSControl)
+  NSControlAttributedStringMethodsCategory = objccategory external (NSControl)
     function attributedStringValue: NSAttributedString; message 'attributedStringValue';
     function attributedStringValue: NSAttributedString; message 'attributedStringValue';
     procedure setAttributedStringValue(obj: NSAttributedString); message 'setAttributedStringValue:';
     procedure setAttributedStringValue(obj: NSAttributedString); message 'setAttributedStringValue:';
-  end; external;
+  end;
 
 
 { NSDeprecated_NSControlCategory }
 { NSDeprecated_NSControlCategory }
-  NSDeprecated_NSControlCategory = objccategory(NSControl)
+  NSDeprecated_NSControlCategory = objccategory external name 'NSDeprecated' (NSControl)
     procedure setFloatingPointFormat_left_right(autoRange: Boolean; leftDigits: NSUInteger; rightDigits: NSUInteger); message 'setFloatingPointFormat:left:right:'; deprecated 'in Mac OS X 10 and later';
     procedure setFloatingPointFormat_left_right(autoRange: Boolean; leftDigits: NSUInteger; rightDigits: NSUInteger); message 'setFloatingPointFormat:left:right:'; deprecated 'in Mac OS X 10 and later';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -163,7 +161,7 @@ var
 {$define NSCONTROL_PAS_P}
 {$define NSCONTROL_PAS_P}
   
   
 { NSControlTextEditingDelegate Protocol }
 { NSControlTextEditingDelegate Protocol }
-  NSControlTextEditingDelegateProtocol = objcprotocol
+  NSControlTextEditingDelegateProtocol = objcprotocol external name 'NSControlTextEditingDelegate'
     function control_textShouldBeginEditing(control: NSControl; fieldEditor: NSText): Boolean; message 'control:textShouldBeginEditing:';
     function control_textShouldBeginEditing(control: NSControl; fieldEditor: NSText): Boolean; message 'control:textShouldBeginEditing:';
     function control_textShouldEndEditing(control: NSControl; fieldEditor: NSText): Boolean; message 'control:textShouldEndEditing:';
     function control_textShouldEndEditing(control: NSControl; fieldEditor: NSText): Boolean; message 'control:textShouldEndEditing:';
     function control_didFailToFormatString_errorDescription(control: NSControl; string_: NSString; error: NSString): Boolean; message 'control:didFailToFormatString:errorDescription:';
     function control_didFailToFormatString_errorDescription(control: NSControl; string_: NSString; error: NSString): Boolean; message 'control:didFailToFormatString:errorDescription:';
@@ -171,6 +169,6 @@ var
     function control_isValidObject(control: NSControl; obj: id): Boolean; message 'control:isValidObject:';
     function control_isValidObject(control: NSControl; obj: id): Boolean; message 'control:isValidObject:';
     function control_textView_doCommandBySelector(control: NSControl; textView: NSTextView; commandSelector: SEL): Boolean; message 'control:textView:doCommandBySelector:';
     function control_textView_doCommandBySelector(control: NSControl; textView: NSTextView; commandSelector: SEL): Boolean; message 'control:textView:doCommandBySelector:';
     function control_textView_completions_forPartialWordRange_indexOfSelectedItem(control: NSControl; textView: NSTextView; words: NSArray; charRange: NSRange; index: NSIntegerPtr): NSArray; message 'control:textView:completions:forPartialWordRange:indexOfSelectedItem:';
     function control_textView_completions_forPartialWordRange_indexOfSelectedItem(control: NSControl; textView: NSTextView; words: NSArray; charRange: NSRange; index: NSIntegerPtr): NSArray; message 'control:textView:completions:forPartialWordRange:indexOfSelectedItem:';
-  end; external name 'NSControlTextEditingDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSController.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSController.h }
 { Parsed from Appkit.framework NSController.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSCONTROLLER_PAS_C}
 {$define NSCONTROLLER_PAS_C}
 
 
 { NSController }
 { NSController }
-  NSController = objcclass(NSObject, NSCodingProtocol)
+  NSController = objcclass external (NSObject, NSCodingProtocol)
   private
   private
     _reserved: Pointer;
     _reserved: Pointer;
     _reserved2: Pointer;
     _reserved2: Pointer;
@@ -70,8 +70,6 @@
     _singleValueAccessor: id;
     _singleValueAccessor: id;
     
     
   public
   public
-    class function alloc: NSController; message 'alloc';
-
     procedure objectDidBeginEditing(editor: id); message 'objectDidBeginEditing:';
     procedure objectDidBeginEditing(editor: id); message 'objectDidBeginEditing:';
     procedure objectDidEndEditing(editor: id); message 'objectDidEndEditing:';
     procedure objectDidEndEditing(editor: id); message 'objectDidEndEditing:';
     procedure discardEditing; message 'discardEditing';
     procedure discardEditing; message 'discardEditing';
@@ -82,7 +80,7 @@
     { Adopted Protocols }
     { Adopted Protocols }
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSCursor.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCursor.h }
 { Parsed from Appkit.framework NSCursor.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -46,7 +46,7 @@ const
 {$define NSCURSOR_PAS_C}
 {$define NSCURSOR_PAS_C}
 
 
 { NSCursor }
 { NSCursor }
-  NSCursor = objcclass(NSObject, NSCodingProtocol)
+  NSCursor = objcclass external (NSObject, NSCodingProtocol)
   private
   private
     _hotSpot: NSPoint;
     _hotSpot: NSPoint;
     __flags: bitpacked record
     __flags: bitpacked record
@@ -62,8 +62,6 @@ const
     _image: id;
     _image: id;
     
     
   public
   public
-    class function alloc: NSCursor; message 'alloc';
-
     class function currentCursor: NSCursor; message 'currentCursor';
     class function currentCursor: NSCursor; message 'currentCursor';
     class function currentSystemCursor: NSCursor; message 'currentSystemCursor';
     class function currentSystemCursor: NSCursor; message 'currentSystemCursor';
     class function arrowCursor: NSCursor; message 'arrowCursor';
     class function arrowCursor: NSCursor; message 'arrowCursor';
@@ -103,7 +101,7 @@ const
     { Adopted Protocols }
     { Adopted Protocols }
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSCustomImageRep.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSCustomImageRep.h }
 { Parsed from Appkit.framework NSCustomImageRep.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,19 +42,17 @@
 {$define NSCUSTOMIMAGEREP_PAS_C}
 {$define NSCUSTOMIMAGEREP_PAS_C}
 
 
 { NSCustomImageRep }
 { NSCustomImageRep }
-  NSCustomImageRep = objcclass(NSImageRep)
+  NSCustomImageRep = objcclass external (NSImageRep)
   private
   private
     _drawMethod: SEL;
     _drawMethod: SEL;
     _drawObject: id;
     _drawObject: id;
     _reserved: cuint;
     _reserved: cuint;
     
     
   public
   public
-    class function alloc: NSCustomImageRep; message 'alloc';
-
     function initWithDrawSelector_delegate(aMethod: SEL; anObject: id): id; message 'initWithDrawSelector:delegate:';
     function initWithDrawSelector_delegate(aMethod: SEL; anObject: id): id; message 'initWithDrawSelector:delegate:';
     function drawSelector: SEL; message 'drawSelector';
     function drawSelector: SEL; message 'drawSelector';
     function delegate: id; message 'delegate';
     function delegate: id; message 'delegate';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 3 - 5
packages/cocoaint/src/appkit/NSDatePicker.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDatePicker.h }
 { Parsed from Appkit.framework NSDatePicker.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,11 +42,9 @@
 {$define NSDATEPICKER_PAS_C}
 {$define NSDATEPICKER_PAS_C}
 
 
 { NSDatePicker }
 { NSDatePicker }
-  NSDatePicker = objcclass(NSControl)
+  NSDatePicker = objcclass external (NSControl)
     
     
   public
   public
-    class function alloc: NSDatePicker; message 'alloc';
-
     function datePickerStyle: NSDatePickerStyle; message 'datePickerStyle';
     function datePickerStyle: NSDatePickerStyle; message 'datePickerStyle';
     procedure setDatePickerStyle(newStyle: NSDatePickerStyle); message 'setDatePickerStyle:';
     procedure setDatePickerStyle(newStyle: NSDatePickerStyle); message 'setDatePickerStyle:';
     function isBezeled: Boolean; message 'isBezeled';
     function isBezeled: Boolean; message 'isBezeled';
@@ -79,7 +77,7 @@
     procedure setMaxDate(date: NSDate); message 'setMaxDate:';
     procedure setMaxDate(date: NSDate); message 'setMaxDate:';
     function delegate: id; message 'delegate';
     function delegate: id; message 'delegate';
     procedure setDelegate(anObject: id); message 'setDelegate:';
     procedure setDelegate(anObject: id); message 'setDelegate:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSDatePickerCell.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDatePickerCell.h }
 { Parsed from Appkit.framework NSDatePickerCell.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -71,7 +71,7 @@ type
 {$define NSDATEPICKERCELL_PAS_C}
 {$define NSDATEPICKERCELL_PAS_C}
 
 
 { NSDatePickerCell }
 { NSDatePickerCell }
-  NSDatePickerCell = objcclass(NSActionCell)
+  NSDatePickerCell = objcclass external (NSActionCell)
   private
   private
     _timeInterval: NSTimeInterval;
     _timeInterval: NSTimeInterval;
     _minDate: NSDate;
     _minDate: NSDate;
@@ -105,8 +105,6 @@ type
     _reserved4: id;
     _reserved4: id;
     
     
   public
   public
-    class function alloc: NSDatePickerCell; message 'alloc';
-
     function datePickerStyle: NSDatePickerStyle; message 'datePickerStyle';
     function datePickerStyle: NSDatePickerStyle; message 'datePickerStyle';
     procedure setDatePickerStyle(newStyle: NSDatePickerStyle); message 'setDatePickerStyle:';
     procedure setDatePickerStyle(newStyle: NSDatePickerStyle); message 'setDatePickerStyle:';
     function drawsBackground: Boolean; message 'drawsBackground';
     function drawsBackground: Boolean; message 'drawsBackground';
@@ -135,7 +133,7 @@ type
     procedure setMaxDate(date: NSDate); message 'setMaxDate:';
     procedure setMaxDate(date: NSDate); message 'setMaxDate:';
     function delegate: id; message 'delegate';
     function delegate: id; message 'delegate';
     procedure setDelegate(anObject: id); message 'setDelegate:';
     procedure setDelegate(anObject: id); message 'setDelegate:';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -144,8 +142,8 @@ type
 {$define NSDATEPICKERCELL_PAS_P}
 {$define NSDATEPICKERCELL_PAS_P}
   
   
 { NSDatePickerCellDelegate Protocol }
 { NSDatePickerCellDelegate Protocol }
-  NSDatePickerCellDelegateProtocol = objcprotocol
+  NSDatePickerCellDelegateProtocol = objcprotocol external name 'NSDatePickerCellDelegate'
     procedure datePickerCell_validateProposedDateValue_timeInterval(aDatePickerCell: NSDatePickerCell; proposedDateValue: NSDatePointer; proposedTimeInterval: NSTimeIntervalPtr); message 'datePickerCell:validateProposedDateValue:timeInterval:';
     procedure datePickerCell_validateProposedDateValue_timeInterval(aDatePickerCell: NSDatePickerCell; proposedDateValue: NSDatePointer; proposedTimeInterval: NSTimeIntervalPtr); message 'datePickerCell:validateProposedDateValue:timeInterval:';
-  end; external name 'NSDatePickerCellDelegate';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSDictionaryController.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDictionaryController.h }
 { Parsed from Appkit.framework NSDictionaryController.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:20 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSDICTIONARYCONTROLLER_PAS_C}
 {$define NSDICTIONARYCONTROLLER_PAS_C}
 
 
 { NSDictionaryController }
 { NSDictionaryController }
-  NSDictionaryController = objcclass(NSArrayController)
+  NSDictionaryController = objcclass external (NSArrayController)
   private
   private
     _reserved5: Pointer;
     _reserved5: Pointer;
     _reserved6: Pointer;
     _reserved6: Pointer;
@@ -67,8 +67,6 @@
       end;
       end;
     
     
   public
   public
-    class function alloc: NSDictionaryController; message 'alloc';
-
     function newObject: id; message 'newObject';
     function newObject: id; message 'newObject';
     procedure setInitialKey(key: NSString); message 'setInitialKey:';
     procedure setInitialKey(key: NSString); message 'setInitialKey:';
     function initialKey: NSString; message 'initialKey';
     function initialKey: NSString; message 'initialKey';
@@ -82,10 +80,10 @@
     function localizedKeyDictionary: NSDictionary; message 'localizedKeyDictionary';
     function localizedKeyDictionary: NSDictionary; message 'localizedKeyDictionary';
     procedure setLocalizedKeyTable(stringsFileName: NSString); message 'setLocalizedKeyTable:';
     procedure setLocalizedKeyTable(stringsFileName: NSString); message 'setLocalizedKeyTable:';
     function localizedKeyTable: NSString; message 'localizedKeyTable';
     function localizedKeyTable: NSString; message 'localizedKeyTable';
-  end; external;
+  end;
 
 
 { NSDictionaryControllerKeyValuePairCategory }
 { NSDictionaryControllerKeyValuePairCategory }
-  NSDictionaryControllerKeyValuePairCategory = objccategory(NSObject)
+  NSDictionaryControllerKeyValuePairCategory = objccategory external (NSObject)
     procedure setLocalizedKey(localizedKey: NSString); message 'setLocalizedKey:';
     procedure setLocalizedKey(localizedKey: NSString); message 'setLocalizedKey:';
     function localizedKey: NSString; message 'localizedKey';
     function localizedKey: NSString; message 'localizedKey';
     procedure setKey(key: NSString); message 'setKey:';
     procedure setKey(key: NSString); message 'setKey:';
@@ -93,7 +91,7 @@
     procedure setValue(value: id); message 'setValue:';
     procedure setValue(value: id); message 'setValue:';
     function value: id; message 'value';
     function value: id; message 'value';
     function isExplicitlyIncluded: Boolean; message 'isExplicitlyIncluded';
     function isExplicitlyIncluded: Boolean; message 'isExplicitlyIncluded';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSDockTile.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDockTile.h }
 { Parsed from Appkit.framework NSDockTile.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -47,7 +47,7 @@ const
 {$define NSDOCKTILE_PAS_C}
 {$define NSDOCKTILE_PAS_C}
 
 
 { NSDockTile }
 { NSDockTile }
-  NSDockTile = objcclass(NSObject)
+  NSDockTile = objcclass external (NSObject)
   private
   private
     _owner: id;
     _owner: id;
     _dockContextRef: Pointer;
     _dockContextRef: Pointer;
@@ -67,8 +67,6 @@ const
         reserved: array[0..4] of id;
         reserved: array[0..4] of id;
     
     
   public
   public
-    class function alloc: NSDockTile; message 'alloc';
-
     function size: NSSize; message 'size';
     function size: NSSize; message 'size';
     procedure setContentView(view: NSView); message 'setContentView:';
     procedure setContentView(view: NSView); message 'setContentView:';
     function contentView: NSView; message 'contentView';
     function contentView: NSView; message 'contentView';
@@ -78,7 +76,7 @@ const
     procedure setBadgeLabel(string_: NSString); message 'setBadgeLabel:';
     procedure setBadgeLabel(string_: NSString); message 'setBadgeLabel:';
     function badgeLabel: NSString; message 'badgeLabel';
     function badgeLabel: NSString; message 'badgeLabel';
     function owner: id; message 'owner';
     function owner: id; message 'owner';
-  end; external;
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}
@@ -87,9 +85,9 @@ const
 {$define NSDOCKTILE_PAS_P}
 {$define NSDOCKTILE_PAS_P}
   
   
 { NSDockTilePlugIn Protocol }
 { NSDockTilePlugIn Protocol }
-  NSDockTilePlugInProtocol = objcprotocol
+  NSDockTilePlugInProtocol = objcprotocol external name 'NSDockTilePlugIn'
     procedure setDockTile(dockTile: NSDockTile); message 'setDockTile:';
     procedure setDockTile(dockTile: NSDockTile); message 'setDockTile:';
     function dockMenu: NSMenu; message 'dockMenu';
     function dockMenu: NSMenu; message 'dockMenu';
-  end; external name 'NSDockTilePlugIn';
+  end;
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSDocument.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDocument.h }
 { Parsed from Appkit.framework NSDocument.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -65,7 +65,7 @@ type
 {$define NSDOCUMENT_PAS_C}
 {$define NSDOCUMENT_PAS_C}
 
 
 { NSDocument }
 { NSDocument }
-  NSDocument = objcclass(NSObject, NSUserInterfaceValidationsProtocol)
+  NSDocument = objcclass external (NSObject, NSUserInterfaceValidationsProtocol)
   private
   private
     _window: NSWindow;
     _window: NSWindow;
     _windowControllers: id;
     _windowControllers: id;
@@ -96,8 +96,6 @@ type
     _savePanelSaveType: NSString;
     _savePanelSaveType: NSString;
     
     
   public
   public
-    class function alloc: NSDocument; message 'alloc';
-
     function init: id; message 'init';
     function init: id; message 'init';
     function initWithType_error(typeName: NSString; outError: NSErrorPointer): id; message 'initWithType:error:';
     function initWithType_error(typeName: NSString; outError: NSErrorPointer): id; message 'initWithType:error:';
     class function canConcurrentlyReadDocumentsOfType(typeName: NSString): Boolean; message 'canConcurrentlyReadDocumentsOfType:';
     class function canConcurrentlyReadDocumentsOfType(typeName: NSString): Boolean; message 'canConcurrentlyReadDocumentsOfType:';
@@ -178,10 +176,10 @@ type
     function validateUserInterfaceItem(anItem: id): Boolean; message 'validateUserInterfaceItem:';
     function validateUserInterfaceItem(anItem: id): Boolean; message 'validateUserInterfaceItem:';
 
 
     { Adopted Protocols }
     { Adopted Protocols }
-  end; external;
+  end;
 
 
 { NSDeprecated_NSDocumentCategory }
 { NSDeprecated_NSDocumentCategory }
-  NSDeprecated_NSDocumentCategory = objccategory(NSDocument)
+  NSDeprecated_NSDocumentCategory = objccategory external name 'NSDeprecated' (NSDocument)
     function dataRepresentationOfType(type_: NSString): NSData; message 'dataRepresentationOfType:'; deprecated 'in Mac OS X 10.4 and later';
     function dataRepresentationOfType(type_: NSString): NSData; message 'dataRepresentationOfType:'; deprecated 'in Mac OS X 10.4 and later';
     function fileAttributesToWriteToFile_ofType_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; saveOperationType: NSSaveOperationType): NSDictionary; message 'fileAttributesToWriteToFile:ofType:saveOperation:';
     function fileAttributesToWriteToFile_ofType_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; saveOperationType: NSSaveOperationType): NSDictionary; message 'fileAttributesToWriteToFile:ofType:saveOperation:';
     function fileName: NSString; message 'fileName'; deprecated 'in Mac OS X 10.4 and later';
     function fileName: NSString; message 'fileName'; deprecated 'in Mac OS X 10.4 and later';
@@ -202,7 +200,7 @@ type
     function writeToFile_ofType_originalFile_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; fullOriginalDocumentPath: NSString; saveOperationType: NSSaveOperationType): Boolean; message 'writeToFile:ofType:originalFile:saveOperation:'; deprecated 'in Mac OS X 10.4 and later';
     function writeToFile_ofType_originalFile_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; fullOriginalDocumentPath: NSString; saveOperationType: NSSaveOperationType): Boolean; message 'writeToFile:ofType:originalFile:saveOperation:'; deprecated 'in Mac OS X 10.4 and later';
     function writeToURL_ofType(url: NSURL; type_: NSString): Boolean; message 'writeToURL:ofType:'; deprecated 'in Mac OS X 10.4 and later';
     function writeToURL_ofType(url: NSURL; type_: NSString): Boolean; message 'writeToURL:ofType:'; deprecated 'in Mac OS X 10.4 and later';
     function writeWithBackupToFile_ofType_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; saveOperationType: NSSaveOperationType): Boolean; message 'writeWithBackupToFile:ofType:saveOperation:'; deprecated 'in Mac OS X 10.4 and later';
     function writeWithBackupToFile_ofType_saveOperation(fullDocumentPath: NSString; documentTypeName: NSString; saveOperationType: NSSaveOperationType): Boolean; message 'writeWithBackupToFile:ofType:saveOperation:'; deprecated 'in Mac OS X 10.4 and later';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

+ 5 - 7
packages/cocoaint/src/appkit/NSDocumentController.inc

@@ -1,5 +1,5 @@
 { Parsed from Appkit.framework NSDocumentController.h }
 { Parsed from Appkit.framework NSDocumentController.h }
-{ Version: 2.1.2 - Wed Dec 8 10:06:06 CET 2010 }
+{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
 
 
 
 
 {$ifdef TYPES}
 {$ifdef TYPES}
@@ -42,7 +42,7 @@
 {$define NSDOCUMENTCONTROLLER_PAS_C}
 {$define NSDOCUMENTCONTROLLER_PAS_C}
 
 
 { NSDocumentController }
 { NSDocumentController }
-  NSDocumentController = objcclass(NSObject, NSCodingProtocol, NSUserInterfaceValidationsProtocol)
+  NSDocumentController = objcclass external (NSObject, NSCodingProtocol, NSUserInterfaceValidationsProtocol)
   private
   private
     _documents: id;
     _documents: id;
     _moreVars: id;
     _moreVars: id;
@@ -51,8 +51,6 @@
     _recentsLimit: cint;
     _recentsLimit: cint;
     
     
   public
   public
-    class function alloc: NSDocumentController; message 'alloc';
-
     class function sharedDocumentController: id; message 'sharedDocumentController';
     class function sharedDocumentController: id; message 'sharedDocumentController';
     function init: id; message 'init';
     function init: id; message 'init';
     function documents: NSArray; message 'documents';
     function documents: NSArray; message 'documents';
@@ -96,10 +94,10 @@
     { Adopted Protocols }
     { Adopted Protocols }
     procedure encodeWithCoder(aCoder: NSCoder);
     procedure encodeWithCoder(aCoder: NSCoder);
     function initWithCoder(aDecoder: NSCoder): id;
     function initWithCoder(aDecoder: NSCoder): id;
-  end; external;
+  end;
 
 
 { NSDeprecated_NSDocumentControllerCategory }
 { NSDeprecated_NSDocumentControllerCategory }
-  NSDeprecated_NSDocumentControllerCategory = objccategory(NSDocumentController)
+  NSDeprecated_NSDocumentControllerCategory = objccategory external name 'NSDeprecated' (NSDocumentController)
     function fileExtensionsFromType(typeName: NSString): NSArray; message 'fileExtensionsFromType:'; deprecated 'in Mac OS X 10.5 and later';
     function fileExtensionsFromType(typeName: NSString): NSArray; message 'fileExtensionsFromType:'; deprecated 'in Mac OS X 10.5 and later';
     function typeFromFileExtension(fileNameExtensionOrHFSFileType: NSString): NSString; message 'typeFromFileExtension:'; deprecated 'in Mac OS X 10.5 and later';
     function typeFromFileExtension(fileNameExtensionOrHFSFileType: NSString): NSString; message 'typeFromFileExtension:'; deprecated 'in Mac OS X 10.5 and later';
     function documentForFileName(fileName: NSString): id; message 'documentForFileName:'; deprecated 'in Mac OS X 10.4 and later';
     function documentForFileName(fileName: NSString): id; message 'documentForFileName:'; deprecated 'in Mac OS X 10.4 and later';
@@ -112,7 +110,7 @@
     function openUntitledDocumentOfType_display(type_: NSString; display: Boolean): id; message 'openUntitledDocumentOfType:display:'; deprecated 'in Mac OS X 10.4 and later';
     function openUntitledDocumentOfType_display(type_: NSString; display: Boolean): id; message 'openUntitledDocumentOfType:display:'; deprecated 'in Mac OS X 10.4 and later';
     procedure setShouldCreateUI(flag: Boolean); message 'setShouldCreateUI:'; deprecated 'in Mac OS X 10.4 and later';
     procedure setShouldCreateUI(flag: Boolean); message 'setShouldCreateUI:'; deprecated 'in Mac OS X 10.4 and later';
     function shouldCreateUI: Boolean; message 'shouldCreateUI'; deprecated 'in Mac OS X 10.4 and later';
     function shouldCreateUI: Boolean; message 'shouldCreateUI'; deprecated 'in Mac OS X 10.4 and later';
-  end; external name 'NSDeprecated';
+  end;
 
 
 {$endif}
 {$endif}
 {$endif}
 {$endif}

Vissa filer visades inte eftersom för många filer har ändrats