utility
|
cmd_head.c,
count_tokens.c,
cp_file.c,
errmsg.c,
file_opened.c,
find_line.c,
find_string.c,
fn_base.c,
fn_dir.c,
fn_ext.c,
fn_root.c,
gchoice.c,
gdata_line.c,
gdouble.c,
gfield.c,
gint.c,
gntoken.c,
graphics_ok.c,
gstring.c,
lock.c,
lower.c,
mat_multiply.c,
mat_transform.c,
mat_transpose.c,
mv_file.c,
new_extension.c,
nolead.c,
notrail.c,
ordinal.c,
pfield.c,
squish_blanks.c,
test.c,
unlock.c,
upper.c,
utility.h,
utility.make,
valchars.c,
vec_angle.c,
vec_crossprod.c,
vec_diff.c,
vec_dotprod.c,
vec_length.c,
vec_norm.c,
|
|
|
#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);
}
|