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
rl_ttyset(Reset)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_set_cntrl_char(-1,old.sg_bspch, old.sg_eofch, old.sg_kbich, old.sg_dlnch);
31 #if 0
32 rl_quit = -1;
33 rl_erase = old.sg_bspch;
34 rl_eof = old.sg_eofch;
35 rl_intr = old.sg_kbich;
36 rl_kill = old.sg_dlnch;
37 #endif
38 }
39 else
40 _ss_opt(0, &old);
41 }
42
43 void
rl_add_slash(path,p)44 rl_add_slash(path, p)
45 char *path;
46 char *p;
47 {
48 (void)strcat(p, access(path, S_IREAD | S_IFDIR) ? " " : "/");
49 }
50