summaryrefslogtreecommitdiff
path: root/lib/libss
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-11-16 21:53:13 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-11-16 21:53:13 +0000
commit6e21d0e99052f9aa63f868f8cca92af2bf9df8c4 (patch)
treeb7b65b9b90c06fd1540ea0674cd3917b57a5117d /lib/libss
parent323b04aa2a18a840696e1f531c46df669f2a979a (diff)
Fix more libss stuff.
Diffstat (limited to 'lib/libss')
-rw-r--r--lib/libss/Makefile20
-rw-r--r--lib/libss/ss.h65
2 files changed, 75 insertions, 10 deletions
diff --git a/lib/libss/Makefile b/lib/libss/Makefile
index 8af91083a49..69af3eb9695 100644
--- a/lib/libss/Makefile
+++ b/lib/libss/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 1996/11/15 09:25:23 downsj Exp $
+# $OpenBSD: Makefile,v 1.2 1996/11/16 21:53:11 downsj Exp $
LIB= ss
+HDRS= ss.h ss_err.h
SRCS= ss_err.c data.c error.c execute_cmd.c help.c invocation.c list_rqs.c \
listen.c pager.c parse.c prompt.c request_tbl.c requests.c \
std_rqs.c
@@ -18,15 +19,14 @@ std_rqs.c: ${.CURDIR}/std_rqs.ct
mk_cmds std_rqs.ct
-test -h std_rqs.ct && rm std_rqs.ct
-includes: ss_err.h
- -cd ${.OBJDIR}; \
- if [ -f ss_err.h ]; then \
- cmp -s ss_err.h ${DESTDIR}/usr/include/ss/ss_err.h || \
- install -c -o ${BINOWN} -g ${BINGRP} -m 444 ss_err.h \
- ${DESTDIR}/usr/include/ss; \
- else \
- true; \
- fi
+includes:
+ @cd ${.CURDIR}; for i in $(HDRS); do \
+ j="cmp -s $$i ${DESTDIR}/usr/include/ss/$$i || \
+ install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
+ ${DESTDIR}/usr/include/ss"; \
+ echo $$j; \
+ eval "$$j"; \
+ done
beforedepend:
test -h ss || ln -s . ss
diff --git a/lib/libss/ss.h b/lib/libss/ss.h
new file mode 100644
index 00000000000..0afcef2e83e
--- /dev/null
+++ b/lib/libss/ss.h
@@ -0,0 +1,65 @@
+/* $OpenBSD: ss.h,v 1.1 1996/11/16 21:53:12 downsj Exp $ */
+
+/*-
+ * Copyright 1987, 1988 by the Student Information Processing Board
+ * of the Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * and its documentation for any purpose and without fee is
+ * hereby granted, provided that the above copyright notice
+ * appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation,
+ * and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+ * used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * M.I.T. and the M.I.T. S.I.P.B. make no representations about
+ * the suitability of this software for any purpose. It is
+ * provided "as is" without express or implied warranty.
+ */
+
+#ifndef _SS_H
+#define _SS_H
+
+#include <sys/cdefs.h>
+
+#ifndef NO_SS_ERR_H
+#include <ss/ss_err.h>
+#endif
+
+typedef const struct _ss_request_entry {
+ const char * const *command_names; /* whatever */
+ void (* const function) __P((int, const char * const *, int, void *));
+ const char * const info_string; /* NULL */
+ int flags; /* 0 */
+} ss_request_entry;
+
+typedef const struct _ss_request_table {
+ int version;
+ ss_request_entry *requests;
+} ss_request_table;
+
+#define SS_RQT_TBL_V2 2
+
+typedef struct _ss_rp_options { /* DEFAULT VALUES */
+ int version; /* SS_RP_V1 */
+ void (*unknown) __P((int, const char * const *, int, void *)); /* call for unknown command */
+ int allow_suspend;
+ int catch_int;
+} ss_rp_options;
+
+#define SS_RP_V1 1
+
+#define SS_OPT_DONT_LIST 0x0001
+#define SS_OPT_DONT_SUMMARIZE 0x0002
+
+void ss_help __P((int, const char * const *, int, void *));
+char *ss_current_request();
+char *ss_name();
+void ss_error __P((int, long, char const *, ...));
+void ss_perror __P((int, long, char const *));
+int ss_create_invocation __P((char *, char *, char *, ss_request_table *, int *));
+int ss_listen(int);
+void ss_abort_subsystem();
+
+extern ss_request_table ss_std_requests;
+#endif /* _SS_H */