Mercurial > hg > xemacs-beta
changeset 513:e159a0b4bed4
[xemacs-hg @ 2001-05-07 07:49:18 by martinb]
TTY configury portability improvements.
author | martinb |
---|---|
date | Mon, 07 May 2001 07:49:19 +0000 |
parents | 14227e8a3f1f |
children | c71c3dc03e4c |
files | src/ChangeLog src/depend src/sysdep.c src/systty.h |
diffstat | 4 files changed, 74 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon May 07 07:42:40 2001 +0000 +++ b/src/ChangeLog Mon May 07 07:49:19 2001 +0000 @@ -1,3 +1,21 @@ +2001-05-05 Martin Buchholz <martin@xemacs.org> + + TTY configury portability improvements. + Support systems which use OXTABS instead of TAB3, without any s&m. + * s/bsd386.h: Remove definitions for system symbols TABDLY and OXTABS. + * s/freebsd.h: Likewise. + * s/gnu.h: Likewise. + * s/netbsd.h: Likewise. + * s/nextstep.h: Remove definitions for TAB3 and BSD_TERMIOS. + * systty.h: + Fix up (unused) tty tab delay/expansion code. + Better preprocessor symbol hygiene. + Remove BSD_TERMIOS cruft. + * sysdep.c (child_setup_tty): More careful code. Check for OXTABS. + * sysdep.c (tty_init_sys_modes_on_device): + Tab expansion disabling code was buggy. So I fixed it. + But it shouldn't have been done at all. So I also #if 0'ed it. + 2001-05-06 Ben Wing <ben@xemacs.org> * console-msw.h:
--- a/src/depend Mon May 07 07:42:40 2001 +0000 +++ b/src/depend Mon May 07 07:49:19 2001 +0000 @@ -11,7 +11,7 @@ device-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysdep.h systime.h syswindows.h toolbar.h window.h winslots.h dialog-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h syscommctrl.h syswindows.h toolbar.h window.h winslots.h dired-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h mule-charset.h ndir.h nt.h regex.h sysdir.h sysfile.h sysproc.h systime.h syswindows.h -event-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lstream.h menubar-msw.h menubar.h mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h syscommctrl.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h toolbar.h window.h winslots.h +event-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lstream.h menubar-msw.h menubar.h mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h syscommctrl.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h toolbar.h window.h winslots.h frame-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h glyphs-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console.h device.h elhash.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h lstream.h mule-charset.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysfile.h syswindows.h toolbar.h window.h winslots.h gui-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h syscommctrl.h systime.h syswindows.h toolbar.h window.h winslots.h @@ -27,7 +27,7 @@ console-x.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h mule-charset.h process.h redisplay.h xintrinsic.h device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h chartab.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h -frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h dragdrop.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h +frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h dragdrop.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h imgproc.h insdel.h lstream.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h toolbar.h window.h winslots.h xintrinsic.h xmu.h gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h chartab.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h keymap.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h @@ -121,10 +121,10 @@ emodules.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console.h device.h emodules.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h toolbar.h window.h winslots.h esd.o: $(LISP_H) miscplay.h eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h chartab.h commands.h conslots.h console.h mule-charset.h opaque.h -event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h -event-stream.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h chartab.h commands.h conslots.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lstream.h macros.h menubar.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h +event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lstream.h mule-charset.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h +event-stream.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h chartab.h commands.h conslots.h console.h device.h elhash.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lstream.h macros.h menubar.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h event-unixoid.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h lstream.h mule-charset.h process.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h -events.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-gtk.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h +events.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-gtk.h console-tty.h console-x.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h extents.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h keymap.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h faces.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h file-coding.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h elhash.h file-coding.h insdel.h lstream.h mule-ccl.h mule-charset.h opaque.h @@ -144,7 +144,7 @@ glyphs-widget.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h chartab.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h mule-charset.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h gmalloc.o: config.h getpagesize.h -gpmevent.o: $(LISP_H) commands.h conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lstream.h mule-charset.h process.h sysdep.h sysproc.h syssignal.h systime.h systty.h +gpmevent.o: $(LISP_H) commands.h conslots.h console-tty.h console.h device.h events.h gpmevent.h lstream.h mule-charset.h process.h sysdep.h sysproc.h syssignal.h systime.h systty.h gtk-glue.o: gtk-xemacs.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console-gtk.h console.h device.h faces.h frame.h frameslots.h glyphs.h gtk-xemacs.h gui.h mule-charset.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h chartab.h elhash.h gui.h mule-charset.h @@ -159,7 +159,7 @@ input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h casetab.h chartab.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h xintrinsic.h insdel.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h toolbar.h window.h winslots.h intl.o: $(LISP_H) bytecode.h conslots.h console.h device.h -keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h chartab.h conslots.h console.h device.h elhash.h events-mod.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h +keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h chartab.h conslots.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h winslots.h lastfile.o: config.h libsst.o: $(LISP_H) libsst.h line-number.o: $(LISP_H) buffer.h bufslots.h casetab.h chartab.h line-number.h mule-charset.h
--- a/src/sysdep.c Mon May 07 07:42:40 2001 +0000 +++ b/src/sysdep.c Mon May 07 07:49:19 2001 +0000 @@ -456,10 +456,38 @@ assert (isatty(out)); s.main.c_oflag |= OPOST; /* Enable output postprocessing */ s.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL on output */ + + { + /* Disable all output delays. */ + tcflag_t delay_mask = 0; #ifdef NLDLY - s.main.c_oflag &= ~(NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY); - /* No output delays */ + delay_mask |= NLDLY; +#endif +#ifdef CRDLY + delay_mask |= CRDLY; +#endif +#ifdef TABDLY + delay_mask |= TABDLY; /* Also disables tab expansion (Posix). */ +#endif +#ifdef BSDLY + delay_mask |= BSDLY; +#endif +#ifdef VTDLY + delay_mask |= VTDLY; #endif +#ifdef FFDLY + delay_mask |= FFDLY; +#endif + s.main.c_oflag &= ~delay_mask; + } + +#ifdef OXTABS + /* Posix defines the TAB3 value for TABDLY to mean: expand tabs to spaces. + On those systems tab expansion would be disabled by the above code. + BSD systems use an independent flag, OXTABS. */ + s.main.c_oflag &= ~OXTABS; /* Disable tab expansion */ +#endif + s.main.c_lflag &= ~ECHO; /* Disable echo */ s.main.c_lflag |= ISIG; /* Enable signals */ #ifdef IUCLC @@ -468,7 +496,7 @@ #ifdef OLCUC s.main.c_oflag &= ~OLCUC; /* Disable upcasing on output. */ #endif - s.main.c_oflag &= ~TAB3; /* Disable tab expansion */ + #if defined (CSIZE) && defined (CS8) s.main.c_cflag = (s.main.c_cflag & ~CSIZE) | CS8; /* Don't strip 8th bit */ #endif @@ -1590,7 +1618,17 @@ tty.main.c_iflag &= ~IXON; /* Disable start/stop output control */ tty.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL on output */ - tty.main.c_oflag &= ~TAB3; /* Disable tab expansion */ + +#if 0 + /* We used to disable tab expansion here, but this is the user's decision. */ +#if defined (TABDLY) && defined (TAB3) + if ((tty.main.c_oflag & TABDLY) == TAB3) + tty.main.c_oflag &= ~TABDLY; /* Disable tab expansion (Posix). */ +#elif defined (OXTABS) + tty.main.c_oflag &= ~OXTABS; /* Disable tab expansion (BSD). */ +#endif +#endif /* 0 */ + #ifdef CS8 if (TTY_FLAGS (con).meta_key) { @@ -3017,7 +3055,7 @@ Extcount external_len = strlen (rtnval->d_name); const Bufbyte *internal_name; Bytecount internal_len; - + TO_INTERNAL_FORMAT (DATA, (external_name, external_len), ALLOCA, (internal_name, internal_len), Qfile_name);
--- a/src/systty.h Mon May 07 07:42:40 2001 +0000 +++ b/src/systty.h Mon May 07 07:49:19 2001 +0000 @@ -27,29 +27,6 @@ # define HAVE_TCATTR #endif -/* If we defined these before and we are about to redefine them, - prevent alarming warnings. */ -#ifdef BSD_TERMIOS -#undef NL0 -#undef NL1 -#undef CR0 -#undef CR1 -#undef CR2 -#undef CR3 -#undef TAB0 -#undef TAB1 -#undef TAB2 -#undef XTABS -#undef BS0 -#undef BS1 -#undef FF0 -#undef FF1 -#undef ECHO -#undef NOFLSH -#undef TOSTOP -#undef FLUSHO -#undef PENDIN -#endif /* Include the proper files. */ @@ -393,27 +370,12 @@ /* Define EMACS_TTY_TABS_OK */ /* --------------------------------------------------------- */ -#ifdef HAVE_TERMIOS - -#ifdef TABDLY -#define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) +#if defined (TABDLY) && defined (TAB3) +# define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) +#elif defined (OXTABS) +# define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & OXTABS) != OXTABS) #else -#define EMACS_TTY_TABS_OK(p) 1 -#endif /* TABDLY */ - -#else /* not def HAVE_TERMIOS */ -#ifdef HAVE_TERMIO - -#define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) - -#else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ -#ifdef WIN32_NATIVE -#define EMACS_TTY_TABS_OK(p) 0 -#else /* not WIN32_NATIVE */ -#define EMACS_TTY_TABS_OK(p) (((p)->main.sg_flags & XTABS) != XTABS) -#endif /* not WIN32_NATIVE */ - -#endif /* not def HAVE_TERMIO */ -#endif /* not def HAVE_TERMIOS */ +# define EMACS_TTY_TABS_OK(p) 1 +#endif #endif /* INCLUDED_systty_h_ */