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

Comparing ray/src/rt/tty.c (file contents):
Revision 2.3 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.4 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 20 | Line 20 | static const char      RCSid[] = "$Id$";
20   */
21  
22   struct sgttyb  ttymode;                 /* original tty modes */
23
23   int  ttyfd;                             /* tty file descriptor */
25
24   struct driver  *ttydev;                 /* tty device */
25  
26 + static dr_cominf_t ttyin;
27 + static dr_getchf_t;
28 + static void ttydone(void);
29 + static void newinp(void);
30  
31 < ttyset(dev, fd)                         /* set up raw tty device */
32 < struct driver  *dev;
33 < int  fd;
31 >
32 > extern void /* XXX declare */
33 > ttyset(                         /* set up raw tty device */
34 >        struct driver  *dev,
35 >        int  fd
36 > )
37   {
33        int  ttyin(), newinp();
38          struct sgttyb  flags;
39  
40          if (!isatty(fd))
# Line 52 | Line 56 | int  fd;
56   }
57  
58  
59 < ttydone()                               /* restore tty modes */
59 > static void
60 > ttydone(void)                           /* restore tty modes */
61   {
62          fcntl(ttyfd, F_SETFL, 0);
63          signal(SIGIO, SIG_DFL);
# Line 63 | Line 68 | ttydone()                              /* restore tty modes */
68   }
69  
70  
71 < int
72 < getch()                                 /* get a character in raw mode */
71 > static int
72 > getch(void)                                     /* get a character in raw mode */
73   {
74          register int  c;
75  
# Line 77 | Line 82 | getch()                                        /* get a character in raw mode */
82   }
83  
84  
85 < static
86 < ttyin(buf, prompt)                      /* read a line in raw mode */
87 < char  *buf, *prompt;
85 > static void
86 > ttyin(                  /* read a line in raw mode */
87 >        char  *buf,
88 >        char  *prompt
89 > )
90   {
84        int  getch();
91  
92          if (prompt != NULL)
93                  (*ttydev->comout)(prompt);
# Line 89 | Line 95 | char  *buf, *prompt;
95   }
96  
97  
98 < static
99 < newinp()                                /* new input */
98 > static void
99 > newinp(void)                            /* new input */
100   {
101          ttydev->inpready++;
102   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines