4 #include "dprints.h" /* for dprints */
5 #include "gribfuncs.h" /* prototypes */
8 *********************************************************************
9 * A. FUNCTION: upd_child_errmsg
10 * Tacks the given function name in front of the error message array
11 * to show which level of the Nested Function calls the error
15 * void upd_child_errmsg (parent, errmsg)
17 * ARGUMENTS (I=input, O=output, I&O=input and output):
18 * (I) char *parent; name of caller function
19 * (I&O) char *errmsg; already contain error message upon entry;
20 * will get name of parent tacked in front of
21 * existing array content;
23 *********************************************************************
26 void upd_child_errmsg (char *parent
, char *errmsg
)
28 void upd_child_errmsg (parent
, errmsg
)
33 char temp
[500], *func
="upd_child_errmsg";
35 DPRINT1 ("Entering %s\n", func
);
36 DPRINT2 ("Tacking '%s' in front of '%s'\n", parent
, errmsg
);
39 * A.1 IF (the error message is null) THEN
40 * RETURN error msg "FuncName: no Error msg avail!"
42 * RETURN error msg "FuncName: " + errmsg
46 sprintf (errmsg
, "%s: no Error msg avail!\n", parent
);
48 sprintf (temp
, "%s: %s", parent
, errmsg
);
49 strncpy (errmsg
, temp
, 500);
52 DPRINT1 ("ErrMsg is now-> %s\n", errmsg
);
53 DPRINT1 ("Leaving %s\n", func
);