/*

    FILE: REPT_MSG.C

      Routines to report message to screen and to specify if
      same message must be echoed to some file.

*/
#include <stdio.h>

static FILE *fp_msg = NULL;

#if PROTOTYPE_ALLOWED
void set_msg_file(FILE *fp)
#else
void set_msg_file(fp)
FILE *fp;
#endif
{
   fp_msg = fp;                     /* set file pointer for message echo */
}

#if PROTOTYPE_ALLOWED
void report_msg(char *msg)
#else
void report_msg(msg)
char *msg;
#endif
{
   fprintf(stdout, "%s", msg);               /* print to screen */
   if (fp_msg != NULL)
      fprintf(fp_msg, "%s", msg);   /* echo to file */
}
