| 1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 1 |
> |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ SGI"; |
| 22 |
|
#define FSIZDEF 0.125 /* default focus frame size */ |
| 23 |
|
#endif |
| 24 |
|
|
| 25 |
+ |
#ifdef linux |
| 26 |
+ |
#define fbufcnt(f) ((f)->_IO_read_end - (f)->_IO_read_ptr) |
| 27 |
+ |
#else |
| 28 |
+ |
#define fbufcnt(f) ((f)->_cnt) |
| 29 |
+ |
#endif |
| 30 |
+ |
|
| 31 |
|
HOLO *hdlist[HDMAX+1]; /* global holodeck list */ |
| 32 |
|
|
| 33 |
|
char *hdgfn[HDMAX]; /* holodeck section geometry list */ |
| 46 |
|
FILE *sstdin, *sstdout; /* server's standard input and output */ |
| 47 |
|
|
| 48 |
|
#ifdef DEBUG |
| 43 |
– |
#include <sys/types.h> |
| 49 |
|
extern time_t time(); |
| 50 |
|
static time_t tmodesw; |
| 51 |
|
static time_t timm, tadd; |
| 163 |
|
if (hdlist[0] == NULL) |
| 164 |
|
return(RDY_SRV); /* initialize first */ |
| 165 |
|
flgs = 0; /* flag what's ready already */ |
| 166 |
< |
if (imm_mode || stdin->_cnt > 0) |
| 166 |
> |
if (imm_mode || fbufcnt(stdin) > 0) |
| 167 |
|
flgs |= RDY_SRV; |
| 168 |
< |
if (sstdin != NULL && sstdin->_cnt > 0) |
| 168 |
> |
if (sstdin != NULL && fbufcnt(sstdin) > 0) |
| 169 |
|
flgs |= RDY_SIN; |
| 170 |
|
if (odev.inpready) |
| 171 |
|
flgs |= RDY_DEV; |