]> git.saurik.com Git - apple/mdnsresponder.git/blobdiff - mDNSMacOS9/mDNSLibrary.c
mDNSResponder-379.27.tar.gz
[apple/mdnsresponder.git] / mDNSMacOS9 / mDNSLibrary.c
index 31d9423ec1ca700bb81497c0631599aa871efd80..6328395c21a3bac7479290f57b3567e489d9b1f4 100644 (file)
@@ -5,9 +5,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,8 +17,8 @@
 
 // Define the required CFM Shared Library entry and exit points
 #include <CodeFragments.h>
-#include "mDNSEmbeddedAPI.h"                   // Defines the interface to the client layer above
-#include "mDNSMacOS9.h"                                        // Defines the specific types needed to run mDNS on this platform
+#include "mDNSEmbeddedAPI.h"            // Defines the interface to the client layer above
+#include "mDNSMacOS9.h"                 // Defines the specific types needed to run mDNS on this platform
 
 mDNS mDNSStorage;
 static mDNS_PlatformSupport PlatformSupportStorage;
@@ -27,37 +27,37 @@ static mDNS_PlatformSupport PlatformSupportStorage;
 static CacheEntity rrcachestorage[RR_CACHE_SIZE];
 
 mDNSlocal void mDNS_StatusCallback(mDNS *const m, mStatus result)
-       {
-       if (result == mStatus_GrowCache)
-               {
-               // Allocate another chunk of cache storage
-               CacheEntity *storage = OTAllocMem(sizeof(CacheEntity) * RR_CACHE_SIZE);
-               if (storage) mDNS_GrowCache(m, storage, RR_CACHE_SIZE);
-               }
-       }
+{
+    if (result == mStatus_GrowCache)
+    {
+        // Allocate another chunk of cache storage
+        CacheEntity *storage = OTAllocMem(sizeof(CacheEntity) * RR_CACHE_SIZE);
+        if (storage) mDNS_GrowCache(m, storage, RR_CACHE_SIZE);
+    }
+}
 
 extern pascal OSErr mDNS_CFMInit(const CFragInitBlock *theInitBlock);
 pascal OSErr mDNS_CFMInit(const CFragInitBlock *theInitBlock)
-       {
-       extern pascal OSErr __initialize(const CFragInitBlock *theInitBlock);
-       __initialize(theInitBlock);     // MUST do this first!
-               {
-               mStatus err;
-               THz oldZone = GetZone();
-               SetZone(SystemZone());
-               LogMsg("mDNS/DNS-SD with Macsbug breaks -- do not ship this version to customers");
-               err = mDNS_Init(&mDNSStorage, &PlatformSupportStorage, rrcachestorage, RR_CACHE_SIZE,
-                       mDNS_Init_AdvertiseLocalAddresses, mDNS_StatusCallback, mDNS_Init_NoInitCallbackContext);
-               SetZone(oldZone);
-               return((OSErr)err);
-               }
-       }
-       
+{
+    extern pascal OSErr __initialize(const CFragInitBlock *theInitBlock);
+    __initialize(theInitBlock); // MUST do this first!
+    {
+        mStatus err;
+        THz oldZone = GetZone();
+        SetZone(SystemZone());
+        LogMsg("mDNS/DNS-SD with Macsbug breaks -- do not ship this version to customers");
+        err = mDNS_Init(&mDNSStorage, &PlatformSupportStorage, rrcachestorage, RR_CACHE_SIZE,
+                        mDNS_Init_AdvertiseLocalAddresses, mDNS_StatusCallback, mDNS_Init_NoInitCallbackContext);
+        SetZone(oldZone);
+        return((OSErr)err);
+    }
+}
+
 extern void mDNS_CFMTerm(void);
 void mDNS_CFMTerm(void)
-       {
-       extern pascal void  __terminate(void);
-       LogMsg("mDNS_CFMTerm");
-       mDNS_Close(&mDNSStorage);
-       __terminate();
-       }
+{
+    extern pascal void __terminate(void);
+    LogMsg("mDNS_CFMTerm");
+    mDNS_Close(&mDNSStorage);
+    __terminate();
+}