2 * Copyright 1987, 1988, 1989 by MIT Student Information Processing
5 * For copyright information, see copyright.h.
11 * I'm assuming that com_err.h includes varargs.h, which it does
12 * (right now). There really ought to be a way for me to include the
13 * file without worrying about whether com_err.h includes it or not,
14 * but varargs.h doesn't define anything that I can use as a flag, and
15 * gcc will lose if I try to include it twice and redefine stuff.
17 #if !defined(__STDC__) || !defined(ibm032) || !defined(NeXT)
18 #define ss_error ss_error_external
21 #include "copyright.h"
23 #include "ss_internal.h"
33 char * ss_name(sci_idx)
36 register char *ret_val;
37 register ss_data *infop;
39 infop = ss_info(sci_idx);
40 if (infop->current_request == (char const *)NULL) {
41 ret_val = malloc((unsigned)
42 (strlen(infop->subsystem_name)+1)
44 if (ret_val == (char *)NULL)
46 strcpy(ret_val, infop->subsystem_name);
51 register char const *cp1;
52 ret_val = malloc((unsigned)sizeof(char) *
53 (strlen(infop->subsystem_name)+
54 strlen(infop->current_request)+
57 cp1 = infop->subsystem_name;
62 cp1 = infop->current_request;
72 void ss_error (int sci_idx, long code, const char * fmt, ...)
74 void ss_error (va_alist)
78 register char const *whoami;
85 sci_idx = va_arg (pvar, int);
86 code = va_arg (pvar, long);
87 fmt = va_arg (pvar, char *);
91 whoami = ss_name (sci_idx);
92 com_err_va (whoami, code, fmt, pvar);
97 void ss_perror (sci_idx, code, msg) /* for compatibility */
102 ss_error (sci_idx, code, "%s", msg);