1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains source for the ZGetLocations function.
4 * Created by: Robert French
8 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
9 * For copying and distribution information, see the file
14 static const char rcsid_ZGetLocations_c[] = "$Id$";
19 #define min(a,b) ((a)<(b)?(a):(b))
22 ZGetLocations(ZLocations_t *location,
28 return (ZERR_NOLOCATIONS);
30 if (__locate_next == __locate_num)
31 return (ZERR_NOMORELOCS);
33 for (i=0;i<min(*numlocs, __locate_num-__locate_next);i++)
34 location[i] = __locate_list[i+__locate_next];
36 if (__locate_num-__locate_next < *numlocs)
37 *numlocs = __locate_num-__locate_next;
39 __locate_next += *numlocs;