CCL Home Page
Up Directory CCL errmsg
#include "utility.h"

int errmsg(message,return_value)
/*============================================================================*/
/* PURPOSE: PRINT AN ERROR MESSAGE ON STANDARD ERROR, WAIT FOR USER TO
/*	ACKNOWLEDGE IT, AND RETURN THE SPECIFIED RETURN_VALUE.  THIS ROUTINE
/*	IS TYPICALLY USED IN AN ERROR CONDITION LIKE SO:
/*		IF (ERROR) RETURN(ERRMSG("XYZ FAILED",FALSE));
/* INPUTS:
/*	MESSAGE		MESSAGE TO DISPLAY FOR USER ("Error: " WILL BE PREFIXED
/*			TO THE MESSAGE, AND ".\n" WILL BE APPENDED.).
/*	RETURN_VALUE	VALUE TO BE RETURNED AT END OF THIS ROUTINE.
/* OUTPUTS:
/*	FUNCTION VALUE	THE RETURN_VALUE SPECIFIED BY THE USER.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   char message[];
   int return_value;
   {
   char junk[100];	/* JUNK INPUT FROM USER. */

   fprintf(stderr,"Error: %s.\n",message);

   printf("Press  to continue: ");
   gets(junk);

   return(return_value);
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 5183 times since Sat Apr 17 21:58:52 1999 GMT