2 * Copyright 1987, 1988 by MIT Student Information Processing Board
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose is hereby granted, provided that
6 * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
7 * advertising or publicity pertaining to distribution of the software
8 * without specific, written prior permission. M.I.T. and the
9 * M.I.T. S.I.P.B. make no representations about the suitability of
10 * this software for any purpose. It is provided "as is" without
11 * express or implied warranty.
15 #define _ss_h __FILE__
17 #include <ss/ss_err.h>
20 #define __SS_CONST const
21 #define __SS_PROTO (int, const char * const *, int, void *)
27 typedef __SS_CONST struct _ss_request_entry {
28 __SS_CONST char * __SS_CONST *command_names; /* whatever */
29 void (* __SS_CONST function) __SS_PROTO; /* foo */
30 __SS_CONST char * __SS_CONST info_string; /* NULL */
34 typedef __SS_CONST struct _ss_request_table {
36 ss_request_entry *requests;
39 #define SS_RQT_TBL_V2 2
41 typedef struct _ss_rp_options { /* DEFAULT VALUES */
42 int version; /* SS_RP_V1 */
43 void (*unknown) __SS_PROTO; /* call for unknown command */
50 #define SS_OPT_DONT_LIST 0x0001
51 #define SS_OPT_DONT_SUMMARIZE 0x0002
53 void ss_help __SS_PROTO;
55 char *ss_current_request(); /* This is actually a macro */
58 char *ss_name(int sci_idx);
59 void ss_error (int, long, char const *, ...);
60 void ss_perror (int, long, char const *);
61 int ss_create_invocation(const char *, const char *, void *,
62 ss_request_table *, int *);
63 void ss_delete_invocation(int);
65 int ss_execute_line(int, char *);
66 void ss_add_request_table(int, ss_request_table *, int, int *);
67 void ss_delete_request_table(int, ss_request_table *, int *);
68 void ss_abort_subsystem(int sci_idx, int code);
69 void ss_quit(int argc, const char * const *argv, int sci_idx, void *infop);
70 void ss_self_identify(int argc, const char * const *argv, int sci_idx, void *infop);
71 void ss_subsystem_name(int argc, const char * const *argv,
72 int sci_idx, void *infop);
73 void ss_subsystem_version(int argc, const char * const *argv,
74 int sci_idx, void *infop);
75 void ss_unimplemented(int argc, const char * const *argv,
76 int sci_idx, void *infop);
81 int ss_create_invocation();
82 void ss_delete_invocation();
84 int ss_execute_line();
85 void ss_add_request_table();
86 void ss_delete_request_table();
87 void ss_abort_subsystem();
89 void ss_self_identify();
90 void ss_subsystem_name();
91 void ss_subsystem_version();
92 void ss_unimplemented();
94 extern ss_request_table ss_std_requests;