summaryrefslogtreecommitdiff
path: root/libs/appleutility/CAComponent.cpp
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
committerRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
commit22b07e0233a29d9633ffa825a79503befaf2e16e (patch)
tree1d8b06056f8e12197158f5d906319767d3dedda5 /libs/appleutility/CAComponent.cpp
parente11ba7b79d68bc1070b170236c22123966d7bcc3 (diff)
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/appleutility/CAComponent.cpp')
-rw-r--r--libs/appleutility/CAComponent.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/appleutility/CAComponent.cpp b/libs/appleutility/CAComponent.cpp
index 914e8f3c08..5c9686df36 100644
--- a/libs/appleutility/CAComponent.cpp
+++ b/libs/appleutility/CAComponent.cpp
@@ -94,15 +94,15 @@ OSStatus CAComponent::GetResourceVersion (UInt32 &outVersion) const
ResFileRefNum componentResFileID = kResFileNotOpened;
OSStatus result;
short thngResourceCount;
-
+
short curRes = CurResFile();
require_noerr (result = OpenAComponentResFile( mComp, &componentResFileID), home);
require_noerr (result = componentResFileID <= 0, home);
-
+
UseResFile(componentResFileID);
thngResourceCount = Count1Resources(kComponentResourceType);
-
+
require_noerr (result = ResError(), home);
// only go on if we successfully found at least 1 thng resource
require_noerr (thngResourceCount <= 0 ? -1 : 0, home);
@@ -135,12 +135,12 @@ OSStatus CAComponent::GetResourceVersion (UInt32 &outVersion) const
if (!versionFound)
result = resNotFound;
-
+
UseResFile(curRes); // revert
-
+
if ( componentResFileID != kResFileNotOpened )
CloseComponentResFile(componentResFileID);
-
+
home:
return result;
}
@@ -174,9 +174,9 @@ void CAComponent::SetCompNames () const
Handle h1 = NewHandle(4);
CAComponentDescription desc;
OSStatus err = GetComponentInfo (Comp(), &desc, h1, 0, 0);
-
+
if (err) { DisposeHandle(h1); return; }
-
+
HLock(h1);
char* ptr1 = *h1;
// Get the manufacturer's name... look for the ':' character convention
@@ -184,7 +184,7 @@ void CAComponent::SetCompNames () const
char* displayStr = 0;
const_cast<CAComponent*>(this)->mCompName = CFStringCreateWithPascalString(NULL, (const unsigned char*)*h1, kCFStringEncodingMacRoman);
-
+
for (int i = 0; i < len; ++i) {
if (ptr1[i] == ':') { // found the name
ptr1[i] = 0;
@@ -192,11 +192,11 @@ void CAComponent::SetCompNames () const
break;
}
}
-
+
if (displayStr)
{
const_cast<CAComponent*>(this)->mManuName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman);
-
+
//move displayStr ptr past the manu, to the name
// we move the characters down a index, because the handle doesn't have any room
// at the end for the \0
@@ -209,7 +209,7 @@ void CAComponent::SetCompNames () const
const_cast<CAComponent*>(this)->mAUName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman);
}
-
+
DisposeHandle (h1);
}
}