home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / grfx_snd / tifflib / source / tif_flus.c < prev    next >
C/C++ Source or Header  |  1992-11-08  |  938b  |  31 lines

  1. #pragma warn -use
  2. static char     *sccsid = "@(#)TIFF/tif_flush.c 1.07, Copyright (c) Sam Leffler, Dieter Linde, "__DATE__;
  3. #pragma warn .use
  4. /*
  5.  * Copyright (c) 1988, 1990 by Sam Leffler, Oct 8 1990
  6.  * All rights reserved.
  7.  *
  8.  * This file is provided for unrestricted use provided that this legend is included on all tape media and as a part of the
  9.  * software program in whole or part.  Users may copy, modify or distribute this file at will.
  10.  *
  11.  * TIFF Library.
  12.  */
  13. #include "tiffio.h"
  14.  
  15. /****************************************************************************
  16.  *
  17.  */
  18. int
  19. TIFFFlush(
  20.         TIFF     *tif
  21.         )
  22. {
  23.         if (tif->tif_mode != O_RDONLY) {
  24.                 if (tif->tif_rawcc > 0 && !TIFFFlushData(tif))
  25.                         return(0);
  26.                 if ((tif->tif_flags & TIFF_DIRTYDIRECT) && !TIFFWriteDirectory(tif))
  27.                         return(0);
  28.         }
  29.         return(1);
  30. }
  31.