home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / GNU_ATP_1_40.lzh / EDITLINE / sysos9.c < prev    next >
Text File  |  1993-05-01  |  1KB  |  47 lines

  1. /*  $Revision: 1.1 $
  2. **
  3. **  OS-9 system-dependant routines for editline library.
  4. */
  5. #include "editline.h"
  6. #include <sgstat.h>
  7. #include <modes.h>
  8.  
  9.  
  10. void
  11. rl_ttyset(Reset)
  12.     int            Reset;
  13. {
  14.     static struct sgbuf    old;
  15.     struct sgbuf    new;
  16.  
  17.  
  18.     if (Reset == 0) {
  19.         _gs_opt(0, &old);
  20.         _gs_opt(0, &new);
  21.         new.sg_backsp = 0;    new.sg_delete = 0;    new.sg_echo = 0;
  22.         new.sg_alf = 0;        new.sg_nulls = 0;    new.sg_pause = 0;
  23.         new.sg_page = 0;    new.sg_bspch = 0;    new.sg_dlnch = 0;
  24.         new.sg_eorch = 0;    new.sg_eofch = 0;    new.sg_rlnch = 0;
  25.         new.sg_dulnch = 0;    new.sg_psch = 0;    new.sg_kbich = 0;
  26.         new.sg_kbach = 0;    new.sg_bsech = 0;    new.sg_bellch = 0;
  27.         new.sg_xon = 0;        new.sg_xoff = 0;    new.sg_tabcr = 0;
  28.         new.sg_tabsiz = 0;
  29.         _ss_opt(0, &new);
  30.         rl_erase = old.sg_bspch;
  31.         rl_kill = old.sg_dlnch;
  32.         rl_eof = old.sg_eofch;
  33.         rl_intr = old.sg_kbich;
  34.         rl_quit = -1;
  35.     }
  36.     else
  37.         _ss_opt(0, &old);
  38. }
  39.  
  40. void
  41. rl_add_slash(path, p)
  42.     char    *path;
  43.     char    *p;
  44. {
  45.     (void)strcat(p, access(path, S_IREAD | S_IFDIR) ? " " : "/");
  46. }
  47.