2 * Copyright 1987, 1988, 1989 by MIT Student Information Processing
5 * Permission to use, copy, modify, and distribute this software and
6 * its documentation for any purpose is hereby granted, provided that
7 * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
8 * advertising or publicity pertaining to distribution of the software
9 * without specific, written prior permission. M.I.T. and the
10 * M.I.T. S.I.P.B. make no representations about the suitability of
11 * this software for any purpose. It is provided "as is" without
12 * express or implied warranty.
18 #include "ss_internal.h"
22 char * ss_name(sci_idx)
25 register char *ret_val;
26 register ss_data *infop;
28 infop = ss_info(sci_idx);
29 if (infop->current_request == (char const *)NULL) {
30 ret_val = malloc((unsigned)
31 (strlen(infop->subsystem_name)+1)
33 if (ret_val == (char *)NULL)
35 strcpy(ret_val, infop->subsystem_name);
40 register char const *cp1;
41 ret_val = malloc((unsigned)sizeof(char) *
42 (strlen(infop->subsystem_name)+
43 strlen(infop->current_request)+
46 cp1 = infop->subsystem_name;
51 cp1 = infop->current_request;
60 void ss_error (int sci_idx, long code, const char * fmt, ...)
62 register char *whoami;
66 whoami = ss_name (sci_idx);
67 com_err_va (whoami, code, fmt, pvar);
72 void ss_perror (sci_idx, code, msg) /* for compatibility */
77 ss_error (sci_idx, code, "%s", msg);