home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Web / Utilities / wwwcount-2.3 / combine / dstraimg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-02  |  1.4 KB  |  82 lines

  1. /*
  2.  *    DestroyAnyImageStruct()    -    frees Image Struct
  3.  *
  4.  *    RCS:
  5.  *        $Revision: 2.3 $
  6.  *        $Date: 1996/05/03 02:21:34 $
  7.  *
  8.  *    Security:
  9.  *        Unclassified
  10.  *
  11.  *    Description:
  12.  *        text
  13.  *
  14.  *    Input Parameters:
  15.  *        type    identifier    description
  16.  *
  17.  *        text
  18.  *
  19.  *    Output Parameters:
  20.  *        type    identifier    description
  21.  *
  22.  *        text
  23.  *
  24.  *    Return Values:
  25.  *        value    description
  26.  *
  27.  *    Side Effects:
  28.  *        text
  29.  *
  30.  *    Limitations and Comments:
  31.  *        text
  32.  *
  33.  *    Development History:
  34.  *        when    who        why
  35.  *    6/29/94        muquit    first cut
  36.  *    10/10/94    muquit    pass &anyimage so it can be NULLed properly
  37.  */
  38. #include "combine.h"
  39. #include "defines.h"
  40.  
  41. void DestroyAnyImageStruct (anyimage)
  42. Image
  43.     **anyimage;
  44. {
  45.         
  46.  
  47.     if ((*anyimage)->fp != (FILE *) NULL)
  48.     {
  49.         (*anyimage)->fp = (FILE *) NULL;
  50.     }
  51.     if ((*anyimage)->comments != (char *) NULL)
  52.     {
  53.         (void) free ((char *) (*anyimage)->comments);
  54.         (*anyimage)->comments=(char *) NULL;
  55.     }
  56.  
  57.     if ((*anyimage)->colormap != (RGB *) NULL)
  58.     {
  59.         (void) free ((char *) (*anyimage)->colormap);
  60.         (*anyimage)->colormap = (RGB *)NULL;
  61.     }
  62.  
  63.     if ((*anyimage)->signature != (char *) NULL)
  64.     {
  65.         (void) free ((char *) (*anyimage)->signature);
  66.         (*anyimage)->signature=(char *)NULL;
  67.     }
  68.  
  69.     if ((*anyimage)->pixels != (Runlength *) NULL)
  70.     {
  71.         (void) free ((char *) (*anyimage)->pixels);
  72.         (*anyimage)->pixels=(Runlength *) NULL;
  73.     }
  74.  
  75.  
  76.     if (*anyimage != (Image *) NULL)
  77.     {
  78.         (void) free ((char *) *anyimage);
  79.         *anyimage = (Image *) NULL;
  80.     }
  81. }
  82.