requests.c revision 18a1444b4f1e6a0948fd38fa0de382d86cfe04de
1/*
2 * Various minor routines...
3 *
4 * Copyright 1987, 1988, 1989 by MIT
5 *
6 * Permission to use, copy, modify, and distribute this software and
7 * its documentation for any purpose is hereby granted, provided that
8 * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
9 * advertising or publicity pertaining to distribution of the software
10 * without specific, written prior permission.  M.I.T. and the
11 * M.I.T. S.I.P.B. make no representations about the suitability of
12 * this software for any purpose.  It is provided "as is" without
13 * express or implied warranty.
14 */
15
16#include <stdio.h>
17#include "ss_internal.h"
18
19#define	DECLARE(name) void name(int argc,const char * const *argv, \
20				int sci_idx, void *infop)
21
22/*
23 * ss_self_identify -- assigned by default to the "." request
24 */
25void ss_self_identify(int argc __SS_ATTR((unused)),
26		      const char * const *argv __SS_ATTR((unused)),
27		      int sci_idx, void *infop __SS_ATTR((unused)))
28{
29     register ss_data *info = ss_info(sci_idx);
30     printf("%s version %s\n", info->subsystem_name,
31	    info->subsystem_version);
32}
33
34/*
35 * ss_subsystem_name -- print name of subsystem
36 */
37void ss_subsystem_name(int argc __SS_ATTR((unused)),
38		       const char * const *argv __SS_ATTR((unused)),
39		       int sci_idx,
40		       void *infop __SS_ATTR((unused)))
41{
42     printf("%s\n", ss_info(sci_idx)->subsystem_name);
43}
44
45/*
46 * ss_subsystem_version -- print version of subsystem
47 */
48void ss_subsystem_version(int argc __SS_ATTR((unused)),
49			  const char * const *argv __SS_ATTR((unused)),
50			  int sci_idx,
51			  void *infop __SS_ATTR((unused)))
52{
53     printf("%s\n", ss_info(sci_idx)->subsystem_version);
54}
55
56/*
57 * ss_unimplemented -- routine not implemented (should be
58 * set up as (dont_list,dont_summarize))
59 */
60void ss_unimplemented(int argc __SS_ATTR((unused)),
61		      const char * const *argv __SS_ATTR((unused)),
62		      int sci_idx, void *infop __SS_ATTR((unused)))
63{
64     ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
65}
66