/[rdesktop]/sourceforge.net/trunk/rdesktop/serial.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/serial.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 795 by stargo, Wed Nov 3 13:56:52 2004 UTC revision 799 by stargo, Sat Nov 6 17:27:45 2004 UTC
# Line 3  Line 3 
3  #include <termios.h>  #include <termios.h>
4  #include <strings.h>  #include <strings.h>
5  #include <sys/ioctl.h>  #include <sys/ioctl.h>
6    
7    #ifdef HAVE_SYS_MODEM_H
8    #include <sys/modem.h>
9    #endif
10    #ifdef HAVE_SYS_FILIO_H
11    #include <sys/filio.h>
12    #endif
13    #ifdef HAVE_SYS_STRTIO_H
14    #include <sys/strtio.h>
15    #endif
16    
17  #include "rdesktop.h"  #include "rdesktop.h"
18    
19  #ifdef WITH_DEBUG_SERIAL  #ifdef WITH_DEBUG_SERIAL
# Line 111  Line 122 
122  /* FIONREAD should really do the same thing as TIOCINQ, where it is  /* FIONREAD should really do the same thing as TIOCINQ, where it is
123   * not available */   * not available */
124  #ifndef TIOCINQ  #ifndef TIOCINQ
 #include <sys/filio.h>  
125  #define TIOCINQ FIONREAD  #define TIOCINQ FIONREAD
126  #endif  #endif
127    
# Line 385  set_termios(SERIAL_DEVICE * pser_inf, NT Line 395  set_termios(SERIAL_DEVICE * pser_inf, NT
395                          break;                          break;
396          }          }
397    
398  #if 0  #ifdef CBAUD
399            ptermios->c_cflag &= ~CBAUD;
400            ptermios->c_cflag |= speed;
401    #else
402          /* on systems with separate ispeed and ospeed, we can remember the speed          /* on systems with separate ispeed and ospeed, we can remember the speed
403             in ispeed while changing DTR with ospeed */             in ispeed while changing DTR with ospeed */
404          cfsetispeed(pser_inf->ptermios, speed);          cfsetispeed(pser_inf->ptermios, speed);
405          cfsetospeed(pser_inf->ptermios, pser_inf->dtr ? speed : 0);          cfsetospeed(pser_inf->ptermios, pser_inf->dtr ? speed : 0);
406  #endif  #endif
407    
         ptermios->c_cflag &= ~CBAUD;  
         ptermios->c_cflag |= speed;  
   
408          ptermios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CSIZE | CRTSCTS);          ptermios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CSIZE | CRTSCTS);
409          switch (pser_inf->stop_bits)          switch (pser_inf->stop_bits)
410          {          {

Legend:
Removed from v.795  
changed lines
  Added in v.799

  ViewVC Help
Powered by ViewVC 1.1.26