X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxplink.c;h=2505cb2a0637b648830710eba0ecdd8f860b65f5;hb=d83cd2f79bba111660262af0827296cb76e17040;hp=69816dccca777604bdc9b50775e2fa517758e437;hpb=fb581ac62541bfe09ebbc1de07ef678998b9a539;p=PuTTY.git diff --git a/unix/uxplink.c b/unix/uxplink.c index 69816dcc..2505cb2a 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -135,9 +135,11 @@ void ldisc_update(void *frontend, int echo, int edit) if (edit) { mode.c_iflag |= ICRNL; mode.c_lflag |= ISIG | ICANON; + mode.c_oflag |= OPOST; } else { mode.c_iflag &= ~ICRNL; mode.c_lflag &= ~(ISIG | ICANON); + mode.c_oflag &= ~OPOST; /* Solaris sets these to unhelpful values */ mode.c_cc[VMIN] = 1; mode.c_cc[VTIME] = 0; @@ -268,6 +270,22 @@ char *get_ttymode(void *frontend, const char *mode) #if defined(IXANY) GET_BOOL("IXANY", IXANY, c_iflag, ); #endif + /* Configuration of OPOST */ +#if defined(OLCUC) + GET_BOOL("OLCUC", OLCUC, c_oflag, ); +#endif +#if defined(ONLCR) + GET_BOOL("ONLCR", ONLCR, c_oflag, ); +#endif +#if defined(OCRNL) + GET_BOOL("OCRNL", OCRNL, c_oflag, ); +#endif +#if defined(ONOCR) + GET_BOOL("ONOCR", ONOCR, c_oflag, ); +#endif +#if defined(ONLCR) + GET_BOOL("ONLRET", ONLRET, c_oflag, ); +#endif /* * Modes that want to be set in only one place, and that we have @@ -288,6 +306,9 @@ char *get_ttymode(void *frontend, const char *mode) #if defined(IXOFF) GET_BOOL("IXOFF", IXOFF, c_iflag, ); #endif +#if defined(OPOST) + GET_BOOL("OPOST", OPOST, c_oflag, ); +#endif /* * We do not propagate the following modes: @@ -296,12 +317,12 @@ char *get_ttymode(void *frontend, const char *mode) * IGNPAR PARMRK INPCK CS7 CS8 PARENB PARODD * - Things that want to be enabled in one place that we don't * squash locally. - * IUCLC OLCUC + * IUCLC * - Status bits. * PENDIN * - Things I don't know what to do with. (FIXME) - * ISTRIP IMAXBEL NOFLSH TOSTOP IEXTEN OPOST - * INLCR IGNCR ICRNL ONLCR OCRNL ONOCR ONLRET + * ISTRIP IMAXBEL NOFLSH TOSTOP IEXTEN + * INLCR IGNCR ICRNL */ #undef GET_CHAR