-/* we never actually use the last item - it's the NULL terminator */
-#define ERRSTK 20
-static i_errmsg error_stack[ERRSTK];
-static int error_sp = ERRSTK - 1;
-/* we track the amount of space used each string, so we don't reallocate
- space unless we need to.
- This also means that a memory tracking library may see the memory
- allocated for this as a leak. */
-static int error_space[ERRSTK];
-
-static i_error_cb error_cb;
-static i_failed_cb failed_cb;
-static int failures_fatal;
-static char *argv0;
-
-/*
-=item i_set_argv0(char const *program)
-
-Sets the name of the program to be displayed in fatal error messages.
-
-The simplest way to use this is just:
-
- i_set_argv0(argv[0]);
-
-when your program starts.
-*/
-void i_set_argv0(char const *name) {
- char *dupl;
- if (!name)
- return;
- /* if the user has an existing string of MAXINT length then
- the system is broken anyway */
- dupl = mymalloc(strlen(name)+1); /* check 17jul05 tonyc */
- strcpy(dupl, name);
- if (argv0)
- myfree(argv0);
- argv0 = dupl;
-}
-