awips2/nativeLib/rary.ohd.util/inc/degrib_inc/myerror.h
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

36 lines
1.1 KiB
C

/*****************************************************************************
* myerror.h
*
* DESCRIPTION
* This file contains the code to handle error messages. Instead of simply
* printing the error to stdio, it allocates some memory and stores the
* message in it. This is so that one can pass the error message back to
* Tcl/Tk or another GUI program when there is no stdio.
* In addition a version of sprintf is provided which allocates memory for
* the calling routine, so that one doesn't have to guess the maximum bounds
* of the message.
*
* HISTORY
* 9/2002 Arthur Taylor (MDL / RSIS): Created.
*
* NOTES
*****************************************************************************
*/
#ifndef MYERROR_H
#define MYERROR_H
#ifdef MEMWATCH
#include "degrib_inc/memwatch.h"
#endif
void mallocSprintf (char **Ptr, char *fmt, ...);
void reallocSprintf (char **Ptr, char *fmt, ...);
/* If fmt == NULL return buffer and reset, otherwise add. */
/* You are responsible for free'ing the result of errSprintf(NULL). */
char * errSprintf (char *fmt, ...);
void preErrSprintf (char *fmt, ...);
#endif