home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / os9 / os9raw.c < prev    next >
C/C++ Source or Header  |  2020-01-01  |  1KB  |  50 lines

  1. /*
  2.  * os9raw.c Uncook and cook rbf devices for os9 kermit
  3.  */
  4.  
  5. #include "os9inc.h"
  6.  
  7. /*
  8.  * 06/30/85 ral Initial coding, partially adapted from 
  9.  *              code by Bradley Bosch
  10.  */
  11.  
  12. /* save current state in savesg and force path into raw mode */
  13. raw(path, savesg)   
  14. int             path;
  15. struct sgbuf    *savesg;
  16. {
  17.     struct sgbuf    tempsg;
  18.  
  19.     getstat(0, path, savesg);
  20.     getstat(0, path, &tempsg);
  21.     if(tempsg.sg_class==0){  /* only change things for scf */ 
  22.         /* Microware C generates better code with 0 only specified once */
  23.         tempsg.sg_delete=
  24.         tempsg.sg_backsp=
  25.         tempsg.sg_echo  =
  26.         tempsg.sg_alf   =
  27.         tempsg.sg_pause =
  28.         tempsg.sg_dlnch =
  29.         tempsg.sg_eorch =
  30.         tempsg.sg_eofch =
  31.         tempsg.sg_rlnch =
  32.         tempsg.sg_dulnch=
  33.         tempsg.sg_psch  =
  34.         tempsg.sg_kbich =
  35.         tempsg.sg_kbach = 0;
  36. #ifdef SGXONOFF
  37.         tempsg.sg_xon   =
  38.         tempsg.sg_xoff  = 0;
  39. #endif
  40.         setstat(0, path, &tempsg);
  41.     }
  42. }
  43.  
  44. cook(path, savesg) 
  45. int             path;
  46. struct sgbuf    *savesg;
  47. {
  48.         setstat(0, path, savesg);
  49. }
  50.