[BACK]Return to ttyio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/ttyio.c between version 1.25 and 1.26

version 1.25, 2003/12/04 01:37:28 version 1.26, 2005/04/03 02:09:28
Line 7 
Line 7 
  * keyboard characters, and write characters to the display in a barely   * keyboard characters, and write characters to the display in a barely
  * buffered fashion.   * buffered fashion.
  */   */
 #include        "def.h"  #include "def.h"
   
 #include        <sys/types.h>  #include <sys/types.h>
 #include        <sys/time.h>  #include <sys/time.h>
 #include        <sys/ioctl.h>  #include <sys/ioctl.h>
 #include        <fcntl.h>  #include <fcntl.h>
 #include        <termios.h>  #include <termios.h>
 #include        <term.h>  #include <term.h>
   
 #define NOBUF   512                     /* Output buffer size. */  #define NOBUF   512                     /* Output buffer size. */
   
Line 136 
Line 136 
 void  void
 ttflush(void)  ttflush(void)
 {  {
         ssize_t written;          ssize_t  written;
         char *buf = obuf;          char    *buf = obuf;
   
         if (nobuf == 0)          if (nobuf == 0)
                 return;                  return;
Line 159 
Line 159 
 ttgetc(void)  ttgetc(void)
 {  {
         char    c;          char    c;
         int ret;          int     ret;
   
         do {          do {
                 ret = read(0, &c, 1);                  ret = read(0, &c, 1);
Line 200 
Line 200 
   
 /*  /*
  * This function returns FALSE if any characters have showed up on the   * This function returns FALSE if any characters have showed up on the
  * tty before 'msec' miliseconds.   * tty before 'msec' milliseconds.
  */   */
 int  int
 ttwait(int msec)  ttwait(int msec)

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26