| 3 * |
3 * |
| 4 * Created by: Robert French |
4 * Created by: Robert French |
| 5 * |
5 * |
| 6 * Copyright (c) 1987 by the Massachusetts Institute of Technology. |
6 * Copyright (c) 1987 by the Massachusetts Institute of Technology. |
| 7 * For copying and distribution information, see the file |
7 * For copying and distribution information, see the file |
| 8 * "mit-copyright.h". |
8 * "mit-copyright.h". |
| 9 */ |
9 */ |
| 10 |
10 |
| 11 #include "internal.h" |
11 #include "internal.h" |
| 12 |
12 |
| 13 int ZPending() |
13 int ZPending() |
| 14 { |
14 { |
| 15 int retval; |
15 int retval; |
| 16 |
16 |
| 17 if (ZGetFD() < 0) { |
17 if (ZGetFD() < 0) { |
| 18 errno = ZERR_NOPORT; |
18 errno = ZERR_NOPORT; |
| 19 return (-1); |
19 return (-1); |
| 20 } |
20 } |
| 21 |
21 |
| 22 if ((retval = Z_ReadEnqueue()) != ZERR_NONE) { |
22 if ((retval = Z_ReadEnqueue()) != ZERR_NONE) { |
| 23 errno = retval; |
23 errno = retval; |
| 24 return (-1); |
24 return (-1); |
| 25 } |
25 } |
| 26 |
26 |
| 27 return(ZQLength()); |
27 return(ZQLength()); |
| 28 } |
28 } |