1
/* Copyright (C) 2000 Damir Zucic */
3
/*=============================================================================
12
(2) Name of the function where error occured.
13
(3) Name of the file which caused trouble, if file caused trouble.
15
(5) \ ... Error message, split into four strings.
16
(6) / Don't forget to put newline somewhere!
20
(1) Error message written to stderr.
25
========includes:============================================================*/
30
/*======print error message:=================================================*/
32
/* Note: there is no newline in the last four fprintf! */
34
void ErrorMessage_ (char *module, char *function, char *filename,
35
char *s1, char *s2, char *s3, char *s4)
37
fprintf (stderr, "\nERROR>");
38
fprintf (stderr, " module: %s, function: %s", module, function);
39
if (strlen (filename) != 0) fprintf (stderr, ", file: %s", filename);
40
fprintf (stderr, "\n");
41
if (strlen (s1) != 0) fprintf (stderr, "%s", s1);
42
if (strlen (s2) != 0) fprintf (stderr, "%s", s2);
43
if (strlen (s3) != 0) fprintf (stderr, "%s", s3);
44
if (strlen (s4) != 0) fprintf (stderr, "%s", s4);
47
/*===========================================================================*/