diff options
| author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-02-15 20:53:03 +0000 |
|---|---|---|
| committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-02-15 20:53:03 +0000 |
| commit | 485850d7bc5beb4102eef7e5881a5b5c05c8bd3c (patch) | |
| tree | ac3c49fbde129601bceb9679114313daf90e3bbf /packages/cocoaint/utils | |
| parent | 1044b044b4ebf5e9fcee3e918645ed35fc0b2c5b (diff) | |
| download | fpc-485850d7bc5beb4102eef7e5881a5b5c05c8bd3c.tar.gz | |
* whitespace fixes from Ryan
+ some comments from Ryan
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16919 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/cocoaint/utils')
| -rw-r--r-- | packages/cocoaint/utils/source/objp.php | 12 | ||||
| -rw-r--r-- | packages/cocoaint/utils/source/objp_base.php | 14 |
2 files changed, 14 insertions, 12 deletions
diff --git a/packages/cocoaint/utils/source/objp.php b/packages/cocoaint/utils/source/objp.php index f268414b9c..03d91bcf6b 100644 --- a/packages/cocoaint/utils/source/objp.php +++ b/packages/cocoaint/utils/source/objp.php @@ -1539,6 +1539,7 @@ class ObjectivePParser extends ObjectivePParserBase { $this->PrintOutput(0, "{\$endif}"); } + // print class/protocol forward declarations if (($header["classes"]) || ($header["protocols"])) { $this->PrintOutput(0, ""); $this->PrintOutput(0, "{\$ifdef FORWARD}"); @@ -1561,6 +1562,7 @@ class ObjectivePParser extends ObjectivePParserBase { $this->PrintOutput(0, "{\$endif}"); } + // print classes if ($header["classes"]) { $this->PrintOutput(0, ""); $this->PrintOutput(0, "{\$ifdef CLASSES}"); @@ -1582,13 +1584,12 @@ class ObjectivePParser extends ObjectivePParserBase { $this->PrintOutput(0, "{\$endif}"); } - + // print protocols if ($header["protocols"]) { $this->PrintOutput(0, "{\$ifdef PROTOCOLS}"); $this->PrintOutput(0, "{\$ifndef $macro"."_PAS_P}"); $this->PrintOutput(0, "{\$define $macro"."_PAS_P}"); - foreach ($header["protocols"] as $protocol) { $this->PrintOutput(1, ""); $this->PrintOutput(0, "{ ".$protocol["name"]." Protocol }"); @@ -1946,9 +1947,10 @@ class ObjectivePParser extends ObjectivePParserBase { $this->PrintOutput(0, ""); $this->PrintOutput(0, "type"); - foreach ($all_classes as $class) - $this->PrintOutput(1, $class." = objcclass external;"); - + foreach ($all_classes as $class) { + $this->PrintOutput(1, $class." = objcclass external;"); + } + $this->PrintOutput(0, ""); $this->PrintOutput(0, "implementation"); $this->PrintOutput(0, ""); diff --git a/packages/cocoaint/utils/source/objp_base.php b/packages/cocoaint/utils/source/objp_base.php index 3e6095fc0c..6a02cae392 100644 --- a/packages/cocoaint/utils/source/objp_base.php +++ b/packages/cocoaint/utils/source/objp_base.php @@ -172,15 +172,15 @@ class ObjectivePParserBase { // Categories to ignore // NSURLLoading is deprecated in 10.4 and later, and causes problems // when parsing the iPhoneOS foundation - var $ignore_categories = array("NSURLLoading", - ); + var $ignore_categories = array("NSURLLoading"); // Methods to ignore var $ignore_methods = array( "observationInfo", ); - // methods to rename to particular alternatives + // methods to rename to particular alternatives var $replace_instance_methods = array ( "class" => "_class", ); + var $replace_class_methods = array ("respondsToSelector" => "classRespondsToSelector", "isEqual" => "classIsEqual", "hash" => "classHash", @@ -206,10 +206,10 @@ class ObjectivePParserBase { ); var $skip_blocks = array( //"^#if __LP64__.*"=>"^#(else|endif)+", - "^#if __BLOCKS__"=>"^#(else|endif)+", - "^#if NS_BLOCKS_AVAILABLE"=>"^#(else|endif)+", - "^#ifndef CGFLOAT_DEFINED"=>"^#(else|endif)+", - ); + "^#if __BLOCKS__"=>"^#(else|endif)+", + "^#if NS_BLOCKS_AVAILABLE"=>"^#(else|endif)+", + "^#ifndef CGFLOAT_DEFINED"=>"^#(else|endif)+", + ); var $macro_blocks = array( "^#if \(__LP64__\)"=>"\$ifdef cpu64", "^#if __LP64__.*"=>"\$ifdef cpu64", |
