(platform_darwin.m) Style nits

This commit is contained in:
twinaphex 2015-04-20 21:00:40 +02:00
parent 445bf04892
commit 7e95712015

View File

@ -45,42 +45,42 @@
typedef enum
{
CFApplicationDirectory = 1, // supported applications (Applications)
CFDemoApplicationDirectory, // unsupported applications, demonstration versions (Demos)
CFDeveloperApplicationDirectory, // developer applications (Developer/Applications). DEPRECATED - there is no one single Developer directory.
CFAdminApplicationDirectory, // system and network administration applications (Administration)
CFLibraryDirectory, // various documentation, support, and configuration files, resources (Library)
CFDeveloperDirectory, // developer resources (Developer) DEPRECATED - there is no one single Developer directory.
CFUserDirectory, // user home directories (Users)
CFDocumentationDirectory, // documentation (Documentation)
CFDocumentDirectory, // documents (Documents)
CFCoreServiceDirectory, // location of CoreServices directory (System/Library/CoreServices)
CFAutosavedInformationDirectory = 11, // location of autosaved documents (Documents/Autosaved)
CFDesktopDirectory = 12, // location of user's desktop
CFCachesDirectory = 13, // location of discardable cache files (Library/Caches)
CFApplicationSupportDirectory = 14, // location of application support files (plug-ins, etc) (Library/Application Support)
CFDownloadsDirectory = 15, // location of the user's "Downloads" directory
CFInputMethodsDirectory = 16, // input methods (Library/Input Methods)
CFMoviesDirectory = 17, // location of user's Movies directory (~/Movies)
CFMusicDirectory = 18, // location of user's Music directory (~/Music)
CFPicturesDirectory = 19, // location of user's Pictures directory (~/Pictures)
CFPrinterDescriptionDirectory = 20, // location of system's PPDs directory (Library/Printers/PPDs)
CFSharedPublicDirectory = 21, // location of user's Public sharing directory (~/Public)
CFPreferencePanesDirectory = 22, // location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes)
CFApplicationScriptsDirectory = 23, // location of the user scripts folder for the calling application (~/Library/Application Scripts/code-signing-id)
CFItemReplacementDirectory = 99, // For use with NSFileManager's URLForDirectory:inDomain:appropriateForURL:create:error:
CFAllApplicationsDirectory = 100, // all directories where applications can occur
CFAllLibrariesDirectory = 101, // all directories where resources can occur
CFTrashDirectory = 102 // location of Trash directory
CFApplicationDirectory = 1, /* Supported applications (Applications) */
CFDemoApplicationDirectory = 2, /* Unsupported applications, demonstration versions (Demos) */
CFDeveloperApplicationDirectory = 3, /* Developer applications (Developer/Applications). DEPRECATED - there is no one single Developer directory. */
CFAdminApplicationDirectory = 4, /* System and network administration applications (Administration) */
CFLibraryDirectory = 5, /* various documentation, support, and configuration files, resources (Library) */
CFDeveloperDirectory = 6, /* developer resources (Developer) DEPRECATED - there is no one single Developer directory. */
CFUserDirectory = 7, /* User home directories (Users) */
CFDocumentationDirectory = 8, /* Documentation (Documentation) */
CFDocumentDirectory = 9, /* Documents (Documents) */
CFCoreServiceDirectory = 10, /* Location of CoreServices directory (System/Library/CoreServices) */
CFAutosavedInformationDirectory = 11, /* Location of autosaved documents (Documents/Autosaved) */
CFDesktopDirectory = 12, /* Location of user's desktop */
CFCachesDirectory = 13, /* Location of discardable cache files (Library/Caches) */
CFApplicationSupportDirectory = 14, /* Location of application support files (plug-ins, etc) (Library/Application Support) */
CFDownloadsDirectory = 15, /* Location of the user's "Downloads" directory */
CFInputMethodsDirectory = 16, /* Input methods (Library/Input Methods) */
CFMoviesDirectory = 17, /* Location of user's Movies directory (~/Movies) */
CFMusicDirectory = 18, /* Location of user's Music directory (~/Music) */
CFPicturesDirectory = 19, /* Location of user's Pictures directory (~/Pictures) */
CFPrinterDescriptionDirectory = 20, /* Location of system's PPDs directory (Library/Printers/PPDs) */
CFSharedPublicDirectory = 21, /* Location of user's Public sharing directory (~/Public) */
CFPreferencePanesDirectory = 22, /* Location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes) */
CFApplicationScriptsDirectory = 23, /* Location of the user scripts folder for the calling application (~/Library/Application Scripts/code-signing-id) */
CFItemReplacementDirectory = 99, /* For use with NSFileManager's URLForDirectory:inDomain:appropriateForURL:create:error: */
CFAllApplicationsDirectory = 100, /* all directories where applications can occur */
CFAllLibrariesDirectory = 101, /* all directories where resources can occur */
CFTrashDirectory = 102 /* location of Trash directory */
} CFSearchPathDirectory;
typedef enum
{
CFUserDomainMask = 1, // user's home directory --- place to install user's personal items (~)
CFLocalDomainMask = 2, // local to the current machine --- place to install items available to everyone on this machine (/Library)
CFNetworkDomainMask = 4, // publically available location in the local area network --- place to install items available on the network (/Network)
CFSystemDomainMask = 8, // provided by Apple, unmodifiable (/System)
CFAllDomainsMask = 0x0ffff // all domains: all of the above and future items
CFUserDomainMask = 1, /* user's home directory --- place to install user's personal items (~) */
CFLocalDomainMask = 2, /* local to the current machine --- place to install items available to everyone on this machine (/Library) */
CFNetworkDomainMask = 4, /* publically available location in the local area network --- place to install items available on the network (/Network) */
CFSystemDomainMask = 8, /* provided by Apple, unmodifiable (/System) */
CFAllDomainsMask = 0x0ffff /* All domains: all of the above and future items */
} CFDomainMask;
#ifndef __has_feature
@ -181,7 +181,7 @@ static void checkps(CFDictionaryRef dict, bool * have_ac, bool * have_battery,
int pct = -1;
if ((PMGMT_GETVAL(kIOPSIsPresentKey, &bval)) && (bval == kCFBooleanFalse))
return; /* nothing to see here. */
return;
if (!PMGMT_GETVAL(kIOPSPowerSourceStateKey, &strval))
return;