Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.hawaii.edu!ames!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!csn!news-1.csn.net!news-2.csn.net!teal.csn.net!not-for-mail From: bediger@csn.net (Bruce Ediger) Newsgroups: comp.unix.bsd.netbsd.misc Subject: vim for NetBSD 1.1 - diffs Date: 13 Mar 1996 22:31:31 -0700 Organization: Federal Orgone Energy Regulatory Commission Lines: 87 Distribution: world Message-ID: <4i8avj$4f@teal.csn.net> NNTP-Posting-Host: 199.117.27.22 I like Bram Molenaar's "vim" vi editor lookalike. I've got a SPARCStation IPC at home, and I'm running NetBSD 1.1 on it. Here are the "diffs" for vim 3.0, as the sources were posted to comp.sources.misc on 16 Aug, 1994. The only real changes I had to make were because NetBSD uses "termios", while the #define's had it using the old sgttyb stuff. Vim 3.0 compiles with the struct sgttyb stuff, but it doesn't work quite right. I made a few mods to get the termios stuff included instead of sgttyb stuff. diff -c -r orig.src/unix.c netbsd.src/unix.c *** orig.src/unix.c Tue Mar 12 22:31:27 1996 --- netbsd.src/unix.c Mon Feb 12 16:21:55 1996 *************** *** 71,77 **** # define SIGWINCH SIGWINDOW # endif # else ! # include <sgtty.h> # endif /* hpux */ #endif /* !SYSV_UNIX */ --- 71,81 ---- # define SIGWINCH SIGWINDOW # endif # else ! # ifdef __NetBSD__ ! # include <termios.h> ! # else ! # include <sgtty.h> ! # endif # endif /* hpux */ #endif /* !SYSV_UNIX */ *************** *** 755,761 **** { #if defined(ECHOE) && defined(ICANON) && !defined(__NeXT__) /* for "new" tty systems */ ! # ifdef CONVEX static struct termios told; struct termios tnew; # else --- 759,765 ---- { #if defined(ECHOE) && defined(ICANON) && !defined(__NeXT__) /* for "new" tty systems */ ! # if defined(CONVEX) || defined(__NetBSD__) static struct termios told; struct termios tnew; # else *************** *** 771,777 **** --- 775,785 ---- #ifdef TIOCLGET ioctl(0, TIOCLGET, &tty_local); #endif + #ifdef __NetBSD__ + tcgetattr(0, &told); + #else ioctl(0, TCGETA, &told); + #endif tnew = told; /* * ICRNL enables typing ^V^M *************** *** 784,794 **** --- 792,810 ---- ); tnew.c_cc[VMIN] = 1; /* return after 1 char */ tnew.c_cc[VTIME] = 0; /* don't wait */ + #ifdef __NetBSD__ + tcsetattr(0, TCSANOW, &tnew); + #else ioctl(0, TCSETA, &tnew); + #endif } else { + #ifdef __NetBSD__ + tcsetattr(0, TCSANOW, &told); + #else ioctl(0, TCSETA, &told); + #endif #ifdef TIOCLGET ioctl(0, TIOCLSET, &tty_local); #endif