iactable.c

Go to the documentation of this file.
00001 
00002 /*  $Id: iactable.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /* copyright 1991-96 UserLand Software, Inc. All Rights Reserved.*/
00005 
00006 
00007 #include "frontier.h"
00008 #include "standard.h"
00009 
00010 #include "iacinternal.h"
00011 
00012 #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
00013     #include "aeutils.h"  /*PBS 03/14/02: AE OS X fix.*/
00014 #endif
00015 
00016 #define typeTable 'tabl'
00017 
00018 
00019 Boolean IACpushtableparam (Handle val, OSType keyword) {
00020 
00021     return (IACpushbinaryparam (val, typeTable, keyword));
00022     } /*IACpushtableparam*/
00023 
00024 
00025 Boolean IACreturntable (Handle x) {
00026 
00027     return (IACreturnbinary (x, typeTable));
00028     } /*IACreturntable*/
00029     
00030     
00031 Boolean IACgettableparam (OSType keyword, Handle *hbinary) {
00032     
00033     OSType binarytype;
00034     
00035     if (!IACgetbinaryparam (keyword, hbinary, &binarytype))
00036         return (false);
00037     
00038     if (binarytype != typeTable) {
00039         
00040         DisposeHandle (*hbinary);
00041         
00042         *hbinary = nil;
00043         
00044         IACparamerror (1, "\ptable", keyword);
00045         
00046         return (false);
00047         }
00048     
00049     return (true);
00050     } /*IACgettableparam*/
00051     
00052 
00053 Boolean IACgettableitem (AEDescList *list, long n, Handle *val) {
00054     
00055     OSErr ec;
00056     AEDesc desc;
00057     DescType key;
00058     
00059     if ((*list).descriptorType != typeAEList) {
00060     
00061         ec = AEGetKeyDesc (list, n, typeTable, &desc);
00062         
00063         if (ec != errAEDescNotFound)
00064             goto done;
00065         }
00066 
00067     ec = AEGetNthDesc (list, n, typeTable, &key, &desc);
00068     
00069     done:
00070     
00071     IACglobals.errorcode = ec;
00072     
00073     if (ec == noErr) {
00074     
00075         #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
00076         
00077             copydatahandle (&desc, val);
00078             
00079         #else
00080         
00081             *val = desc.dataHandle;
00082         
00083         #endif
00084         
00085         return (true);
00086         }
00087     else {
00088         *val = NULL;
00089         
00090         return (false);
00091         }
00092     } /*IACgettableitem*/
00093     
00094 
00095 Boolean IACpushtableitem (AEDescList *list, Handle val, long n) {
00096     
00097     return (IACpushbinaryitem (list, val, typeTable, n));
00098     } /*IACpushtableitem*/
00099 
00100 

Generated on Wed May 31 18:19:48 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6