| 
            Last change
 on this file was             10266, checked in by sandervl, 22 years ago           | 
        
        
          | 
             
PF: GIF and JPEG static libs for IPicture interface implementation 
 
           | 
        
        
          | 
            File size:
            1.5 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | /*****************************************************************************
 | 
|---|
| 2 | *   "Gif-Lib" - Yet another gif library.                                     *
 | 
|---|
| 3 | *                                                                            *
 | 
|---|
| 4 | * Written by:  Gershon Elber                    IBM PC Ver 0.1, Jun. 1989    *
 | 
|---|
| 5 | ******************************************************************************
 | 
|---|
| 6 | * Module to emulate a printf with a possible quiet (disable mode.)           *
 | 
|---|
| 7 | * A global variable GifQuietPrint controls the printing of this routine      *
 | 
|---|
| 8 | ******************************************************************************
 | 
|---|
| 9 | * History:                                                                   *
 | 
|---|
| 10 | * 12 May 91 - Version 1.0 by Gershon Elber.                                  *
 | 
|---|
| 11 | *****************************************************************************/
 | 
|---|
| 12 | 
 | 
|---|
| 13 | #include <stdio.h>
 | 
|---|
| 14 | 
 | 
|---|
| 15 | #ifdef USE_VARARGS
 | 
|---|
| 16 | #include <varargs.h>
 | 
|---|
| 17 | #else
 | 
|---|
| 18 | #include <stdarg.h>
 | 
|---|
| 19 | #endif /* USE_VARARGS */
 | 
|---|
| 20 | 
 | 
|---|
| 21 | #include "gif_lib.h"
 | 
|---|
| 22 | 
 | 
|---|
| 23 | #ifdef __MSDOS__
 | 
|---|
| 24 | int GifQuietPrint = FALSE;
 | 
|---|
| 25 | #else
 | 
|---|
| 26 | int GifQuietPrint = TRUE;
 | 
|---|
| 27 | #endif /* __MSDOS__ */
 | 
|---|
| 28 | 
 | 
|---|
| 29 | /*****************************************************************************
 | 
|---|
| 30 | * Same as fprintf to stderr but with optional print.                         *
 | 
|---|
| 31 | *****************************************************************************/
 | 
|---|
| 32 | #ifdef USE_VARARGS
 | 
|---|
| 33 | void GifQprintf(int va_alist)
 | 
|---|
| 34 | {
 | 
|---|
| 35 |     char *Format, Line[128];
 | 
|---|
| 36 |     va_list ArgPtr;
 | 
|---|
| 37 | 
 | 
|---|
| 38 |     va_start(ArgPtr);
 | 
|---|
| 39 |     Format = va_arg(ArgPtr, char *);
 | 
|---|
| 40 | #else
 | 
|---|
| 41 | void GifQprintf(char *Format, ...)
 | 
|---|
| 42 | {
 | 
|---|
| 43 |     char Line[128];
 | 
|---|
| 44 |     va_list ArgPtr;
 | 
|---|
| 45 | 
 | 
|---|
| 46 |     va_start(ArgPtr, Format);
 | 
|---|
| 47 | #endif /* USE_VARARGS */
 | 
|---|
| 48 | 
 | 
|---|
| 49 |     if (GifQuietPrint) return;
 | 
|---|
| 50 | 
 | 
|---|
| 51 |     vsprintf(Line, Format, ArgPtr);
 | 
|---|
| 52 |     va_end(ArgPtr);
 | 
|---|
| 53 | 
 | 
|---|
| 54 |     fputs(Line, stderr);
 | 
|---|
| 55 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.