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
6 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, see the file
13 /* Prototype for -Wmissing-prototypes */
14 Code_t
ZGetLocations(ZLocations_t
*location
, int *numlocs
);
16 Code_t
ZGetLocations(ZLocations_t
*location
, int *numlocs
)
21 return (ZERR_NOLOCATIONS
);
24 if (__locate_next
== __locate_num
) {
25 return (ZERR_NOMORELOCS
);
28 for (i
= 0; i
< MIN(*numlocs
, __locate_num
- __locate_next
); i
++) {
29 location
[i
] = __locate_list
[i
+ __locate_next
];
32 if (__locate_num
- __locate_next
< *numlocs
) {
33 *numlocs
= __locate_num
- __locate_next
;
36 __locate_next
+= *numlocs
;