From e85212e9bd725eda9c1ca3667ee5bbf4d4316379 Mon Sep 17 00:00:00 2001 From: "Robert S. French" Date: Thu, 9 Jul 1987 16:02:06 +0000 Subject: Initial revision --- lib/ZGetSubs.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/ZGetSubs.c (limited to 'lib/ZGetSubs.c') diff --git a/lib/ZGetSubs.c b/lib/ZGetSubs.c new file mode 100644 index 0000000..002a473 --- /dev/null +++ b/lib/ZGetSubs.c @@ -0,0 +1,42 @@ +/* This file is part of the Project Athena Zephyr Notification System. + * It contains source for the ZGetSubscriptions function. + * + * Created by: Robert French + * + * $Source$ + * $Author$ + * + * Copyright (c) 1987 by the Massachusetts Institute of Technology. + * For copying and distribution information, see the file + * "mit-copyright.h". + */ +/* $Header$ */ + +#include + +#include + +#define min(a,b) ((a)<(b)?(a):(b)) + +Code_t ZGetSubscriptions(subscription,numsubs) + ZSubscription_t *subscription; + int *numsubs; +{ + int i; + + if (!__subscriptions_list) + return (ZERR_NOSUBSCRIPTIONS); + + if (__subscriptions_next == __subscriptions_num) + return (ZERR_NOMORESUBSCRIPTIONS); + + for (i=0;i