1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
3 * Copyright 1987, 1988 by MIT Student Information Processing Board
5 * For copyright information, see mit-sipb-copyright.h.
12 #include <ss/ss_err.h>
15 #define __SS_CONST const
16 #define __SS_PROTO (int, const char * const *, int, void *)
22 typedef __SS_CONST struct _ss_request_entry {
23 __SS_CONST char * __SS_CONST *command_names; /* whatever */
24 void (* __SS_CONST function) __SS_PROTO; /* foo */
25 __SS_CONST char * __SS_CONST info_string; /* NULL */
29 typedef __SS_CONST struct _ss_request_table {
31 ss_request_entry *requests;
34 #define SS_RQT_TBL_V2 2
36 typedef struct _ss_rp_options { /* DEFAULT VALUES */
37 int version; /* SS_RP_V1 */
38 void (*unknown) __SS_PROTO; /* call for unknown command */
45 #define SS_OPT_DONT_LIST 0x0001
46 #define SS_OPT_DONT_SUMMARIZE 0x0002
48 void ss_help __SS_PROTO;
49 void ss_list_requests __SS_PROTO;
50 void ss_quit __SS_PROTO;
51 char *ss_current_request();
53 void ss_error (int, long, char const *, ...)
54 #if !defined(__cplusplus) && (__GNUC__ > 2)
55 __attribute__((__format__(__printf__, 3, 4)))
58 void ss_perror (int, long, char const *);
60 int ss_create_invocation(char *, char *, char *, ss_request_table *, int *);
61 void ss_delete_invocation(int);
62 void ss_add_info_dir(int , char *, int *);
63 void ss_delete_info_dir(int , char *, int *);
64 int ss_execute_command(int sci_idx, char **);
65 void ss_abort_subsystem(int, int);
66 void ss_set_prompt(int, char *);
67 char *ss_get_prompt(int);
68 void ss_add_request_table(int, ss_request_table *, int, int *);
69 void ss_delete_request_table(int, ss_request_table *, int *);
70 int ss_execute_line (int, char*);
71 extern ss_request_table ss_std_requests;