changeset 2:7c2dca099a7b

reditor add to Makefile
author atsuki
date Sat, 10 Nov 2007 21:16:07 +0900
parents f72be2054832
children beaeafecd1cd
files src/Makefile src/reditor.c src/reditor.h
diffstat 3 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile	Sat Nov 10 20:27:44 2007 +0900
+++ b/src/Makefile	Sat Nov 10 21:16:07 2007 +0900
@@ -1229,6 +1229,10 @@
 ALL_GUI_SRC  = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c
 ALL_GUI_PRO  = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_photon.pro
 
+# Remote Editor files
+REDITOR_SRC = reditor.c
+REDITOR_OBJ = objects/reditor.o
+
 # }}}
 
 ### Command to create dependencies based on #include "..."
@@ -1396,7 +1400,7 @@
 
 SRC =	$(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) $(MZSCHEME_SRC) \
 	$(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(RUBY_SRC) \
-	$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC)
+	$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) $(REDITOR_SRC)
 
 TAGS_SRC = *.c *.cpp if_perl.xs
 
@@ -1472,7 +1476,8 @@
 	$(OS_EXTRA_OBJ) \
 	$(WORKSHOP_OBJ) \
 	$(NETBEANS_OBJ) \
-	$(WSDEBUG_OBJ)
+	$(WSDEBUG_OBJ) \
+	$(REDITOR_OBJ)
 
 PRO_AUTO = \
 	buffer.pro \
@@ -2532,6 +2537,9 @@
 objects/netbeans.o: netbeans.c
 	$(CCC) -o $@ netbeans.c
 
+objects/reditor.o: reditor.c
+	$(CCC) -o $@ reditor.c
+
 Makefile:
 	@echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
 
@@ -2653,7 +2661,7 @@
 objects/ex_docmd.o: ex_docmd.c vim.h auto/config.h feature.h os_unix.h \
   auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
   regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \
-  globals.h farsi.h arabic.h
+  globals.h farsi.h arabic.h reditor.h
 objects/ex_eval.o: ex_eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
   ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
   gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \
--- a/src/reditor.c	Sat Nov 10 20:27:44 2007 +0900
+++ b/src/reditor.c	Sat Nov 10 21:16:07 2007 +0900
@@ -185,7 +185,7 @@
 
     /* make a full file name.  name is changed to absolute path.
      * name's address is assigned to sfname. */
-    fname_expand((char_u**)&name, (char_u**)&sfname);
+    fname_expand(buf, (char_u**)&name, (char_u**)&sfname);
     buf = buflist_findname((char_u*)name);
 
     free_wrp(name);
@@ -327,6 +327,7 @@
     return buf->b_ml.ml_line_count;
 }
 
+/* XXX もう使わないので消す予定 */
 /* ユーザに文字列を入力させる */
 static char *
 getstr_input_wrp(msg)
@@ -335,7 +336,8 @@
     char *cmdline;
 
     /* 受け取る文字列は使用後 vim_free() する */
-    cmdline = (char*)getcmdline_prompt('@', (char_u*)msg, 0);
+    // cmdline = (char*)getcmdline_prompt('@', (char_u*)msg, 0);
+    cmdline = NULL;
 
     return cmdline;
 }
@@ -1071,7 +1073,6 @@
 
 int
 rep_join()
-    char *server; /* "hostname:portnumber" */
 {
     int sock;
     rep_T *rep;
@@ -1084,7 +1085,7 @@
         return FALSE;
     }
 */
-    if ((sock = rep_connect(server)) < 0) {
+    if ((sock = rep_connect(NULL)) < 0) {
         return FALSE;
     }
     if (rep->smfd > 0) {
--- a/src/reditor.h	Sat Nov 10 20:27:44 2007 +0900
+++ b/src/reditor.h	Sat Nov 10 21:16:07 2007 +0900
@@ -170,7 +170,7 @@
 extern void rep_prevline_flush();
 extern void rep_end();
 
-extern int rep_join(char *);
+extern int rep_join();
 extern int rep_select_command(char *);
 extern int rep_put(char *);