![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/BaseAdditions/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Functions</title> </head> <body> <font face="serif"> <a href="Base.html">Up</a> <br /> <h1><a name="title$Functions">Functions</a></h1> <h3>Authors</h3> <dl> <dt>Richard Frith-Macdonald</dt> <dd> </dd> </dl> <p><b>Copyright:</b> (C) 2005 Free Software Foundation, Inc.</p> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Function index</a> </li> <li> <a href="#002000000000">Macro index</a> </li> <li> <a href="#003000000000">GNUstep macros</a> </li> <li> <a href="#004000000000">GSBlocks macros</a> </li> <li> <a href="#005000000000">GSVersionMacros macros</a> </li> <li> <a href="#006000000000">GSObjCRuntime macros</a> </li> <li> <a href="#007000000000">NSDebug+GNUstepBase macros</a> </li> <li> <a href="#008000000000">NSLock+GNUstepBase macros</a> </li> <li> <a href="#009000000000">GSBlocks functions</a> </li> <li> <a href="#010000000000">GSVersionMacros functions</a> </li> <li> <a href="#011000000000">GSObjCRuntime functions</a> </li> <li> <a href="#012000000000">GSIArray functions</a> </li> <li> <a href="#013000000000">GSIMap functions</a> </li> <li> <a href="#014000000000">GSFunctions functions</a> </li> <li> <a href="#015000000000">GSLocale functions</a> </li> <li> <a href="#016000000000">NSDebug+GNUstepBase functions</a> </li> <li> <a href="#017000000000">NSThread+GNUstepBase functions</a> </li> <li> <a href="#018000000000">Unicode functions</a> </li> </ol> <hr width="50%" align="left" /> <h1><a name="001000000000">Function index</a></h1> <b>Function</b> <ul> <li><a rel="gsdoc" href="Functions.html#function$GSAutoreleasedBuffer">GSAutoreleasedBuffer</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSCGetInstanceVariableDefinition">GSCGetInstanceVariableDefinition</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSClassFromName">GSClassFromName</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSClassList">GSClassList</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSClassNameFromObject">GSClassNameFromObject</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSClassSwizzle">GSClassSwizzle</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSCurrentThread">GSCurrentThread</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSCurrentThreadDictionary">GSCurrentThreadDictionary</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSDebugFunctionMsg">GSDebugFunctionMsg</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSDebugMethodMsg">GSDebugMethodMsg</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSDebugSet">GSDebugSet</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSDefaultLanguageLocale">GSDefaultLanguageLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSDomainFromDefaultLocale">GSDomainFromDefaultLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSEncodingForRegistry">GSEncodingForRegistry</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSEncodingFromLocale">GSEncodingFromLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSFindNamedFile">GSFindNamedFile</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSFlushMethodCacheForClass">GSFlushMethodCacheForClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSFromUnicode">GSFromUnicode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSGetMethod">GSGetMethod</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayAddItem">GSIArrayAddItem</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayAddItemNoRetain">GSIArrayAddItemNoRetain</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayCapacity">GSIArrayCapacity</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayCheckSort">GSIArrayCheckSort</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayClear">GSIArrayClear</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayCopyWithZone">GSIArrayCopyWithZone</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayCount">GSIArrayCount</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayEmpty">GSIArrayEmpty</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayGrow">GSIArrayGrow</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayGrowTo">GSIArrayGrowTo</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInitWithZoneAndCapacity">GSIArrayInitWithZoneAndCapacity</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInitWithZoneAndStaticCapacity">GSIArrayInitWithZoneAndStaticCapacity</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInsertItem">GSIArrayInsertItem</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInsertItemNoRetain">GSIArrayInsertItemNoRetain</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInsertSorted">GSIArrayInsertSorted</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInsertSortedNoRetain">GSIArrayInsertSortedNoRetain</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayInsertionPosition">GSIArrayInsertionPosition</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayItemAtIndex">GSIArrayItemAtIndex</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayItems">GSIArrayItems</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayLastItem">GSIArrayLastItem</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayRemoveAllItems">GSIArrayRemoveAllItems</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayRemoveItemAtIndex">GSIArrayRemoveItemAtIndex</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayRemoveItemAtIndexNoRelease">GSIArrayRemoveItemAtIndexNoRelease</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayRemoveItemsFromIndex">GSIArrayRemoveItemsFromIndex</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArrayRemoveLastItem">GSIArrayRemoveLastItem</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArraySearch">GSIArraySearch</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIArraySetItemAtIndex">GSIArraySetItemAtIndex</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddKey">GSIMapAddKey</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddKeyNoRetain">GSIMapAddKeyNoRetain</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddNodeToBucket">GSIMapAddNodeToBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddNodeToMap">GSIMapAddNodeToMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddPair">GSIMapAddPair</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapAddPairNoRetain">GSIMapAddPairNoRetain</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapBucketForKey">GSIMapBucketForKey</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapCleanMap">GSIMapCleanMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapCountByEnumeratingWithStateObjectsCount">GSIMapCountByEnumeratingWithStateObjectsCount</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapEmptyMap">GSIMapEmptyMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapEndEnumerator">GSIMapEndEnumerator</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapEnumeratorBucket">GSIMapEnumeratorBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapEnumeratorForMap">GSIMapEnumeratorForMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapEnumeratorNextNode">GSIMapEnumeratorNextNode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapFirstNode">GSIMapFirstNode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapFreeNode">GSIMapFreeNode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapInitWithZoneAndCapacity">GSIMapInitWithZoneAndCapacity</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapLinkNodeIntoBucket">GSIMapLinkNodeIntoBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapMoreNodes">GSIMapMoreNodes</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapNodeForKey">GSIMapNodeForKey</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapNodeForKeyInBucket">GSIMapNodeForKeyInBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapNodeForSimpleKey">GSIMapNodeForSimpleKey</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapPickBucket">GSIMapPickBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemangleBuckets">GSIMapRemangleBuckets</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemoveAndFreeNode">GSIMapRemoveAndFreeNode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemoveKey">GSIMapRemoveKey</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemoveNodeFromBucket">GSIMapRemoveNodeFromBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemoveNodeFromMap">GSIMapRemoveNodeFromMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRemoveWeak">GSIMapRemoveWeak</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapResize">GSIMapResize</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapRightSizeMap">GSIMapRightSizeMap</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapSize">GSIMapSize</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSIMapUnlinkNodeFromBucket">GSIMapUnlinkNodeFromBucket</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSLanguageFromLocale">GSLanguageFromLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSLanguagesFromLocale">GSLanguagesFromLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSLastErrorStr">GSLastErrorStr</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSLocaleVariants">GSLocaleVariants</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSNameFromClass">GSNameFromClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSNameFromSelector">GSNameFromSelector</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCAddClassBehavior">GSObjCAddClassBehavior</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCAddClassOverride">GSObjCAddClassOverride</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCAddClasses">GSObjCAddClasses</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCAddMethods">GSObjCAddMethods</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCAllSubclassesOfClass">GSObjCAllSubclassesOfClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCBehaviorDebug">GSObjCBehaviorDebug</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCClass">GSObjCClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCDirectSubclassesOfClass">GSObjCDirectSubclassesOfClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCFindVariable">GSObjCFindVariable</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCGetInstanceVariableDefinition">GSObjCGetInstanceVariableDefinition</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCGetVal">GSObjCGetVal</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCGetVariable">GSObjCGetVariable</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCIsClass">GSObjCIsClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCIsInstance">GSObjCIsInstance</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCIsKindOf">GSObjCIsKindOf</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCMakeClass">GSObjCMakeClass</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCMethodNames">GSObjCMethodNames</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCSetVal">GSObjCSetVal</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCSetVariable">GSObjCSetVariable</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCSuper">GSObjCSuper</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCVariableNames">GSObjCVariableNames</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSObjCVersion">GSObjCVersion</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSPrintf">GSPrintf</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSProtocolFromName">GSProtocolFromName</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSProtocolGetMethodDescriptionRecursive">GSProtocolGetMethodDescriptionRecursive</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSRegisterProtocol">GSRegisterProtocol</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSelectorFromName">GSSelectorFromName</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSelectorFromNameAndTypes">GSSelectorFromNameAndTypes</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSelectorTypesMatch">GSSelectorTypesMatch</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSetLocale">GSSetLocale</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSetLocaleC">GSSetLocaleC</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSSkipTypeQualifierAndLayoutInfo">GSSkipTypeQualifierAndLayoutInfo</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSToUnicode">GSToUnicode</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSTypesFromSelector">GSTypesFromSelector</a></li> <li><a rel="gsdoc" href="Functions.html#function$GSUnicode">GSUnicode</a></li> <li><a rel="gsdoc" href="Functions.html#function$_Block_copy">_Block_copy</a></li> <li><a rel="gsdoc" href="Functions.html#function$_Block_release">_Block_release</a></li> <li><a rel="gsdoc" href="Functions.html#function$gs_consumed">gs_consumed</a></li> <li><a rel="gsdoc" href="Functions.html#function$uni_cop">uni_cop</a></li> <li><a rel="gsdoc" href="Functions.html#function$uni_is_decomp">uni_is_decomp</a></li> <li><a rel="gsdoc" href="Functions.html#function$uni_isnonsp">uni_isnonsp</a></li> <li><a rel="gsdoc" href="Functions.html#function$uni_tolower">uni_tolower</a></li> <li><a rel="gsdoc" href="Functions.html#function$uni_toupper">uni_toupper</a></li> </ul> <h1><a name="002000000000">Macro index</a></h1> <b>Macro</b> <ul> <li><a rel="gsdoc" href="Functions.html#macro$ASSIGN">ASSIGN</a></li> <li><a rel="gsdoc" href="Functions.html#macro$ASSIGNCOPY">ASSIGNCOPY</a></li> <li><a rel="gsdoc" href="Functions.html#macro$AUTORELEASE">AUTORELEASE</a></li> <li><a rel="gsdoc" href="Functions.html#macro$CALL_BLOCK">CALL_BLOCK</a></li> <li><a rel="gsdoc" href="Functions.html#macro$CALL_BLOCK_NO_ARGS">CALL_BLOCK_NO_ARGS</a></li> <li><a rel="gsdoc" href="Functions.html#macro$CHECK_INDEX_RANGE_ERROR">CHECK_INDEX_RANGE_ERROR</a></li> <li><a rel="gsdoc" href="Functions.html#macro$CREATE_AUTORELEASE_POOL">CREATE_AUTORELEASE_POOL</a></li> <li><a rel="gsdoc" href="Functions.html#macro$DEALLOC">DEALLOC</a></li> <li><a rel="gsdoc" href="Functions.html#macro$DESTROY">DESTROY</a></li> <li><a rel="gsdoc" href="Functions.html#macro$ENTER_POOL">ENTER_POOL</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GSLocalizedStaticString">GSLocalizedStaticString</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GSOnceFLog">GSOnceFLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GSOnceMLog">GSOnceMLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_LATEST">GS_API_LATEST</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_MACOSX">GS_API_MACOSX</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_NONE">GS_API_NONE</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_OPENSTEP">GS_API_OPENSTEP</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_OSSPEC">GS_API_OSSPEC</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_API_VERSION">GS_API_VERSION</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_INITIALIZED_LOCK">GS_INITIALIZED_LOCK</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_MAX_OBJECTS_FROM_STACK">GS_MAX_OBJECTS_FROM_STACK</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_RANGE_CHECK">GS_RANGE_CHECK</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_USEIDLIST">GS_USEIDLIST</a></li> <li><a rel="gsdoc" href="Functions.html#macro$GS_USEIDPAIRLIST">GS_USEIDPAIRLIST</a></li> <li><a rel="gsdoc" href="Functions.html#macro$LEAVE_POOL">LEAVE_POOL</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugFLLog">NSDebugFLLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugFLog">NSDebugFLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugFRLog">NSDebugFRLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugLLog">NSDebugLLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugLog">NSDebugLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugMLLog">NSDebugMLLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugMLog">NSDebugMLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSDebugMRLog">NSDebugMRLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSWarnFLog">NSWarnFLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSWarnLog">NSWarnLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$NSWarnMLog">NSWarnMLog</a></li> <li><a rel="gsdoc" href="Functions.html#macro$OS_API_VERSION">OS_API_VERSION</a></li> <li><a rel="gsdoc" href="Functions.html#macro$RECREATE_AUTORELEASE_POOL">RECREATE_AUTORELEASE_POOL</a></li> <li><a rel="gsdoc" href="Functions.html#macro$RELEASE">RELEASE</a></li> <li><a rel="gsdoc" href="Functions.html#macro$RETAIN">RETAIN</a></li> <li><a rel="gsdoc" href="Functions.html#macro$TEST_AUTORELEASE">TEST_AUTORELEASE</a></li> <li><a rel="gsdoc" href="Functions.html#macro$TEST_RELEASE">TEST_RELEASE</a></li> <li><a rel="gsdoc" href="Functions.html#macro$TEST_RETAIN">TEST_RETAIN</a></li> <li><a rel="gsdoc" href="Functions.html#macro$_">_</a></li> <li><a rel="gsdoc" href="Functions.html#macro$__">__</a></li> </ul> </div> <h1><a name="003000000000">GNUstep macros</a></h1> <p> </p> <h3><a name="macro$ASSIGN">ASSIGN</a></h3> ASSIGN(<b>object</b>, <b>value</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> ASSIGN(<var>object</var>,value) assigns the <var>value</var> to the <var>object</var> with appropriate retain and release operations. <br /> Use this to avoid retain/release errors. </div> <hr width="25%" align="left" /> <h3><a name="macro$ASSIGNCOPY">ASSIGNCOPY</a></h3> ASSIGNCOPY(<b>object</b>, <b>value</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> ASSIGNCOPY(<var>object</var>,value) assigns a copy of the <var>value</var> to the <var>object</var> with release of the original. <br /> Use this to avoid retain/release errors. </div> <hr width="25%" align="left" /> <h3><a name="macro$AUTORELEASE">AUTORELEASE</a></h3> AUTORELEASE(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Basic autorelease operation... calls [NSObject -autorelease] <br /> Deprecated... pointless on modern processors. Simply call the -autorelease method. </div> <hr width="25%" align="left" /> <h3><a name="macro$CHECK_INDEX_RANGE_ERROR">CHECK_INDEX_RANGE_ERROR</a></h3> CHECK_INDEX_RANGE_ERROR(<b>INDEX</b>, <b>OVER</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Checks whether <var>INDEX</var> is strictly less than <var>OVER</var> (within C array space). <var>INDEX</var> and <var>OVER</var> must be <strong>unsigned</strong> integers (NSUInteger). </div> <hr width="25%" align="left" /> <h3><a name="macro$CREATE_AUTORELEASE_POOL">CREATE_AUTORELEASE_POOL</a></h3> CREATE_AUTORELEASE_POOL(<b>X</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> DEPRECATED... use ENTER_POOL and LEAVE_POOL </div> <hr width="25%" align="left" /> <h3><a name="macro$DEALLOC">DEALLOC</a></h3> DEALLOC<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> DEALLOC calls the superclass implementation of dealloc, unless ARC is in use (in which case it does nothing). </div> <hr width="25%" align="left" /> <h3><a name="macro$DESTROY">DESTROY</a></h3> DESTROY(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#macro$DESTROY"> DESTROY() </a> is a release operation which also sets the variable to be a <code>nil</code> pointer for tidiness - we can't accidentally use a DESTROYED <var>object</var> later. It also makes sure to set the variable to <code>nil</code> before releasing the <var>object</var> - to avoid side-effects of the release trying to reference the <var>object</var> being released through the variable. </div> <hr width="25%" align="left" /> <h3><a name="macro$ENTER_POOL">ENTER_POOL</a></h3> ENTER_POOL<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> ENTER_POOL creates an autorelease pool and places subsequent code in a do/while loop (executed only once) which can be broken out of to reach the point when the pool is drained. <br /> The block must be terminated with a corresponding LEAVE_POOL. <br /> You should not return from such a block of code (to do so could leak an autorelease pool and give objects a longer lifetime than they ought to have. If you wish to leave the block of code early, you may do so using a 'break' statement. </div> <hr width="25%" align="left" /> <h3><a name="macro$GSLocalizedStaticString">GSLocalizedStaticString</a></h3> GSLocalizedStaticString(<b>key</b>, <b>comment</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This function (macro) is a GNUstep extensions, and it is used to localize static strings. Here is an example of a static string: </p> <p> </p> <p> <code> NSString *message = @"Hi there";... some code... NSLog (message); </code> </p> <p> </p> <p> This string can not be localized using the standard openstep functions/macros. By using this gnustep extension, you can localize it as follows: </p> <p> </p> <p> <code> NSString *message = GSLocalizedStaticString (@"Hi there", @"Greeting");... some code... NSLog (NSLocalizedString (message, @"")); </code> </p> <p> </p> <p> When the tools generate the <code>Localizable.strings</code> file from the source code, they will ignore the <code>NSLocalizedString</code> call while they will extract the string (and the <var>comment</var>) to localize from the <code>GSLocalizedStaticString</code> call. </p> <p> </p> <p> When the code is compiled, instead, the <code>GSLocalizedStaticString</code> call is ignored (discarded, it is a macro which simply expands to <code><var>key</var></code>), while the <code>NSLocalizedString</code> will actually look up the string for translation in the <code>Localizable.strings</code> file. </p> <p> </p> <p> Please note that there is currently no macro/function to localize static strings using different tables. If you need that functionality, you have either to prepare the localization tables by hand, or to rewrite your code in such a way as not to use static strings. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_RANGE_CHECK">GS_RANGE_CHECK</a></h3> GS_RANGE_CHECK(<b>RANGE</b>, <b>SIZE</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> To be used inside a method for making sure that a range does not specify anything outside the size of an array/string. Raises exception if range extends beyond [0,size]. Size must be an <strong>unsigned</strong> integer (NSUInteger). </div> <hr width="25%" align="left" /> <h3><a name="macro$LEAVE_POOL">LEAVE_POOL</a></h3> LEAVE_POOL<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> LEAVE_POOL terminates a block of code started with ENTER_POOL. </div> <hr width="25%" align="left" /> <h3><a name="macro$RECREATE_AUTORELEASE_POOL">RECREATE_AUTORELEASE_POOL</a></h3> RECREATE_AUTORELEASE_POOL(<b>X</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> DEPRECATED... use ENTER_POOL and LEAVE_POOL </div> <hr width="25%" align="left" /> <h3><a name="macro$RELEASE">RELEASE</a></h3> RELEASE(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Basic release operation... calls [NSObject -release] <br /> Deprecated... pointless on modern processors. Simply call the -release method. </div> <hr width="25%" align="left" /> <h3><a name="macro$RETAIN">RETAIN</a></h3> RETAIN(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Basic retain operation... calls [NSObject -retain] <br /> Deprecated... pointless on modern processors. Simply call the -retain method. </div> <hr width="25%" align="left" /> <h3><a name="macro$TEST_AUTORELEASE">TEST_AUTORELEASE</a></h3> TEST_AUTORELEASE(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Tested autorelease - only invoke the objective-c method if the receiver is not <code>nil</code>. <br /> Deprecated... pointless on modern processors. Simply call the -autorelease method. </div> <hr width="25%" align="left" /> <h3><a name="macro$TEST_RELEASE">TEST_RELEASE</a></h3> TEST_RELEASE(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Tested release - only invoke the objective-c method if the receiver is not <code>nil</code>. <br /> Deprecated ... pointless on modern processors. Simply call the -release method. </div> <hr width="25%" align="left" /> <h3><a name="macro$TEST_RETAIN">TEST_RETAIN</a></h3> TEST_RETAIN(<b>object</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Tested retain - only invoke the objective-c method if the receiver is not <code>nil</code>. <br /> Deprecated ... pointless on modern processors. Simply call the -retain method. </div> <hr width="25%" align="left" /> <h3><a name="macro$_">_</a></h3> _(<b>X</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This function (macro) is a GNUstep extension. </p> <p> </p> <p> <code>_(@"My string to translate")</code> </p> <p> </p> <p> is basically equivalent to </p> <p> </p> <p> <code> NSLocalizedString(@"My string to translate", @"") </code> </p> <p> </p> <p> It is useful when you need to translate an application very quickly, as you just need to enclose all strings inside <code><a rel="gsdoc" href="#macro$_">_()</a> </code>. But please note that when you use this macro, you are not taking advantage of comments for the translator, so consider using <code>NSLocalizedString</code> instead when you need a comment. </p> <p> </p> <p> You may define GS_LOCALISATION_BUNDLE_ID to the bundle identifier of the bundle which is to provide the localisation information. <br /> This can be used when compiling a single file by specifying something like '-D GS_LOCALISATION_BUNDLE_ID=$(FRAMEWORK_NAME)' in your make file. <br /> If this is not defined, the localisation is provided by your application's main bundle exactly like the NSLocalizedString function. </p> <p> </p> <p> Alternatively you may define GS_LOCALISATION_BUNDLE to be the bundle to be used to prvide the localisation information. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$__">__</a></h3> __(<b>X</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This function (macro) is a GNUstep extension. </p> <p> </p> <p> <code>__(@"My string to translate")</code> </p> <p> </p> <p> is exactly the same as </p> <p> </p> <p> <code> GSLocalizedStaticString(@"My string to translate", @"") </code> </p> <p> </p> <p> It is useful when you need to translate an application very quickly. You would use it as follows for static strings: </p> <p> </p> <p> <code> NSString *message = __(@"Hello there");... more code... NSLog (_(messages)); </code> </p> <p> </p> <p> But please note that when you use this macro, you are not taking advantage of comments for the translator, so consider using <code>GSLocalizedStaticString</code> instead when you need a comment. </p> <p> </div> <hr width="25%" align="left" /> <h1><a name="004000000000">GSBlocks macros</a></h1> <p> </p> <h3><a name="macro$CALL_BLOCK">CALL_BLOCK</a></h3> CALL_BLOCK(<b>block</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Calls a <var>block</var>. Works irrespective of whether the compiler supports blocks. </div> <hr width="25%" align="left" /> <h3><a name="macro$CALL_BLOCK_NO_ARGS">CALL_BLOCK_NO_ARGS</a></h3> CALL_BLOCK_NO_ARGS(<b>block</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Calls a <var>block</var> without arguments. </div> <hr width="25%" align="left" /> <h1><a name="005000000000">GSVersionMacros macros</a></h1> <p> </p> <h3><a name="macro$GS_API_LATEST">GS_API_LATEST</a></h3> GS_API_LATEST<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> A constant to represent a feature which is still present in the latest version. This is the highest possible version number. <br /> eg. <br /> #if <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> (GS_API_MACOSX, GS_API_LATEST) <br /> denotes code present from the initial MacOS-X version onwards. </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_API_MACOSX">GS_API_MACOSX</a></h3> GS_API_MACOSX<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> The version number of the first MacOS-X implementation. <br /> eg. <br /> #if <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> (GS_API_MACOSX, GS_API_LATEST) <br /> denotes code present from the initial MacOS-X version onwards. </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_API_NONE">GS_API_NONE</a></h3> GS_API_NONE<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> A constant which is the lowest possible version number (0) so that when used as the removal version (second argument of the GS_API_VERSION or OS_API_VERSION macro) represents a feature which is not present in any version. <br /> eg. <br /> #if <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> (GS_API_NONE, GS_API_NONE) <br /> denotes code not present in OpenStep/OPENSTEP/MacOS-X </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_API_OPENSTEP">GS_API_OPENSTEP</a></h3> GS_API_OPENSTEP<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> The version number of the first OPENSTEP implementation. <br /> eg. <br /> #if <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> (GS_API_OPENSTEP, GS_API_LATEST) <br /> denotes code present from the initial OPENSTEP version onwards. </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_API_OSSPEC">GS_API_OSSPEC</a></h3> GS_API_OSSPEC<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> The version number of the initial OpenStep specification. <br /> eg. <br /> #if <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> (GS_API_OSSPEC, GS_API_LATEST) <br /> denotes code present from the OpenStep specification onwards. </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_API_VERSION">GS_API_VERSION</a></h3> GS_API_VERSION(<b>ADD</b>, <b>REM</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Macro to check a defined GNUstep version number (GS_GNUSTEP_V) against the supplied arguments. Returns true if no GNUstep version is specified, or if <var>ADD</var> <= version < <var>REM</var>, where <var>ADD</var> is the version number at which a feature guarded by the macro was introduced and <var>REM</var> is the version number at which it was removed. </p> <p> </p> <p> The version number arguments are six digit integers where the first two digits are the major version number, the second two are the minor version number and the last two are the subminor number (all left padded with a zero where necessary). However, for convenience you can also use the predefined constants... <a rel="gsdoc" href="#macro$GS_API_NONE"> GS_API_NONE </a> , <a rel="gsdoc" href="#macro$GS_API_LATEST"> GS_API_LATEST </a> , </p> <p> </p> <p> Also see <a rel="gsdoc" href="#macro$OS_API_VERSION"> OS_API_VERSION </a> </p> <p> </p> <p> NB. If you are changing the API (eg adding a new feature) you need to control the visibility io the new header file code using <br /> <code> #if GS_API_VERSION(<var>ADD</var>,GS_API_LATEST) </code> <br /> where <code><var>ADD</var></code> is the version number of the next minor release after the most recent one. <br /> As a general principle you should <em>not</em> change the API with changing subminor version numbers... as that tends to confuse people (though Apple has sometimes done it). </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$OS_API_VERSION">OS_API_VERSION</a></h3> OS_API_VERSION(<b>ADD</b>, <b>REM</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Macro to check a defined OpenStep/OPENSTEP/MacOS-X version against the supplied arguments. Returns true if no version is specified, or if <var>ADD</var> <= version < <var>REM</var>, where <var>ADD</var> is the version number at which a feature guarded by the macro was introduced and <var>REM</var> is the version number at which it was removed. </p> <p> </p> <p> The version number arguments are six digit integers where the first two digits are the major version number, the second two are the minor version number and the last two are the subminor number (all left padded with a zero where necessary). However, for convenience you can also use any of several predefined constants... <a rel="gsdoc" href="#macro$GS_API_NONE"> GS_API_NONE </a> , <a rel="gsdoc" href="#macro$GS_API_LATEST"> GS_API_LATEST </a> , <a rel="gsdoc" href="#macro$GS_API_OSSPEC"> GS_API_OSSPEC </a> , <a rel="gsdoc" href="#macro$GS_API_OPENSTEP"> GS_API_OPENSTEP </a> , <a rel="gsdoc" href="#macro$GS_API_MACOSX"> GS_API_MACOSX </a> </p> <p> </p> <p> Also see <a rel="gsdoc" href="#macro$GS_API_VERSION"> GS_API_VERSION </a> </p> <p> </p> <p> For OSX compatibility, this macro also supports the use of Apple's symbolic constants for version numbering. Their contants are currently four digit values (two digits for the major version, one for the minor, and one for the subminor). </p> <p> </p> <p> The Apple compatibility version macros are currently: MAC_OS_X_VERSION_10_0 , MAC_OS_X_VERSION_10_1 , MAC_OS_X_VERSION_10_2 , MAC_OS_X_VERSION_10_3 , MAC_OS_X_VERSION_10_4 , MAC_OS_X_VERSION_10_5 , MAC_OS_X_VERSION_10_6 , MAC_OS_X_VERSION_10_7 , MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_9 </p> <p> </div> <hr width="25%" align="left" /> <h1><a name="006000000000">GSObjCRuntime macros</a></h1> <p> </p> <h3><a name="macro$GS_MAX_OBJECTS_FROM_STACK">GS_MAX_OBJECTS_FROM_STACK</a></h3> GS_MAX_OBJECTS_FROM_STACK<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> The number of objects to try to get from varargs into an array on the stack... if there are more than this, use the heap. NB. This MUST be a multiple of 2 </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_USEIDLIST">GS_USEIDLIST</a></h3> GS_USEIDLIST(<b>firstObject</b>, <b>code</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This is a macro designed to minimise the use of memory allocation and deallocation when you need to work with a vararg list of objects. <br /> The objects are unpacked from the vararg list into a 'C' array and then a <var>code</var> fragment you specify is able to make use of them before that 'C' array is destroyed. </p> <p> </p> <p> The <var>firstObject</var> argument is the name of the formal parameter in your method or function which precedes the ',...' denoting variable args. </p> <p> </p> <p> The <var>code</var> argument is a piece of objective-c <var>code</var> to be executed to make use of the objects stored in the 'C' array. <br /> When this <var>code</var> is called the <strong>unsigned</strong> integer '__count' will contain the number of objects unpacked, and the pointer '__objects' will point to the unpacked objects, ie. <var>firstObject</var> followed by the vararg arguments up to (but not including) the first <code>nil</code>. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$GS_USEIDPAIRLIST">GS_USEIDPAIRLIST</a></h3> GS_USEIDPAIRLIST(<b>firstObject</b>, <b>code</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> This is a macro designed to minimise the use of memory allocation and deallocation when you need to work with a vararg list of objects. <br /> The objects are unpacked from the vararg list into two 'C' arrays and then a <var>code</var> fragment you specify is able to make use of them before that 'C' array is destroyed. </p> <p> </p> <p> The <var>firstObject</var> argument is the name of the formal parameter in your method or function which precedes the ',...' denoting variable args. </p> <p> </p> <p> The <var>code</var> argument is a piece of objective-c <var>code</var> to be executed to make use of the objects stored in the 'C' arrays. <br /> When this <var>code</var> is called the <strong>unsigned</strong> integer '__count' will contain the number of objects unpacked, the pointer '__objects' will point to the first object in each pair, and the pointer '__pairs' will point to an array containing the second halves of the pairs of objects whose first halves are in '__objects'. <br /> This lets you pack a list of the form 'key, value, key, value,...' into an array of keys and an array of values. </p> <p> </div> <hr width="25%" align="left" /> <h1><a name="007000000000">NSDebug+GNUstepBase macros</a></h1> <p> </p> <h3><a name="macro$GSOnceFLog">GSOnceFLog</a></h3> GSOnceFLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Macro to log a message only the first time it is encountered. <br /> Not entirely thread safe... but that's not really important, it just means that it's possible for the message to be logged more than once if two threads call it simultaneously when it has not already been called. <br /> Use this from inside a function. Pass an NSString as a <var>format</var>, followed by zero or more arguments for the <var>format</var> string. Example: GSOnceFLog(@"This function is deprecated, use another"); </div> <hr width="25%" align="left" /> <h3><a name="macro$GSOnceMLog">GSOnceMLog</a></h3> GSOnceMLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Macro to log a message only the first time it is encountered. <br /> Not entirely thread safe... but that's not really important, it just means that it's possible for the message to be logged more than once if two threads call it simultaneously when it has not already been called. <br /> Use this from inside a method. Pass an NSString as a <var>format</var> followed by zero or more arguments for the <var>format</var> string. <br /> Example: GSOnceMLog(@"This method is deprecated, use another"); </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugFLLog">NSDebugFLLog</a></h3> NSDebugFLLog(<b>level</b>, <b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is like <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> but includes the name and location of the function in which the macro is used as part of the log output. </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugFLog">NSDebugFLog</a></h3> NSDebugFLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is a shorthand for <a rel="gsdoc" href="#macro$NSDebugFLLog"> NSDebugFLLog() </a> using then default debug level... 'dflt' </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugFRLog">NSDebugFRLog</a></h3> NSDebugFRLog(<b>object</b>, <b>msg</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro saves the name and location of the function in which the macro is used, along with a <strong>short</strong> string <var>msg</var> as the tag associated with a recorded <var>object</var>. </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugLLog">NSDebugLLog</a></h3> NSDebugLLog(<b>level</b>, <b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> </p> <p> <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> is the basic debug logging macro used to display log messages using NSLog() , if debug logging was enabled at compile time and the appropriate logging <var>level</var> was set at runtime. </p> <p> </p> <p> Debug logging which can be enabled/disabled by defining GSDIAGNOSE when compiling and also setting values in the mutable set which is set up by NSProcessInfo. GSDIAGNOSE is defined automatically unless diagnose=no is specified in the make arguments. </p> <p> </p> <p> NSProcess initialises a set of strings that are the names of active debug levels using the '--GNU-Debug=...' command line argument. Each command-line argument of that form is removed from <code>NSProcessInfo</code> 's list of arguments and the variable part (...) is added to the set. This means that as far as the program proper is concerned, it is running with the same arguments as if debugging had not been enabled. </p> <p> </p> <p> For instance, to debug the NSBundle class, run your program with '--GNU-Debug=NSBundle' You can of course supply multiple '--GNU-Debug=...' arguments to output debug information on more than one thing. </p> <p> </p> <p> NSUserDefaults also adds debug levels from the array given by the GNU-Debug key... but these values will not take effect until the +standardUserDefaults method is called... so they are useless for debugging NSUserDefaults itself or for debugging any code executed before the defaults system is used. </p> <p> </p> <p> To embed debug logging in your code you use the <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> or <a rel="gsdoc" href="#macro$NSDebugLog"> NSDebugLog() </a> macro. <a rel="gsdoc" href="#macro$NSDebugLog"> NSDebugLog() </a> is just <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> with the debug <var>level</var> set to 'dflt'. So, to activate debug statements that use <a rel="gsdoc" href="#macro$NSDebugLog"> NSDebugLog() </a> , you supply the '--GNU-Debug=dflt' argument to your program. </p> <p> </p> <p> You can also change the active debug levels under your programs control - NSProcessInfo has a <a rel="gsdoc" href="NSProcessInfo+GNUstepBase.html#method$NSProcessInfo(GNUstepBase)-debugSet"> [-debugSet] </a> method that returns the mutable set that contains the active debug levels - your program can modify this set. </p> <p> </p> <p> Two debug levels have a special effect - 'dflt' is the <var>level</var> used for debug logs statements where no debug <var>level</var> is specified, and 'NoWarn' is used to *disable* warning messages. </p> <p> </p> <p> As a convenience, there are four more logging macros you can use - <a rel="gsdoc" href="#macro$NSDebugFLog"> NSDebugFLog() </a> , <a rel="gsdoc" href="#macro$NSDebugFLLog"> NSDebugFLLog() </a> , <a rel="gsdoc" href="#macro$NSDebugMLog"> NSDebugMLog() </a> and <a rel="gsdoc" href="#macro$NSDebugMLLog"> NSDebugMLLog() </a> . These are the same as the other macros, but are specifically for use in either functions or methods and prepend information about the file, line and either function or class/method in which the message was generated. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugLog">NSDebugLog</a></h3> NSDebugLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is a shorthand for <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> using then default debug level... 'dflt' </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugMLLog">NSDebugMLLog</a></h3> NSDebugMLLog(<b>level</b>, <b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is like <a rel="gsdoc" href="#macro$NSDebugLLog"> NSDebugLLog() </a> but includes the name and location of the <em>method</em> in which the macro is used as part of the log output. </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugMLog">NSDebugMLog</a></h3> NSDebugMLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is a shorthand for <a rel="gsdoc" href="#macro$NSDebugMLLog"> NSDebugMLLog() </a> using then default debug level... 'dflt' </div> <hr width="25%" align="left" /> <h3><a name="macro$NSDebugMRLog">NSDebugMRLog</a></h3> NSDebugMRLog(<b>object</b>, <b>msg</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro saves the name and location of the method in which the macro is used, along with a <strong>short</strong> string <var>msg</var> as the tag associated with a recorded <var>object</var>. </div> <hr width="25%" align="left" /> <h3><a name="macro$NSWarnFLog">NSWarnFLog</a></h3> NSWarnFLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is like <a rel="gsdoc" href="#macro$NSWarnLog"> NSWarnLog() </a> but includes the name and location of the <em>function</em> in which the macro is used as part of the log output. </div> <hr width="25%" align="left" /> <h3><a name="macro$NSWarnLog">NSWarnLog</a></h3> NSWarnLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> </p> <p> <a rel="gsdoc" href="#macro$NSWarnLog"> NSWarnLog() </a> is the basic debug logging macro used to display warning messages using NSLog() , if warn logging was not disabled at compile time and the disabling logging level was not set at runtime. </p> <p> </p> <p> Warning messages which can be enabled/disabled by defining GSWARN when compiling. </p> <p> </p> <p> You can also disable these messages at runtime by supplying a '--GNU-Debug=NoWarn' argument to the program, or by adding 'NoWarn' to the user default array named 'GNU-Debug'. </p> <p> </p> <p> These logging macros are intended to be used when the software detects something that it not necessarily fatal or illegal, but looks like it might be a programming error. eg. attempting to remove 'nil' from an NSArray, which the Spec/documentation does not prohibit, but which a well written program should not be attempting (since an NSArray object cannot contain a 'nil'). </p> <p> </p> <p> NB. The 'warn=yes' option is understood by the GNUstep make package to mean that GSWARN should be defined, and the 'warn=no' means that GSWARN should be undefined. Default is to define it. </p> <p> </p> <p> To embed debug logging in your code you use the <a rel="gsdoc" href="#macro$NSWarnLog"> NSWarnLog() </a> macro. </p> <p> </p> <p> As a convenience, there are two more logging macros you can use - <a rel="gsdoc" href="#macro$NSWarnFLog"> NSWarnFLog() </a> , and <a rel="gsdoc" href="#macro$NSWarnMLog"> NSWarnMLog() </a> . These are specifically for use in either functions or methods and prepend information about the file, line and either function or class/method in which the message was generated. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="macro$NSWarnMLog">NSWarnMLog</a></h3> NSWarnMLog(<b>format</b>, <b>args</b><b>,...</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> This macro is like <a rel="gsdoc" href="#macro$NSWarnLog"> NSWarnLog() </a> but includes the name and location of the <em>method</em> in which the macro is used as part of the log output. </div> <hr width="25%" align="left" /> <h1><a name="008000000000">NSLock+GNUstepBase macros</a></h1> <p> </p> <h3><a name="macro$GS_INITIALIZED_LOCK">GS_INITIALIZED_LOCK</a></h3> GS_INITIALIZED_LOCK(<b>IDENT</b>, <b>CLASSNAME</b>)<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Returns <var>IDENT</var> which will be initialized to an instance of a <var>CLASSNAME</var> in a thread safe manner. If <var>IDENT</var> has been previously initialized this macro merely returns <var>IDENT</var>. <var>IDENT</var> is considered uninitialized, if it contains <code>nil</code> . <var>CLASSNAME</var> must be either NSLock, NSRecursiveLock or one of their subclasses. See [NSLock +newLockAt:] for details. This macro is intended for code that cannot insure that a lock can be initialized in thread safe manner otherwise. <pre> NSLock *my_lock = nil; void function (void) { [GS_INITIALIZED_LOCK(my_lock, NSLock) lock]; do_work (); [my_lock unlock]; } </pre> </div> <hr width="25%" align="left" /> <h1><a name="009000000000">GSBlocks functions</a></h1> <p> </p> <h3><a name="function$_Block_copy">_Block_copy</a></h3> void* _Block_copy(const void* <b></b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$_Block_release">_Block_release</a></h3> void _Block_release(const void* <b></b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="010000000000">GSVersionMacros functions</a></h1> <p> </p> <h3><a name="function$gs_consumed">gs_consumed</a></h3> void gs_consumed(id <b>o</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="011000000000">GSObjCRuntime functions</a></h1> <p> </p> <h3><a name="function$GSAutoreleasedBuffer">GSAutoreleasedBuffer</a></h3> void* GSAutoreleasedBuffer(unsigned int <b>size</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Quickly return autoreleased data storage area. </div> <hr width="25%" align="left" /> <h3><a name="function$GSCGetInstanceVariableDefinition">GSCGetInstanceVariableDefinition</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIVar">GSIVar</a> GSCGetInstanceVariableDefinition(Class <b>cls</b>, const char* <b>name</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Deprecated.. use class_getInstanceVariable() </div> <hr width="25%" align="left" /> <h3><a name="function$GSClassFromName">GSClassFromName</a></h3> Class GSClassFromName(const char* <b>name</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSClassFromName"> GSClassFromName() </a> is deprecated... use objc_lookUpClass() </div> <hr width="25%" align="left" /> <h3><a name="function$GSClassList">GSClassList</a></h3> unsigned int GSClassList(Class* <b>buffer</b>, unsigned int <b>max</b>, BOOL <b>clearCache</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Deprecated... use objc_getClassList() </div> <hr width="25%" align="left" /> <h3><a name="function$GSClassNameFromObject">GSClassNameFromObject</a></h3> const char* GSClassNameFromObject(id <b>obj</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSClassNameFromObject"> GSClassNameFromObject() </a> is deprecated... use object_getClass() in conjunction with class_getName() </div> <hr width="25%" align="left" /> <h3><a name="function$GSClassSwizzle">GSClassSwizzle</a></h3> void GSClassSwizzle(id <b>instance</b>, Class <b>newClass</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Function to change the class of the specified <var>instance</var> to <var>newClass</var>. This handles memory debugging issues in GNUstep-base and also deals with class finalisation issues in a garbage collecting environment, so you should use this function rather than attempting to swizzle class pointers directly. </div> <hr width="25%" align="left" /> <h3><a name="function$GSFlushMethodCacheForClass">GSFlushMethodCacheForClass</a></h3> void GSFlushMethodCacheForClass(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Deprecated.. does nothing. </div> <hr width="25%" align="left" /> <h3><a name="function$GSGetMethod">GSGetMethod</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSMethod">GSMethod</a> GSGetMethod(Class <b>cls</b>, SEL <b>sel</b>, BOOL <b>searchInstanceMethods</b>, BOOL <b>searchSuperClasses</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns the pointer to the method structure for the selector in the specified class. Depending on <var>searchInstanceMethods</var>, this function searches either instance or class methods. Depending on searchSuperClassesm this function searches either the specified class only or also its superclasses. <br /> To obtain the implementation pointer IMP use returnValue->method_imp which should be safe across all runtimes. <br /> It should be safe to use this function in +load implementations. <br /> This function should currently (June 2004) be considered WIP. Please follow potential changes (Name, parameters,...) closely until it stabilizes. </div> <hr width="25%" align="left" /> <h3><a name="function$GSLastErrorStr">GSLastErrorStr</a></h3> const char* GSLastErrorStr(long int <b>error_id</b>);<br /> <div class="availability"> <b>Availability:</b> BaseAdditions<br /> Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSNameFromClass">GSNameFromClass</a></h3> const char* GSNameFromClass(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSNameFromClass"> GSNameFromClass() </a> is deprecated... use class_getName() </div> <hr width="25%" align="left" /> <h3><a name="function$GSNameFromSelector">GSNameFromSelector</a></h3> const char* GSNameFromSelector(SEL <b>sel</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSNameFromSelector"> GSNameFromSelector() </a> is deprecated... use sel_getName() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCAddClassBehavior">GSObjCAddClassBehavior</a></h3> void GSObjCAddClassBehavior(Class <b>receiver</b>, Class <b>behavior</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> A Behavior can be seen as a "Protocol with an implementation" or a "Class without any instance variables". A key feature of behaviors is that they give a degree of multiple inheritance. </p> <p> </p> <p> Behavior methods, when added to a class, override the class's superclass methods, but not the class's methods. </p> <p> </p> <p> Whan a <var>behavior</var> class is added to a <var>receiver</var> class, not only are the methods defined in the <var>behavior</var> class added, but the methods from the behavior's class hierarchy are also added (unless already present). </p> <p> </p> <p> It's not the case that a class adding behaviors from another class must have "no instance vars". The <var>receiver</var> class just has to have the same layout as the <var>behavior</var> class (optionally with some additional ivars after those of the <var>behavior</var> class). </p> <p> </p> <p> This function provides Behaviors without adding any new syntax to the Objective C language. Simply define a class with the methods you want to add, then call this function with that class as the <var>behavior</var> argument. </p> <p> </p> <p> This function should be called in the +initialize method of the <var>receiver</var>. </p> <p> </p> <p> If you add several behaviors to a class, be aware that the order of the additions is significant. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCAddClassOverride">GSObjCAddClassOverride</a></h3> void GSObjCAddClassOverride(Class <b>receiver</b>, Class <b>override</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> An Override can be seen as a "category implemented as a separate class and manually added to the <var>receiver</var> class under program control, rather than automatically added by the compiler/runtime. </p> <p> </p> <p> Override methods, when added to a <var>receiver</var> class, replace the class's class's methods of the same name (or are added if the class did not define methods with that name). </p> <p> </p> <p> It's not the case that a class adding overrides from another class must have "no instance vars". The <var>receiver</var> class just has to have the same layout as the <var>override</var> class (optionally with some additional ivars after those of the <var>override</var> class). </p> <p> </p> <p> This function provides overrides without adding any new syntax to the Objective C language. Simply define a class with the methods you want to add, then call this function with that class as the <var>override</var> argument. </p> <p> </p> <p> This function should usually be called in the +initialize method of the <var>receiver</var>. </p> <p> </p> <p> If you add several overrides to a class, be aware that the order of the additions is significant. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCAddClasses">GSObjCAddClasses</a></h3> void GSObjCAddClasses(NSArray* <b>classes</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> The <var>classes</var> argument is an array of NSValue objects containing pointers to <var>classes</var> previously created by the <a rel="gsdoc" href="#function$GSObjCMakeClass"> GSObjCMakeClass() </a> function. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCAddMethods">GSObjCAddMethods</a></h3> void GSObjCAddMethods(Class <b>cls</b>, Method* <b>list</b>, BOOL <b>replace</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Given a NULL terminated <var>list</var> of methods, add them to the class. <br /> If the method already exists in a superclass, the new version overrides that one, but if the method already exists in the class itsself, the new one is quietly ignored (replace==NO) or replaced with the new version (if replace==YES). <br /> To add class methods, <var>cls</var> should be the metaclass of the class to which the methods are being added. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCAllSubclassesOfClass">GSObjCAllSubclassesOfClass</a></h3> NSArray* GSObjCAllSubclassesOfClass(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns an autoreleased array of subclasses of <strong>Class</strong> <var>cls</var>, including subclasses of subclasses. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCBehaviorDebug">GSObjCBehaviorDebug</a></h3> BOOL GSObjCBehaviorDebug(int <b>setget</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Turn on (<code>YES</code>), off (<code>NO</code>) or test (-1) behavior debugging. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCClass">GSObjCClass</a></h3> Class GSObjCClass(id <b>obj</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSObjCClass"> GSObjCClass() </a> is deprecated... use object_getClass() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCDirectSubclassesOfClass">GSObjCDirectSubclassesOfClass</a></h3> NSArray* GSObjCDirectSubclassesOfClass(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns an autoreleased array containing subclasses directly descendent of <strong>Class</strong> <var>cls</var>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCFindVariable">GSObjCFindVariable</a></h3> BOOL GSObjCFindVariable(id <b>obj</b>, const char* <b>name</b>, const char** <b>type</b>, unsigned int* <b>size</b>, int* <b>offset</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This function is used to locate information about the instance variable of <var>obj</var> called <var>name</var>. It returns <code>YES</code> if the variable was found, <code>NO</code> otherwise. If it returns <code>YES</code>, then the values pointed to by <var>type</var>, <var>size</var>, and <var>offset</var> will be set (except where they are null pointers). </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCGetInstanceVariableDefinition">GSObjCGetInstanceVariableDefinition</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIVar">GSIVar</a> GSObjCGetInstanceVariableDefinition(Class <b>cls</b>, NSString* <b>name</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Deprecated.. use class_getInstanceVariable() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCGetVal">GSObjCGetVal</a></h3> id GSObjCGetVal(NSObject* <b>self</b>, const char* <b>key</b>, SEL <b>sel</b>, const char* <b>type</b>, unsigned int <b>size</b>, int <b>offset</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This is used internally by the key-value coding methods, to get a value from an object either via an accessor method (if <var>sel</var> is supplied), or via direct access (if <var>type</var>, <var>size</var>, and <var>offset</var> are supplied). <br /> Automatic conversion between NSNumber and C scalar types is performed. <br /> If <var>type</var> is null and can't be determined from the selector, the [NSObject -handleQueryWithUnboundKey:] method is called to try to get a value. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCGetVariable">GSObjCGetVariable</a></h3> void GSObjCGetVariable(id <b>obj</b>, int <b>offset</b>, unsigned int <b>size</b>, void* <b>data</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Gets the value from an instance variable in <var>obj</var> <br /> This function performs no checking... you should use it only where you are providing information from a call to <a rel="gsdoc" href="#function$GSObjCFindVariable"> GSObjCFindVariable() </a> and you know that the <var>data</var> area provided is the correct <var>size</var>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCIsClass">GSObjCIsClass</a></h3> BOOL GSObjCIsClass(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSObjCIsClass"> GSObjCIsClass() </a> is deprecated... use object_getClass() in conjunction with class_isMetaClass() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCIsInstance">GSObjCIsInstance</a></h3> BOOL GSObjCIsInstance(id <b>obj</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSObjCIsInstance"> GSObjCIsInstance() </a> is deprecated... use object_getClass() in conjunction with class_isMetaClass() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCIsKindOf">GSObjCIsKindOf</a></h3> BOOL GSObjCIsKindOf(Class <b>cls</b>, Class <b>other</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Test to see if class inherits from another class The argument to this function must NOT be <code>nil</code>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCMakeClass">GSObjCMakeClass</a></h3> NSValue* GSObjCMakeClass(NSString* <b>name</b>, NSString* <b>superName</b>, NSDictionary* <b>iVars</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> references: http://www.macdevcenter.com/pub/a/mac/2002/05/31/runtime_parttwo.html?page=1 http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/9objc_runtime_reference/chapter_5_section_1.html http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/9objc_runtime_reference/chapter_5_section_21.html ObjcRuntimeUtilities.m by Nicola Pero <br /> </p> <p> Create a <strong>Class</strong> structure for use by the ObjectiveC runtime and return an NSValue object pointing to it. The class will not be added to the runtime (you must do that later using the <a rel="gsdoc" href="#function$GSObjCAddClasses"> GSObjCAddClasses() </a> function). </p> <p> </p> <p> The <var>iVars</var> dictionary lists the instance variable names and their types. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCMethodNames">GSObjCMethodNames</a></h3> NSArray* GSObjCMethodNames(id <b>obj</b>, BOOL <b>recurse</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This method returns an array listing the names of all the instance methods available to <var>obj</var>, whether they belong to the class of <var>obj</var> or one of its superclasses. <br /> If <var>obj</var> is a class, this returns the class methods. <br /> Returns <code>nil</code> if <var>obj</var> is <code>nil</code> . </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCSetVal">GSObjCSetVal</a></h3> void GSObjCSetVal(NSObject* <b>self</b>, const char* <b>key</b>, id <b>val</b>, SEL <b>sel</b>, const char* <b>type</b>, unsigned int <b>size</b>, int <b>offset</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This is used internally by the key-value coding methods, to set a value in an object either via an accessor method (if <var>sel</var> is supplied), or via direct access (if <var>type</var>, <var>size</var>, and <var>offset</var> are supplied). <br /> Automatic conversion between NSNumber and C scalar types is performed. <br /> If <var>type</var> is null and can't be determined from the selector, the [NSObject -handleTakeValue:forUnboundKey:] method is called to try to set a value. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCSetVariable">GSObjCSetVariable</a></h3> void GSObjCSetVariable(id <b>obj</b>, int <b>offset</b>, unsigned int <b>size</b>, const void* <b>data</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Sets the value in an instance variable in <var>obj</var> <br /> This function performs no checking... you should use it only where you are providing information from a call to <a rel="gsdoc" href="#function$GSObjCFindVariable"> GSObjCFindVariable() </a> and you know that the <var>data</var> area provided is the correct <var>size</var>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCSuper">GSObjCSuper</a></h3> Class GSObjCSuper(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSObjCSuper"> GSObjCSuper() </a> is deprecated... use class_getSuperclass() </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCVariableNames">GSObjCVariableNames</a></h3> NSArray* GSObjCVariableNames(id <b>obj</b>, BOOL <b>recurse</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> This method returns an array listing the names of all the instance variables present in the instance <var>obj</var>, whether they belong to the class of <var>obj</var> or one of its superclasses. <br /> Returns <code>nil</code> if <var>obj</var> is <code>nil</code>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSObjCVersion">GSObjCVersion</a></h3> int GSObjCVersion(Class <b>cls</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSObjCVersion"> GSObjCVersion() </a> is deprecated... use class_getVersion() </div> <hr width="25%" align="left" /> <h3><a name="function$GSPrintf">GSPrintf</a></h3> BOOL GSPrintf(FILE* <b>fptr</b>, NSString* <b>format</b><b>,...</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Prints a message to <var>fptr</var> using the <var>format</var> string provided and any additional arguments. The <var>format</var> string is interpreted as by the NSString formatted initialisers, and understands the '%@' syntax for printing an object. </p> <p> </p> <p> The data is written to the file pointer in the default CString encoding if possible, as a UTF8 string otherwise. </p> <p> </p> <p> This function is recommended for printing general log messages. For debug messages use <a rel="gsdoc" href="#macro$NSDebugLog"> NSDebugLog() </a> and friends. For error logging use NSLog() , and for warnings you might consider <a rel="gsdoc" href="#macro$NSWarnLog"> NSWarnLog() </a> . </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSProtocolFromName">GSProtocolFromName</a></h3> Protocol* GSProtocolFromName(const char* <b>name</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a protocol object with the corresponding <var>name</var>. This function searches the registered classes for any protocol with the supplied <var>name</var>. If one is found, it is cached in for future requests. If efficiency is a factor then use <a rel="gsdoc" href="#function$GSRegisterProtocol"> GSRegisterProtocol() </a> to insert a protocol explicitly into the cache used by this function. If no protocol is found this function returns <code>nil</code>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSProtocolGetMethodDescriptionRecursive">GSProtocolGetMethodDescriptionRecursive</a></h3> struct objc_method_description GSProtocolGetMethodDescriptionRecursive(Protocol* <b>aProtocol</b>, SEL <b>aSel</b>, BOOL <b>isRequired</b>, BOOL <b>isInstance</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> A variant of protocol_getMethodDescription which recursively searches parent protocols if the requested selector isn't found in the given protocol. Returns a {NULL, NULL} structure if the requested selector couldn't be found. </div> <hr width="25%" align="left" /> <h3><a name="function$GSRegisterProtocol">GSRegisterProtocol</a></h3> void GSRegisterProtocol(Protocol* <b>proto</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Registers <var>proto</var> in the cache used by <a rel="gsdoc" href="#function$GSProtocolFromName"> GSProtocolFromName() </a> . </div> <hr width="25%" align="left" /> <h3><a name="function$GSSelectorFromName">GSSelectorFromName</a></h3> SEL GSSelectorFromName(const char* <b>name</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <a rel="gsdoc" href="#function$GSSelectorFromName"> GSSelectorFromName() </a> is deprecated... use sel_getUid() </div> <hr width="25%" align="left" /> <h3><a name="function$GSSelectorFromNameAndTypes">GSSelectorFromNameAndTypes</a></h3> SEL GSSelectorFromNameAndTypes(const char* <b>name</b>, const char* <b>types</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the selector for the specified <var>name</var> and <var>types</var>. <br /> Returns a nul pointer if the <var>name</var> is nul. <br /> Creates a new selector if necessary. <br /> Code must NOT rely on this providing a selector with type information. </div> <hr width="25%" align="left" /> <h3><a name="function$GSSelectorTypesMatch">GSSelectorTypesMatch</a></h3> BOOL GSSelectorTypesMatch(const char* <b>types1</b>, const char* <b>types2</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Compare only the type information ignoring qualifiers, the frame layout and register markers. Unlike sel_types_match, this function also handles comparisons of types with and without any layout information. </div> <hr width="25%" align="left" /> <h3><a name="function$GSSkipTypeQualifierAndLayoutInfo">GSSkipTypeQualifierAndLayoutInfo</a></h3> const char* GSSkipTypeQualifierAndLayoutInfo(const char* <b>types</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Takes full type information and skips forward to the actual type as specified in the _C_... constants. </div> <hr width="25%" align="left" /> <h3><a name="function$GSTypesFromSelector">GSTypesFromSelector</a></h3> const char* GSTypesFromSelector(SEL <b>sel</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the type information from the specified selector. <br /> May return a nul pointer if the selector was a nul pointer or if it was not typed (or if the runtime does not support typed selectors). <br /> Code must NOT rely on this providing any type information. </div> <hr width="25%" align="left" /> <h1><a name="012000000000">GSIArray functions</a></h1> <p> </p> <h3><a name="function$GSIArrayAddItem">GSIArrayAddItem</a></h3> void GSIArrayAddItem(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayAddItemNoRetain">GSIArrayAddItemNoRetain</a></h3> void GSIArrayAddItemNoRetain(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayCapacity">GSIArrayCapacity</a></h3> unsigned int GSIArrayCapacity(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayCheckSort">GSIArrayCheckSort</a></h3> void GSIArrayCheckSort(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, NSComparisonResult(*) <b>sorter</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayClear">GSIArrayClear</a></h3> void GSIArrayClear(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayCopyWithZone">GSIArrayCopyWithZone</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> GSIArrayCopyWithZone(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, NSZone* <b>zone</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayCount">GSIArrayCount</a></h3> unsigned int GSIArrayCount(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayEmpty">GSIArrayEmpty</a></h3> void GSIArrayEmpty(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayGrow">GSIArrayGrow</a></h3> void GSIArrayGrow(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayGrowTo">GSIArrayGrowTo</a></h3> void GSIArrayGrowTo(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, unsigned int <b>next</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInitWithZoneAndCapacity">GSIArrayInitWithZoneAndCapacity</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> GSIArrayInitWithZoneAndCapacity(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, NSZone* <b>zone</b>, size_t <b>capacity</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInitWithZoneAndStaticCapacity">GSIArrayInitWithZoneAndStaticCapacity</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> GSIArrayInitWithZoneAndStaticCapacity(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, NSZone* <b>zone</b>, size_t <b>capacity</b>, GSIArrayItem* <b>buffer</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInsertItem">GSIArrayInsertItem</a></h3> void GSIArrayInsertItem(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInsertItemNoRetain">GSIArrayInsertItemNoRetain</a></h3> void GSIArrayInsertItemNoRetain(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInsertSorted">GSIArrayInsertSorted</a></h3> void GSIArrayInsertSorted(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, NSComparisonResult(*) <b>sorter</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInsertSortedNoRetain">GSIArrayInsertSortedNoRetain</a></h3> void GSIArrayInsertSortedNoRetain(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, NSComparisonResult(*) <b>sorter</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayInsertionPosition">GSIArrayInsertionPosition</a></h3> unsigned int GSIArrayInsertionPosition(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, NSComparisonResult(*) <b>sorter</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayItemAtIndex">GSIArrayItemAtIndex</a></h3> GSIArrayItem GSIArrayItemAtIndex(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayItems">GSIArrayItems</a></h3> GSIArrayItem* GSIArrayItems(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayLastItem">GSIArrayLastItem</a></h3> GSIArrayItem GSIArrayLastItem(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayRemoveAllItems">GSIArrayRemoveAllItems</a></h3> void GSIArrayRemoveAllItems(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayRemoveItemAtIndex">GSIArrayRemoveItemAtIndex</a></h3> void GSIArrayRemoveItemAtIndex(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayRemoveItemAtIndexNoRelease">GSIArrayRemoveItemAtIndexNoRelease</a></h3> void GSIArrayRemoveItemAtIndexNoRelease(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayRemoveItemsFromIndex">GSIArrayRemoveItemsFromIndex</a></h3> void GSIArrayRemoveItemsFromIndex(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArrayRemoveLastItem">GSIArrayRemoveLastItem</a></h3> void GSIArrayRemoveLastItem(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArraySearch">GSIArraySearch</a></h3> unsigned int GSIArraySearch(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, NSComparisonResult(*) <b>sorter</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIArraySetItemAtIndex">GSIArraySetItemAtIndex</a></h3> void GSIArraySetItemAtIndex(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIArray">GSIArray</a> <b>array</b>, GSIArrayItem <b>item</b>, unsigned int <b>index</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="013000000000">GSIMap functions</a></h1> <p> </p> <h3><a name="function$GSIMapAddKey">GSIMapAddKey</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapAddKey(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapAddKeyNoRetain">GSIMapAddKeyNoRetain</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapAddKeyNoRetain(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapAddNodeToBucket">GSIMapAddNodeToBucket</a></h3> void GSIMapAddNodeToBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bucket</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapAddNodeToMap">GSIMapAddNodeToMap</a></h3> void GSIMapAddNodeToMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapAddPair">GSIMapAddPair</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapAddPair(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>, GSIMapVal <b>value</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapAddPairNoRetain">GSIMapAddPairNoRetain</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapAddPairNoRetain(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>, GSIMapVal <b>value</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapBucketForKey">GSIMapBucketForKey</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> GSIMapBucketForKey(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapCleanMap">GSIMapCleanMap</a></h3> void GSIMapCleanMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapCountByEnumeratingWithStateObjectsCount">GSIMapCountByEnumeratingWithStateObjectsCount</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a> GSIMapCountByEnumeratingWithStateObjectsCount(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, NSFastEnumerationState* <b>state</b>, id* <b>stackbuf</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a> <b>len</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Used to implement fast enumeration methods in classes that use GSIMap for their data storage. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapEmptyMap">GSIMapEmptyMap</a></h3> void GSIMapEmptyMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapEndEnumerator">GSIMapEndEnumerator</a></h3> void GSIMapEndEnumerator(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapEnumerator">GSIMapEnumerator</a> <b>enumerator</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Tidies up after map enumeration... effectively destroys the <var>enumerator</var>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapEnumeratorBucket">GSIMapEnumeratorBucket</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> GSIMapEnumeratorBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapEnumerator">GSIMapEnumerator</a> <b>enumerator</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Returns the bucket from which the next node in the enumeration will come. Once the next node has been enumerated, you can use the bucket and node to remove the node from the map using the <a rel="gsdoc" href="#function$GSIMapRemoveNodeFromMap"> GSIMapRemoveNodeFromMap() </a> function. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapEnumeratorForMap">GSIMapEnumeratorForMap</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapEnumerator_t">GSIMapEnumerator_t</a> GSIMapEnumeratorForMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Enumerating <br /> Create an return an enumerator for the specified <var>map</var>. <br /> You must call <a rel="gsdoc" href="#function$GSIMapEndEnumerator"> GSIMapEndEnumerator() </a> when you have finished with the enumerator. <br /> <strong>WARNING</strong> You should not alter a <var>map</var> while an enumeration is in progress. The results of doing so are reasonably unpredictable. <br /> Remember, DON'T MESS WITH A MAP WHILE YOU'RE ENUMERATING IT. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapEnumeratorNextNode">GSIMapEnumeratorNextNode</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapEnumeratorNextNode(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapEnumerator">GSIMapEnumerator</a> <b>enumerator</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Returns the next node in the map, or a nul pointer if at the end. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapFirstNode">GSIMapFirstNode</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapFirstNode(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapFreeNode">GSIMapFreeNode</a></h3> void GSIMapFreeNode(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapInitWithZoneAndCapacity">GSIMapInitWithZoneAndCapacity</a></h3> void GSIMapInitWithZoneAndCapacity(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, NSZone* <b>zone</b>, uintptr_t <b>capacity</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapLinkNodeIntoBucket">GSIMapLinkNodeIntoBucket</a></h3> void GSIMapLinkNodeIntoBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bucket</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapMoreNodes">GSIMapMoreNodes</a></h3> void GSIMapMoreNodes(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, unsigned int <b>required</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapNodeForKey">GSIMapNodeForKey</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapNodeForKey(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapNodeForKeyInBucket">GSIMapNodeForKeyInBucket</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapNodeForKeyInBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bucket</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapNodeForSimpleKey">GSIMapNodeForSimpleKey</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapNodeForSimpleKey(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapPickBucket">GSIMapPickBucket</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> GSIMapPickBucket(unsigned int <b>hash</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>buckets</b>, uintptr_t <b>bucketCount</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemangleBuckets">GSIMapRemangleBuckets</a></h3> void GSIMapRemangleBuckets(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>old_buckets</b>, uintptr_t <b>old_bucketCount</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>new_buckets</b>, uintptr_t <b>new_bucketCount</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemoveAndFreeNode">GSIMapRemoveAndFreeNode</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> GSIMapRemoveAndFreeNode(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, uintptr_t <b>bkt</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemoveKey">GSIMapRemoveKey</a></h3> BOOL GSIMapRemoveKey(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, GSIMapKey <b>key</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Removes the item for the specified <var>key</var> from the <var>map</var>. If the <var>key</var> was present, returns <code>YES</code>, otherwise returns <code>NO</code>. </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemoveNodeFromBucket">GSIMapRemoveNodeFromBucket</a></h3> void GSIMapRemoveNodeFromBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bucket</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemoveNodeFromMap">GSIMapRemoveNodeFromMap</a></h3> void GSIMapRemoveNodeFromMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bkt</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRemoveWeak">GSIMapRemoveWeak</a></h3> void GSIMapRemoveWeak(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapResize">GSIMapResize</a></h3> void GSIMapResize(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, uintptr_t <b>new_capacity</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapRightSizeMap">GSIMapRightSizeMap</a></h3> void GSIMapRightSizeMap(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>, uintptr_t <b>capacity</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapSize">GSIMapSize</a></h3> <a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a> GSIMapSize(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapTable">GSIMapTable</a> <b>map</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSIMapUnlinkNodeFromBucket">GSIMapUnlinkNodeFromBucket</a></h3> void GSIMapUnlinkNodeFromBucket(<a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapBucket">GSIMapBucket</a> <b>bucket</b>, <a rel="gsdoc" href="TypesAndConstants.html#type$GSIMapNode">GSIMapNode</a> <b>node</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="014000000000">GSFunctions functions</a></h1> <p> </p> <h3><a name="function$GSFindNamedFile">GSFindNamedFile</a></h3> NSString* GSFindNamedFile(NSArray* <b>paths</b>, NSString* <b>aName</b>, NSString* <b>anExtension</b>);<br /> <div class="availability"> <b>Availability:</b> BaseAdditions<br /> Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Try to locate file/directory (aName).( <var>anExtension</var> (<var>aName</var>).(anExtension) in <var>paths</var>. Will return the first found or <code>nil</code> if nothing is found. <br /> Deprecated... may be removed in later release. </div> <hr width="25%" align="left" /> <h1><a name="015000000000">GSLocale functions</a></h1> <p> </p> <h3><a name="function$GSDefaultLanguageLocale">GSDefaultLanguageLocale</a></h3> NSString* GSDefaultLanguageLocale();<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns the locale string for LC_MESSAGES </div> <hr width="25%" align="left" /> <h3><a name="function$GSDomainFromDefaultLocale">GSDomainFromDefaultLocale</a></h3> NSDictionary* GSDomainFromDefaultLocale();<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Set the current locale to the system default, and backup what it was previously (should have been @"C"). <br /> Restore the current locale to what we backed up (again, should be restored to @"C") </div> <hr width="25%" align="left" /> <h3><a name="function$GSLanguageFromLocale">GSLanguageFromLocale</a></h3> NSString* GSLanguageFromLocale(NSString* <b>locale</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a language name string for a given <var>locale</var>. e.g. GSLanguageFromLocale(@"en_CA") returns @"CanadaEnglish" </div> <hr width="25%" align="left" /> <h3><a name="function$GSLanguagesFromLocale">GSLanguagesFromLocale</a></h3> NSArray* GSLanguagesFromLocale(NSString* <b>locale</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Convenience function which calls GSLocaleVariants to expand the given <var>locale</var> to a list of variants, and then calls GSLanguageFromLocale on each. e.g. GSLanguagesFromLocale(@"en_CA") returns (@"CanadaEnglish", @"English") </div> <hr width="25%" align="left" /> <h3><a name="function$GSLocaleVariants">GSLocaleVariants</a></h3> NSArray* GSLocaleVariants(NSString* <b>locale</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return an array of variants of a <var>locale</var>, formed by stripping off parts of the identifier, ordered from most similar to least similar. e.g. GSLocaleVariants(@"en_CA") returns (@"en_CA", @"en"). </div> <hr width="25%" align="left" /> <h3><a name="function$GSSetLocale">GSSetLocale</a></h3> NSString* GSSetLocale(int <b>category</b>, NSString* <b>locale</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSSetLocaleC">GSSetLocaleC</a></h3> const char* GSSetLocaleC(int <b>category</b>, const char* <b>loc</b>);<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="016000000000">NSDebug+GNUstepBase functions</a></h1> <p> </p> <h3><a name="function$GSDebugFunctionMsg">GSDebugFunctionMsg</a></h3> NSString* GSDebugFunctionMsg(const char* <b>func</b>, const char* <b>file</b>, int <b>line</b>, NSString* <b>fmt</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Used to produce a format string for logging a message with function location details. </div> <hr width="25%" align="left" /> <h3><a name="function$GSDebugMethodMsg">GSDebugMethodMsg</a></h3> NSString* GSDebugMethodMsg(id <b>obj</b>, SEL <b>sel</b>, const char* <b>file</b>, int <b>line</b>, NSString* <b>fmt</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Used to produce a format string for logging a message with method location details. </div> <hr width="25%" align="left" /> <h3><a name="function$GSDebugSet">GSDebugSet</a></h3> BOOL GSDebugSet(NSString* <b>level</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="017000000000">NSThread+GNUstepBase functions</a></h1> <p> </p> <h3><a name="function$GSCurrentThread">GSCurrentThread</a></h3> NSThread* GSCurrentThread();<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$GSCurrentThreadDictionary">GSCurrentThreadDictionary</a></h3> NSMutableDictionary* GSCurrentThreadDictionary();<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h1><a name="018000000000">Unicode functions</a></h1> <p> </p> <h3><a name="function$GSEncodingForRegistry">GSEncodingForRegistry</a></h3> NSStringEncoding GSEncodingForRegistry(NSString* <b>registry</b>, NSString* <b>encoding</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Returns the NSStringEncoding that matches the specified character set <var>registry</var> and <var>encoding</var> information. For instance, for the iso8859-5 character set, the <var>registry</var> is iso8859 and the <var>encoding</var> is 5, and the returned NSStringEncoding is NSISOCyrillicStringEncoding. If there is no specific <var>encoding</var>, use @"0". Returns GSUndefinedEncoding if there is no match. </div> <hr width="25%" align="left" /> <h3><a name="function$GSEncodingFromLocale">GSEncodingFromLocale</a></h3> NSStringEncoding GSEncodingFromLocale(const char* <b>clocale</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Try to deduce the string encoding from the locale string <var>clocale</var>. This function looks in the Locale.encodings file installed as part of GNUstep Base if the encoding cannot be deduced from the <var>clocale</var> string itself. If <var>clocale</var> isn't set or no match can be found, returns GSUndefinedEncoding. </div> <hr width="25%" align="left" /> <h3><a name="function$GSFromUnicode">GSFromUnicode</a></h3> BOOL GSFromUnicode(unsigned char** <b>dst</b>, unsigned int* <b>size</b>, const unichar* <b>src</b>, unsigned int <b>slen</b>, NSStringEncoding <b>enc</b>, NSZone* <b>zone</b>, unsigned int <b>options</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Function to convert from 16-bit unicode to 8-bit data. </p> <p> The <var>dst</var> argument is a pointer to a pointer to a buffer in which the converted data is to be stored. If it is a null pointer, this function discards converted data, and is used only to determine the length of the converted data. If the <var>zone</var> argument is non-nul, the function is free to allocate a larger buffer if necessary, and store this new buffer in the <var>dst</var> argument. It will *NOT* deallocate the original buffer! </p> <p> </p> <p> The <var>size</var> argument is a pointer to the initial <var>size</var> of the destination buffer. If the function changes the buffer <var>size</var>, this value will be altered to the new <var>size</var>. This is measured in bytes. </p> <p> </p> <p> The <var>src</var> argument is a pointer to the 16-bit unicode string which is to be converted to 8-bit data. </p> <p> </p> <p> The <var>slen</var> argument is the length of the 16-bit unicode string which is to be converted to 8-bit data. This is measured in 16-bit characters, not bytes. </p> <p> </p> <p> The <var>enc</var> argument specifies the encoding type of the 8-bit byte sequence which is to be produced from the 16-bit unicode. </p> <p> </p> <p> The <var>zone</var> argument specifies a memory <var>zone</var> in which the function may allocate a buffer to return data in. If this is nul, the function will fail if the originally supplied buffer is not big enough (unless <var>dst</var> is a null pointer... indicating that converted data is to be discarded). <br /> If the library is built for garbage collecting, the <var>zone</var> argument is used only as a marker to say whether the function may allocate memory (<var>zone</var> is non-null) or not (<var>zone</var> is null). </p> <p> The <var>options</var> argument controls some special behavior. <ul> <li> If GSUniStrict is set, the function will fail if a character is encountered in the source which can't be converted. Otherwise, some approximation or marker will be placed in the destination. </li> <li> If GSUniTerminate is set, the function is expected to nul terminate the output data, and will assume that it is safe to place the nul just beyond the end of the stated buffer <var>size</var>. Also, if the function grows the buffer, it will allow for an extra termination byte. </li> <li> If GSUniTemporary is set, the function will return the results in an autoreleased buffer rather than in a buffer that the caller must release. </li> <li> If GSUniBOM is set, the function will read the first unicode character as a byte order marker. </li> <li> If GSUniShortOk is set, the function will return a buffer containing any decoded characters even if the whole conversion fails. </li> </ul> </p> <p> On return, the function result is a flag indicating success (<code>YES</code>) or failure ( <code>NO</code>), and on success, the value stored in <var>size</var> is the number of bytes in the converted data. The converted data itself is stored in the location given by <var>dst</var>. <br /> NB. If the value stored in <var>dst</var> has been changed, it is a pointer to allocated memory which the caller is responsible for freeing, and the caller is <em>still</em> responsible for freeing the original buffer. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSToUnicode">GSToUnicode</a></h3> BOOL GSToUnicode(unichar** <b>dst</b>, unsigned int* <b>size</b>, const unsigned char* <b>src</b>, unsigned int <b>slen</b>, NSStringEncoding <b>enc</b>, NSZone* <b>zone</b>, unsigned int <b>options</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Function to convert from 8-bit data to 16-bit unicode characters. </p> <p> The <var>dst</var> argument is a pointer to a pointer to a buffer in which the converted string is to be stored. If it is a null pointer, this function discards converted data, and is used only to determine the length of the converted string. If the <var>zone</var> argument is non-nul, the function is free to allocate a larger buffer if necessary, and store this new buffer in the <var>dst</var> argument. It will *NOT* deallocate the original buffer! </p> <p> </p> <p> The <var>size</var> argument is a pointer to the initial <var>size</var> of the destination buffer. If the function changes the buffer <var>size</var>, this value will be altered to the new <var>size</var>. This is measured in 16-bit unicode characters, not bytes. </p> <p> </p> <p> The <var>src</var> argument is a pointer to the byte sequence which is to be converted to 16-bit unicode. </p> <p> </p> <p> The <var>slen</var> argument is the length of the byte sequence which is to be converted to 16-bit unicode. This is measured in bytes. </p> <p> </p> <p> The <var>enc</var> argument specifies the encoding type of the 8-bit byte sequence which is to be converted to 16-bit unicode. </p> <p> </p> <p> The <var>zone</var> argument specifies a memory <var>zone</var> in which the function may allocate a buffer to return data in. If this is nul, the function will fail if the originally supplied buffer is not big enough (unless <var>dst</var> is a null pointer... indicating that converted data is to be discarded). <br /> If the library is built for garbage collecting, the <var>zone</var> argument is used only as a marker to say whether the function may allocate memory (<var>zone</var> is non-null) or not (<var>zone</var> is null). </p> <p> The <var>options</var> argument controls some special behavior. <ul> <li> If GSUniTerminate is set, the function is expected to null terminate the output string, and will assume that it is safe to place the nul just beyond the end of the stated buffer <var>size</var>. Also, if the function grows the buffer, it will allow for an extra termination character. </li> <li> If GSUniTemporary is set, the function will return the results in an autoreleased buffer rather than in a buffer that the caller must release. </li> <li> If GSUniBOM is set, the function will write the first unicode character as a byte order marker. </li> <li> If GSUniShortOk is set, the function will return a buffer containing any decoded characters even if the whole conversion fails. </li> </ul> </p> <p> On return, the function result is a flag indicating success (<code>YES</code>) or failure ( <code>NO</code>), and on success, the value stored in <var>size</var> is the number of characters in the converted string. The converted string itself is stored in the location given by <var>dst</var>. <br /> NB. If the value stored in <var>dst</var> has been changed, it is a pointer to allocated memory which the caller is responsible for freeing, and the caller is <em>still</em> responsible for freeing the original buffer. </p> <p> </div> <hr width="25%" align="left" /> <h3><a name="function$GSUnicode">GSUnicode</a></h3> unsigned int GSUnicode(const unichar* <b>chars</b>, unsigned int <b>length</b>, BOOL* <b>isASCII</b>, BOOL* <b>isLatin1</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Function to check a block of data for validity as a unicode string and say whether it contains solely ASCII or solely Latin1 data. <br /> Any leading BOM must already have been removed and the data must already be in native byte order. <br /> Returns the number of characters which were found valid. </div> <hr width="25%" align="left" /> <h3><a name="function$uni_cop">uni_cop</a></h3> unsigned char uni_cop(unichar <b>u</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$uni_is_decomp">uni_is_decomp</a></h3> unichar* uni_is_decomp(unichar <b>u</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$uni_isnonsp">uni_isnonsp</a></h3> BOOL uni_isnonsp(unichar <b>u</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> <h3><a name="function$uni_tolower">uni_tolower</a></h3> unichar uni_tolower(unichar <b>ch</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Uses direct access into a two-level table to map cases. <br /> The two-level table method is less space efficient (but still not bad) than a single table and a linear search, but it reduces the number of conditional statements to just one. </div> <hr width="25%" align="left" /> <h3><a name="function$uni_toupper">uni_toupper</a></h3> unichar uni_toupper(unichar <b>ch</b>);<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X, BaseAdditions Likely to be changed/moved/removed at 1.15.0</div> <br /> <div class="desc"> Uses direct access into a two-level table to map cases. <br /> The two-level table method is less space efficient (but still not bad) than a single table and a linear search, but it reduces the number of conditional statements to just one. </div> <hr width="25%" align="left" /> <br /> <a href="Base.html">Up</a> </font> </body> </html>