Last active
February 25, 2016 11:03
-
-
Save klange/5377068 to your computer and use it in GitHub Desktop.
とある VIM patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VIM | |
ac_cv_sizeof_int=4 vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_tgetent=zero vim_cv_terminfo=yes vim_cv_toupper_broken=no vim_cv_tty_group=world ./configure --host=$TARGET --target=$TARGET --prefix=$PREFIX/$TARGET --with-tlib=ncurses --enable-gui=no --disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --enable-multibyte | |
# ncurses | |
./configure --prefix=$PREFIX/$TARGET --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN ncurses-5.9/config.sub ncurses.new/config.sub | |
--- ncurses-5.9/config.sub 2010-09-10 15:25:58.000000000 -0700 | |
+++ ncurses.new/config.sub 2013-04-12 22:37:42.785340320 -0700 | |
@@ -1306,6 +1306,7 @@ case $os in | |
| -sym* | -kopensolaris* \ | |
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
| -aos* | -aros* \ | |
+ | -toaru* \ | |
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
diff -rupN ncurses-5.9/ncurses/tinfo/db_iterator.c ncurses.new/ncurses/tinfo/db_iterator.c | |
--- ncurses-5.9/ncurses/tinfo/db_iterator.c 2010-12-25 15:00:25.000000000 -0800 | |
+++ ncurses.new/ncurses/tinfo/db_iterator.c 2013-04-12 22:37:41.749340355 -0700 | |
@@ -90,7 +90,7 @@ NCURSES_EXPORT(void) | |
_nc_last_db(void) | |
{ | |
if (ThisDbList != 0) { | |
- FreeAndNull(ThisDbList); | |
+ //FreeAndNull(ThisDbList); | |
} | |
ThisDbSize = 0; | |
} | |
@@ -166,18 +172,23 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCL | |
if (backspace_if_not_bs != NULL) | |
BC = backspace_if_not_bs; | |
+ | |
+#if 0 | |
if ((FIX_SGR0 = _nc_trim_sgr0(&(TerminalOf(SP_PARM)->type))) != 0) { | |
if (!strcmp(FIX_SGR0, exit_attribute_mode)) { | |
if (FIX_SGR0 != exit_attribute_mode) { | |
+ fprintf(stderr, "gonna free fix_sgr\n"); | |
free(FIX_SGR0); | |
} | |
FIX_SGR0 = 0; | |
} | |
} | |
+#endif | |
LAST_BUF = bufp; | |
LAST_USE = TRUE; | |
SetNoPadding(SP_PARM); | |
+ | |
(void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); /* sets ospeed as a side-effect */ | |
/* LINT_PREPRO | |
diff -rupN ncurses-5.9/ncurses/tty/lib_twait.c ncurses.new/ncurses/tty/lib_twait.c | |
--- ncurses-5.9/ncurses/tty/lib_twait.c 2010-12-25 15:43:58.000000000 -0800 | |
+++ ncurses.new/ncurses/tty/lib_twait.c 2013-04-12 22:37:41.709340355 -0700 | |
@@ -52,6 +52,7 @@ | |
#undef true | |
#include <OS.h> | |
#endif | |
+# include <sys/time.h> | |
#if USE_FUNC_POLL | |
# if HAVE_SYS_TIME_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN vim73/src/auto/configure vim73.new/src/auto/configure | |
--- vim73/src/auto/configure 2010-08-13 07:17:15.000000000 -0700 | |
+++ vim73.new/src/auto/configure 2013-04-12 22:18:41.041376890 -0700 | |
@@ -11639,37 +11639,6 @@ _ACEOF | |
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 | |
-$as_echo_n "checking uint32_t is 32 bits... " >&6; } | |
-if test "$cross_compiling" = yes; then : | |
- as_fn_error "could not compile program using uint32_t." "$LINENO" 5 | |
-else | |
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
-/* end confdefs.h. */ | |
- | |
-#ifdef HAVE_STDINT_H | |
-# include <stdint.h> | |
-#endif | |
-#ifdef HAVE_INTTYPES_H | |
-# include <inttypes.h> | |
-#endif | |
-main() { | |
- uint32_t nr1 = (uint32_t)-1; | |
- uint32_t nr2 = (uint32_t)0xffffffffUL; | |
- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); | |
- exit(0); | |
-} | |
-_ACEOF | |
-if ac_fn_c_try_run "$LINENO"; then : | |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 | |
-$as_echo "ok" >&6; } | |
-else | |
- as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5 | |
-fi | |
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
- conftest.$ac_objext conftest.beam conftest.$ac_ext | |
-fi | |
- | |
bcopy_test_prog=' | |
diff -rupN vim73/src/configure.in vim73.new/src/configure.in | |
--- vim73/src/configure.in 2010-08-13 07:15:17.000000000 -0700 | |
+++ vim73.new/src/configure.in 2013-04-12 22:18:41.049376887 -0700 | |
@@ -3180,7 +3180,7 @@ main() { | |
}], | |
AC_MSG_RESULT(ok), | |
AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]), | |
-AC_MSG_ERROR([could not compile program using uint32_t.])) | |
+AC_MSG_RESULT([assuming ok])) | |
dnl Check for memmove() before bcopy(), makes memmove() be used when both are | |
dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5. | |
diff -rupN vim73/src/feature.h vim73.new/src/feature.h | |
--- vim73/src/feature.h 2010-07-27 12:45:42.000000000 -0700 | |
+++ vim73.new/src/feature.h 2013-04-12 22:18:41.033376891 -0700 | |
@@ -1012,7 +1012,7 @@ | |
* +system Use system() instead of fork/exec for starting a | |
* shell. Doesn't work for the GUI! | |
*/ | |
-/* #define USE_SYSTEM */ | |
+#define USE_SYSTEM | |
/* | |
* +X11 Unix only. Include code for xterm title saving and X | |
@@ -1312,3 +1312,4 @@ | |
#ifdef FEAT_NORMAL | |
# define FEAT_PERSISTENT_UNDO | |
#endif | |
+#define SYS_VIMRC_FILE "/etc/vimrc" | |
diff -rupN vim73/src/fileio.c vim73.new/src/fileio.c | |
--- vim73/src/fileio.c 2010-08-14 05:20:54.000000000 -0700 | |
+++ vim73.new/src/fileio.c 2013-04-12 22:18:41.049376887 -0700 | |
@@ -7362,6 +7362,9 @@ vim_tempname(extra_char) | |
struct stat st; | |
# endif | |
+ sprintf((char *)itmp, "/.vim-%ld", temp_count++); | |
+ return vim_strsave(itmp); | |
+ | |
/* | |
* This will create a directory for private use by this instance of Vim. | |
* This is done once, and the same directory is used for all temp files. | |
diff -rupN vim73/src/Makefile vim73.new/src/Makefile | |
--- vim73/src/Makefile 2010-08-15 05:56:15.000000000 -0700 | |
+++ vim73.new/src/Makefile 2013-04-12 22:18:41.041376890 -0700 | |
@@ -930,6 +930,9 @@ TOOLS = xxd/xxd$(EXEEXT) | |
# directories. This directory must exist. | |
#DESTDIR = ~/pkg/vim | |
+DESTDIR=/usr/share/vim | |
+prefix=/usr | |
+ | |
### Directory of the man pages | |
MAN1DIR = /man1 | |
diff -rupN vim73/src/os_unix.c vim73.new/src/os_unix.c | |
--- vim73/src/os_unix.c 2010-08-08 06:14:04.000000000 -0700 | |
+++ vim73.new/src/os_unix.c 2013-04-12 22:18:41.049376887 -0700 | |
@@ -31,6 +31,33 @@ | |
#include "vim.h" | |
+#define POLLIN 0x0001 /* There is data to read */ | |
+#define POLLPRI 0x0002 /* There is urgent data to read */ | |
+#define POLLOUT 0x0004 /* Writing now will not block */ | |
+#define POLLERR 0x0008 /* Error condition */ | |
+#define POLLHUP 0x0010 /* Hung up */ | |
+#define POLLNVAL 0x0020 /* Invalid request: fd not open */ | |
+ | |
+struct pollfd { | |
+ int fd; /* file descriptor */ | |
+ short events; /* requested events */ | |
+ short revents; /* returned events */ | |
+}; | |
+ | |
+int poll(struct pollfd * ufds, long nfds, int timeout) { | |
+ int fds = 0; | |
+ int i = 0; | |
+ for (i = 0; i < nfds; ++i) { | |
+ int fd = ufds[i].fd; | |
+ struct stat _stat; | |
+ fstat(fd, &_stat); | |
+ if (_stat.st_size) { | |
+ fds++; | |
+ } | |
+ } | |
+ return fds; | |
+} | |
+ | |
#ifdef FEAT_MZSCHEME | |
# include "if_mzsch.h" | |
#endif | |
@@ -3161,6 +3188,8 @@ mch_settmode(tmode) | |
/* | |
* ~ICRNL enables typing ^V^M | |
*/ | |
+ printf("\033[1560z"); | |
+ fflush(stdout); | |
tnew.c_iflag &= ~ICRNL; | |
tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE | |
# if defined(IEXTEN) && !defined(__MINT__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment