]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - lib/ZPending.c
Initial revision
[1ts-debian.git] / lib / ZPending.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains source for the ZPending function.
3  *
4  *      Created by:     Robert French
5  *
6  *      $Id: ZPending.c,v 1.8 1999/01/22 23:19:20 ghudson Exp $
7  *
8  *      Copyright (c) 1987 by the Massachusetts Institute of Technology.
9  *      For copying and distribution information, see the file
10  *      "mit-copyright.h". 
11  */
12
13 #ifndef lint
14 static char rcsid_ZPending_c[] = "$Id: ZPending.c,v 1.8 1999/01/22 23:19:20 ghudson Exp $";
15 #endif
16
17 #include <internal.h>
18
19 int ZPending()
20 {
21         int retval;
22         
23         if (ZGetFD() < 0) {
24                 errno = ZERR_NOPORT;
25                 return (-1);
26         }
27         
28         if ((retval = Z_ReadEnqueue()) != ZERR_NONE) {
29                 errno = retval;
30                 return (-1);
31         } 
32         
33         return(ZQLength());
34 }