Mercurial > hg > RemoteEditor > vim7
changeset 11:bb64d8561b7b
セッションマネージャに繋がるように修正。
author | shinobu |
---|---|
date | Sat, 30 Aug 2008 15:13:39 +0900 |
parents | 13f0cd4d1b23 |
children | f0f9a028aa7c |
files | src/auto/config.h src/auto/config.mk src/ex_cmds.h src/ex_docmd.c src/misc1.c src/reditor.c |
diffstat | 6 files changed, 89 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auto/config.h Fri Aug 29 22:14:24 2008 +0900 +++ b/src/auto/config.h Sat Aug 30 15:13:39 2008 +0900 @@ -8,7 +8,7 @@ /* #undef EBCDIC */ /* Define unless no X support found */ -/* #undef HAVE_X11 */ +#define HAVE_X11 1 /* Define when terminfo support found */ #define TERMINFO 1 @@ -26,7 +26,7 @@ /* #undef UP_BC_PC_EXTERN */ /* Define when termcap.h defines outfuntype */ -/* #undef HAVE_OUTFUNTYPE */ +#define HAVE_OUTFUNTYPE 1 /* Define when __DATE__ " " __TIME__ can be used */ #define HAVE_DATE_TIME 1 @@ -97,8 +97,8 @@ #define HAVE_SVR4_PTYS 1 /* Define to range of pty names to try */ -#define PTYRANGE0 "pqrstuvw" -#define PTYRANGE1 "0123456789abcdef" +/* #undef PTYRANGE0 */ +/* #undef PTYRANGE1 */ /* Define mode for pty */ /* #undef PTYMODE */ @@ -125,7 +125,7 @@ /* #undef TGETSTR_CHAR_P */ /* Define if tgetent() returns zero for an error */ -/* #undef TGETENT_ZERO_ERR */ +#define TGETENT_ZERO_ERR 0 /* Define if the getcwd() function should not be used. */ /* #undef BAD_GETCWD */ @@ -157,15 +157,15 @@ #define HAVE_READLINK 1 #define HAVE_RENAME 1 #define HAVE_SELECT 1 -/* #undef HAVE_SELINUX */ +#define HAVE_SELINUX 1 #define HAVE_SETENV 1 #define HAVE_SETPGID 1 #define HAVE_SETSID 1 #define HAVE_SIGACTION 1 #define HAVE_SIGALTSTACK 1 #define HAVE_SIGSET 1 -#define HAVE_SIGSETJMP 1 -/* #undef HAVE_SIGSTACK */ +/* #undef HAVE_SIGSETJMP */ +#define HAVE_SIGSTACK 1 #define HAVE_SIGVEC 1 #define HAVE_STRCASECMP 1 #define HAVE_STRERROR 1 @@ -176,17 +176,17 @@ #define HAVE_STRPBRK 1 #define HAVE_STRTOL 1 #define HAVE_ST_BLKSIZE 1 -/* #undef HAVE_SYSCONF */ -#define HAVE_SYSCTL 1 -/* #undef HAVE_SYSINFO */ -/* #undef HAVE_SYSINFO_MEM_UNIT */ +#define HAVE_SYSCONF 1 +/* #undef HAVE_SYSCTL */ +#define HAVE_SYSINFO 1 +#define HAVE_SYSINFO_MEM_UNIT 1 #define HAVE_TGETENT 1 #define HAVE_TOWLOWER 1 #define HAVE_TOWUPPER 1 #define HAVE_ISWUPPER 1 #define HAVE_USLEEP 1 #define HAVE_UTIME 1 -/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */ +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 /* Define if you do not have utime(), but do have the utimes() function. */ #define HAVE_UTIMES 1 @@ -198,9 +198,9 @@ /* #undef HAVE_FRAME_H */ #define HAVE_ICONV_H 1 #define HAVE_LANGINFO_H 1 -#define HAVE_LIBC_H 1 +/* #undef HAVE_LIBC_H */ #define HAVE_LIBGEN_H 1 -/* #undef HAVE_LIBINTL_H */ +#define HAVE_LIBINTL_H 1 #define HAVE_LOCALE_H 1 #define HAVE_MATH_H 1 /* #undef HAVE_NDIR_H */ @@ -210,7 +210,7 @@ #define HAVE_SETJMP_H 1 #define HAVE_SGTTY_H 1 #define HAVE_STRINGS_H 1 -/* #undef HAVE_STROPTS_H */ +#define HAVE_STROPTS_H 1 /* #undef HAVE_SYS_ACCESS_H */ #define HAVE_SYS_ACL_H 1 /* #undef HAVE_SYS_DIR_H */ @@ -221,10 +221,10 @@ /* #undef HAVE_SYS_PTEM_H */ #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 -/* #undef HAVE_SYS_STATFS_H */ +#define HAVE_SYS_STATFS_H 1 /* #undef HAVE_SYS_STREAM_H */ #define HAVE_SYS_SYSCTL_H 1 -/* #undef HAVE_SYS_SYSINFO_H */ +#define HAVE_SYS_SYSINFO_H 1 /* #undef HAVE_SYS_SYSTEMINFO_H */ #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UTSNAME_H 1 @@ -232,12 +232,12 @@ #define HAVE_WCTYPE_H 1 #define HAVE_TERMCAP_H 1 #define HAVE_TERMIOS_H 1 -/* #undef HAVE_TERMIO_H */ +#define HAVE_TERMIO_H 1 #define HAVE_UNISTD_H 1 /* #undef HAVE_UTIL_DEBUG_H */ /* #undef HAVE_UTIL_MSGI18N_H */ #define HAVE_UTIME_H 1 -/* #undef HAVE_X11_SUNKEYSYM_H */ +#define HAVE_X11_SUNKEYSYM_H 1 /* #undef HAVE_XM_XM_H */ /* #undef HAVE_XM_XPMP_H */ /* #undef HAVE_XM_TRAITP_H */ @@ -245,7 +245,7 @@ /* #undef HAVE_XM_UNHIGHLIGHTT_H */ /* #undef HAVE_XM_JOINSIDET_H */ /* #undef HAVE_XM_NOTEBOOK_H */ -/* #undef HAVE_X11_XPM_H */ +#define HAVE_X11_XPM_H 1 /* #undef HAVE_X11_XMU_EDITRES_H */ #define HAVE_X11_SM_SMLIB_H 1 @@ -268,7 +268,7 @@ #define HAVE_STRING_H 1 /* Define if strings.h cannot be included when strings.h already is */ -#define NO_STRINGS_WITH_STRING_H 1 +/* #undef NO_STRINGS_WITH_STRING_H */ /* Define if you want tiny features. */ /* #undef FEAT_TINY */ @@ -309,7 +309,7 @@ /* #undef HAVE_AIX_ACL */ /* Define if you want to add support of GPM (Linux console mouse daemon) */ -/* #undef HAVE_GPM */ +#define HAVE_GPM 1 /* Define if you want to add support of sysmouse (*BSD console mouse) */ /* #undef HAVE_SYSMOUSE */ @@ -324,7 +324,7 @@ /* #undef FEAT_XFONTSET */ /* Define if you want to include XIM support. */ -/* #undef FEAT_XIM */ +#define FEAT_XIM 1 /* Define if you want to include Hangul input support. */ /* #undef FEAT_HANGULIN */ @@ -336,10 +336,10 @@ /* #undef FEAT_KDETOOLBAR */ /* Define if GTK+ 2 is available. */ -/* #undef HAVE_GTK2 */ +#define HAVE_GTK2 1 /* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */ -/* #undef HAVE_GTK_MULTIHEAD */ +#define HAVE_GTK_MULTIHEAD 1 /* Define if your X has own locale library */ /* #undef X_LOCALE */ @@ -348,10 +348,10 @@ #define HAVE_DLFCN_H 1 /* Define if there is a working gettext(). */ -/* #undef HAVE_GETTEXT */ +#define HAVE_GETTEXT 1 /* Define if _nl_msg_cat_cntr is present. */ -/* #undef HAVE_NL_MSG_CAT_CNTR */ +#define HAVE_NL_MSG_CAT_CNTR 1 /* Define if we have dlopen() */ #define HAVE_DLOPEN 1
--- a/src/auto/config.mk Fri Aug 29 22:14:24 2008 +0900 +++ b/src/auto/config.mk Sat Aug 30 15:13:39 2008 +0900 @@ -13,28 +13,28 @@ -VIMNAME = Vim +VIMNAME = vim EXNAME = ex VIEWNAME = view CC = gcc DEFS = -DHAVE_CONFIG_H -CFLAGS = -g -O -CPPFLAGS = -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon +CFLAGS = -g -O2 +CPPFLAGS = srcdir = . LDFLAGS = -L/usr/local/lib -LIBS = -lm -lncurses -liconv -TAGPRG = ctags -t +LIBS = -lm -lncurses -lelf -lnsl -lselinux -lacl -lattr -lgpm +TAGPRG = ctags -I INIT+ --fields=+S CPP = gcc -E CPP_MM = M DEPEND_CFLAGS_FILTER = | sed 's+-I */+-isystem /+g' -X_CFLAGS = -X_LIBS_DIR = -X_PRE_LIBS = -X_EXTRA_LIBS = -X_LIBS = +X_CFLAGS = +X_LIBS_DIR = +X_PRE_LIBS = -lSM -lICE -lXpm +X_EXTRA_LIBS = -lXdmcp -lSM -lICE +X_LIBS = -lXt -lX11 MZSCHEME_LIBS = MZSCHEME_SRC = @@ -101,7 +101,7 @@ NL = "\\012" ### Top directory for everything -prefix = /Applications +prefix = /usr/local ### Top directory for the binary exec_prefix = ${prefix} @@ -113,38 +113,38 @@ datarootdir = ${prefix}/share ### Prefix for location of data files -DATADIR = ${prefix}/Vim.app/Contents/Resources +DATADIR = ${datarootdir} ### Prefix for location of man pages MANDIR = ${datarootdir}/man ### Do we have a GUI -GUI_INC_LOC = -GUI_LIB_LOC = -GUI_SRC = $(CARBONGUI_SRC) -GUI_OBJ = $(CARBONGUI_OBJ) -GUI_DEFS = $(CARBONGUI_DEFS) -GUI_IPATH = $(CARBONGUI_IPATH) -GUI_LIBS_DIR = $(CARBONGUI_LIBS_DIR) -GUI_LIBS1 = $(CARBONGUI_LIBS1) -GUI_LIBS2 = $(CARBONGUI_LIBS2) -GUI_INSTALL = $(CARBONGUI_INSTALL) -GUI_TARGETS = $(CARBONGUI_TARGETS) -GUI_MAN_TARGETS = $(CARBONGUI_MAN_TARGETS) -GUI_TESTTARGET = $(CARBONGUI_TESTTARGET) -GUI_TESTARG = $(CARBONGUI_TESTARG) -GUI_BUNDLE = $(CARBONGUI_BUNDLE) +GUI_INC_LOC = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GUI_LIB_LOC = -L/lib +GUI_SRC = $(GTK_SRC) +GUI_OBJ = $(GTK_OBJ) +GUI_DEFS = $(GTK_DEFS) +GUI_IPATH = $(GTK_IPATH) +GUI_LIBS_DIR = $(GTK_LIBS_DIR) +GUI_LIBS1 = $(GTK_LIBS1) +GUI_LIBS2 = $(GTK_LIBS2) +GUI_INSTALL = $(GTK_INSTALL) +GUI_TARGETS = $(GTK_TARGETS) +GUI_MAN_TARGETS = $(GTK_MAN_TARGETS) +GUI_TESTTARGET = $(GTK_TESTTARGET) +GUI_TESTARG = $(GTK_TESTARG) +GUI_BUNDLE = $(GTK_BUNDLE) NARROW_PROTO = GUI_X_LIBS = MOTIF_LIBNAME = -GTK_LIBNAME = +GTK_LIBNAME = -L/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 ### Any OS dependent extra source and object file -OS_EXTRA_SRC = os_macosx.c os_mac_conv.c -OS_EXTRA_OBJ = objects/os_macosx.o objects/os_mac_conv.o +OS_EXTRA_SRC = +OS_EXTRA_OBJ = ### If the *.po files are to be translated to *.mo files. -MAKEMO = +MAKEMO = yes # Make sure that "make first" will run "make all" once configure has done its # work. This is needed when using the Makefile in the top directory.
--- a/src/ex_cmds.h Fri Aug 29 22:14:24 2008 +0900 +++ b/src/ex_cmds.h Sat Aug 30 15:13:39 2008 +0900 @@ -84,6 +84,7 @@ ex_func_T cmd_func; /* function for this command */ long_u cmd_argt; /* flags declared above */ } + # if defined(FEAT_GUI_W16) _far # endif @@ -745,6 +746,22 @@ BANG|TRLBAR|CMDWIN), EX(CMD_registers, "registers", ex_display, EXTRA|NOTRLCOM|TRLBAR|CMDWIN), +//EX(CMD_repend, "repend", ex_repend, +// RANGE), +EX(CMD_repjoin, "repjoin", ex_repjoin, + RANGE), +//EX(CMD_repopen, "repopen", ex_repopen, +// RANGE), +EX(CMD_repput, "repput", ex_repput, + RANGE), +//EX(CMD_repremove, "repremove", ex_repremove, +// RANGE), +//EX(CMD_repquit, "repquit", ex_repquit, +// RANGE), +//EX(CMD_repselect, "repselect", ex_repselect, +// RANGE), +//EX(CMD_reptest, "reptest", ex_reptest, +// RANGE), EX(CMD_resize, "resize", ex_resize, RANGE|NOTADR|TRLBAR|WORD1), EX(CMD_retab, "retab", ex_retab,
--- a/src/ex_docmd.c Fri Aug 29 22:14:24 2008 +0900 +++ b/src/ex_docmd.c Sat Aug 30 15:13:39 2008 +0900 @@ -460,8 +460,17 @@ # define ex_profile ex_ni #endif - - +/* + * Remote Editor + */ +//static void ex_repend __ARGS((exarg_T *eap)); +//static void ex_repopen __ARGS((exarg_T *eap)); +static void ex_repjoin __ARGS((exarg_T *eap)); +//static void ex_repselect __ARGS((exarg_T *eap)); +static void ex_repput __ARGS((exarg_T *eap)); +//static void ex_repremove __ARGS((exarg_T *eap)); +//static void ex_repquit __ARGS((exarg_T *eap)); +//static void ex_reptest __ARGS((exarg_T *eap)); /* * Declare cmdnames[].
--- a/src/misc1.c Fri Aug 29 22:14:24 2008 +0900 +++ b/src/misc1.c Sat Aug 30 15:13:39 2008 +0900 @@ -2729,6 +2729,7 @@ * Remote Editor */ if(rep_session_permit()){ + fprintf(stderr,"Call rep_register %d %d %d\n",lnum,lnume,xtra); rep_register(lnum,lnume,xtra); }
--- a/src/reditor.c Fri Aug 29 22:14:24 2008 +0900 +++ b/src/reditor.c Sat Aug 30 15:13:39 2008 +0900 @@ -1095,7 +1095,7 @@ rep->smfd = sock; rep->permit = TRUE; - add_cmd_to_list(&cmdlist, make_cmd(REP_JOIN_CMD, 0, rep->eid, rep->seqno++, 0, NULL)); + add_cmd_to_list(&cmdlist, make_cmd(REP_JOIN_CMD, 0, rep->eid, rep->seqno++, 0, "bufname")); rep_send_cmds(sock, &cmdlist); free_cmdlist(&cmdlist);