home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / 3d / irit / misc_lib / miscatt2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-10  |  1.7 KB  |  47 lines

  1. /*****************************************************************************
  2. * Setting attributes for objects.                         *
  3. *                                         *
  4. * Written by:  Gershon Elber                Ver 0.2, Mar. 1990   *
  5. *****************************************************************************/
  6.  
  7. #include <string.h>
  8. #include <stdio.h>
  9. #include <math.h>
  10. #include "irit_sm.h"
  11. #include "imalloc.h"
  12. #include "miscattr.h"
  13.  
  14. /*****************************************************************************
  15. * DESCRIPTION:                                                               *
  16. *   Routine to release the data slot of an attribute.                 *
  17. * This routine also exists in attribut.c with object handling. it will be    *
  18. * linked in iff no object handling is used.                     *
  19. *                                                                            *
  20. * PARAMETERS:                                                                *
  21. *   Attr:     To free.                                                       *
  22. *                                                                            *
  23. * RETURN VALUE:                                                              *
  24. *   void                                                                     *
  25. *****************************************************************************/
  26. void _AttrFreeAttributeData(IPAttributeStruct *Attr)
  27. {
  28.     switch (Attr -> Type) {
  29.     case IP_ATTR_INT:
  30.         break;
  31.     case IP_ATTR_REAL:
  32.         break;
  33.     case IP_ATTR_STR:
  34.         IritFree((VoidPtr) Attr -> U.Str);
  35.         break;
  36.     case IP_ATTR_PTR:
  37.         IritFree((VoidPtr) Attr -> U.Ptr);
  38.         break;
  39.     case IP_ATTR_OBJ:
  40.         IritFatalError("Should not free object in misc attributes.");
  41.         break;
  42.     default:
  43.         IritFatalError("Undefined attribute type");
  44.         break;
  45.     }
  46. }
  47.