Important: The information in this document is obsolete and should not be used for new development.
CompactDictionary
TheCompactDictionaryfunction compacts the specified dictionary file by removing all garbage data from it.
FUNCTION CompactDictionary (dictionaryReference:LongInt) : OSErr;
dictionaryReference- A number that specifies a particular open dictionary.
DESCRIPTION
TheCompactDictionaryfunction removes garbage data by creating a new copy of the dictionary file that contains only valid entries. Once the new dictionary is constructed, the Dictionary Manager deletes the old one.If there is insufficient disk space to build the new dictonary,
CompactDictionaryreturns thebtNoSpaceerror message, and the original dictionary is preserved intact.Note that
CompactDictionarymakes a dictionary file smaller by removing unusable information. It does not actually compress any data.SPECIAL CONSIDERATIONS
CompactDictionarymay move memory; your application should not call this function at interrupt time.RESULT CODES
In addition to the standard File Manager, Memory Manager, and Resource Manager errors,CompactDictionarymay return any of the following result codes.
noErr 0 No error notBTree -410 File not a dictionary btNoSpace -413 Insufficient disk space to store dictionary information SEE ALSO
File Manager error codes are described in Inside Macintosh: Files. Memory Manager error codes are described in Inside Macintosh: Memory. Resource Manager error codes are described in Inside Macintosh: More Macintosh Toolbox.