home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d109 / uupc.lha / UUpc / Source / LOCAL / mlib.c < prev    next >
C/C++ Source or Header  |  1987-10-28  |  478b  |  44 lines

  1. /*        lib.c
  2.  
  3.  
  4.         Amiga library
  5.         
  6.  
  7.     Things to do in uu host
  8.  
  9.         serial I/O
  10.         
  11.         directory stuff
  12.             opendir, readdir, closedir
  13.  
  14.         prolog and epilog
  15.  
  16.         system call
  17.  
  18. */
  19.  
  20. #include <stdio.h>
  21. #include "host.h"
  22. #include <sgtty.h>
  23.  
  24. int get_one()
  25. {
  26.     char c;
  27.     
  28.     struct sgttyb stty, sttyo;
  29.     ioctl( 0, TIOCGETP, &stty );
  30.     sttyo = stty;
  31.     stty.sg_flags |= RAW;
  32. /*    stty.sg_flags &= ~ ECHO; */
  33.     ioctl( 0, TIOCSETP, &stty );
  34.  
  35.     c = fgetc( stdin );
  36.     ioctl( 0, TIOCSETP, &sttyo );
  37.  
  38.     return( c );
  39. }
  40.  
  41.  
  42.  
  43.  
  44.