public software.psfex

[/] [branches/] [rhl/] [src/] [fits/] [fitsmisc.c] - Diff between revs 188 and 195

Show entire file | Details | Blame | View Log

Rev 188 Rev 195
Line 38... Line 38...
#include        <time.h>
#include        <time.h>
 
 
#include        "fitscat_defs.h"
#include        "fitscat_defs.h"
#include        "fitscat.h"
#include        "fitscat.h"
 
 
static void     (*errorfunc)(char *msg1, char *msg2) = NULL;
static void     (*errorfunc)(const char *msg1, const char *msg2) = NULL;
static char     warning_historystr[WARNING_NMAX][192]={""};
static char     warning_historystr[WARNING_NMAX][192]={""};
static int      nwarning = 0, nwarning_history = 0, nerror = 0;
static int      nwarning = 0, nwarning_history = 0, nerror = 0;
 
 
/********************************* error ************************************/
/********************************* error ************************************/
/*
/*
I hope it will never be used!
I hope it will never be used!
*/
*/
void    error(int num, char *msg1, char *msg2)
void    error(int num, const char *msg1, const char *msg2)
  {
  {
  fprintf(stderr, "\n> %s%s\n\n",msg1,msg2);
  fprintf(stderr, "\n> %s%s\n\n",msg1,msg2);
  if (num && errorfunc && !nerror)
  if (num && errorfunc && !nerror)
    {
    {
    nerror = 1;
    nerror = 1;
Line 62... Line 62...
 
 
/**************************** error_installfunc *****************************/
/**************************** error_installfunc *****************************/
/*
/*
I hope it will never be used!
I hope it will never be used!
*/
*/
void    error_installfunc(void (*func)(char *msg1, char *msg2))
void    error_installfunc(void (*func)(const char *msg1, const char *msg2))
  {
  {
  if (func)
  if (func)
    errorfunc = func;
    errorfunc = func;
 
 
  return;
  return;