Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Deprecated/old_18mar_diff/nto/raw.cpp File Reference

#include <termios.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>

Go to the source code of this file.

Functions

int dev_raw (int fd)
int dev_unraw (int fd)


Function Documentation

int dev_raw int    fd
 

Definition at line 14 of file raw.cpp.

00015  {
00016          struct termios termios_p;
00017 
00018          if (tcgetattr (fd, &termios_p))
00019                  return (-1);
00020 
00021          termios_p.c_cc[VMIN] = 1;
00022          termios_p.c_cc[VTIME] = 0;
00023          termios_p.c_lflag &= ~(ECHO | ICANON | ISIG |
00024                  ECHOE | ECHOK | ECHONL);
00025          termios_p.c_oflag &= ~(OPOST);
00026          return (tcsetattr (fd, TCSANOW, &termios_p));
00027  }

int dev_unraw int    fd
 

Definition at line 29 of file raw.cpp.

00030  {
00031          struct termios termios_p;
00032 
00033          if (tcgetattr (fd, &termios_p))
00034                  return (-1);
00035 
00036          termios_p.c_lflag |= (ECHO | ICANON | ISIG |
00037                  ECHOE | ECHOK | ECHONL);
00038          termios_p.c_oflag |= (OPOST);
00039          return (tcsetattr (fd, TCSAFLUSH, &termios_p));
00040  }


Generated on Sun Oct 14 18:47:22 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001