ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhdisp.c
(Generate patch)

Comparing ray/src/hd/rhdisp.c (file contents):
Revision 3.40 by gwlarson, Thu Mar 4 10:14:52 1999 UTC vs.
Revision 3.42 by gwlarson, Thu Jul 29 15:38:40 1999 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
1 > /* Copyright (c) 1999 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ SGI";
# Line 22 | Line 22 | 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 */
# Line 40 | Line 46 | char   *progname;              /* global argv[0] */
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;
# Line 158 | Line 163 | disp_wait()                    /* wait for more input */
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines