2 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 #pragma ident "%Z%%M% %I% %E% SMI"
9 * Copyright 1987, 1988, 1989 by MIT Student Information Processing
12 * For copyright information, see copyright.h.
17 #include "copyright.h"
19 #include "ss_internal.h"
21 char * ss_name(sci_idx
)
24 register char *ret_val
;
25 register ss_data
*infop
;
27 infop
= ss_info(sci_idx
);
28 if (infop
->current_request
== (char const *)NULL
) {
29 ret_val
= malloc((unsigned)
30 (strlen(infop
->subsystem_name
)+1)
32 if (ret_val
== (char *)NULL
)
34 strcpy(ret_val
, infop
->subsystem_name
);
39 register char const *cp1
;
40 ret_val
= malloc((unsigned)sizeof(char) *
41 (strlen(infop
->subsystem_name
)+
42 strlen(infop
->current_request
)+
45 cp1
= infop
->subsystem_name
;
50 cp1
= infop
->current_request
;
59 void ss_error (int sci_idx
, long code
, const char * fmt
, ...)
61 register char *whoami
;
64 whoami
= ss_name (sci_idx
);
65 com_err_va (whoami
, code
, fmt
, pvar
);
70 void ss_perror (sci_idx
, code
, msg
) /* for compatibility */
75 ss_error (sci_idx
, code
, "%s", msg
);