Important: The information in this document is obsolete and should not be used for new development.
CompactDictionary
TheCompactDictionary
function 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
TheCompactDictionary
function 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,
CompactDictionary
returns thebtNoSpace
error message, and the original dictionary is preserved intact.Note that
CompactDictionary
makes a dictionary file smaller by removing unusable information. It does not actually compress any data.SPECIAL CONSIDERATIONS
CompactDictionary
may 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,CompactDictionary
may 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.