changeset 108007:ea2f4615a622

Don't depend on cm.c or termcap.c on Windows, use stubs. * makefile.w32-in (OBJ1): Remove cm.$(O) and termcap.$(O). ($(BLD)/cm.$(O), $(BLD)/termcap.$(O)): Remove. * w32console.c (current_tty, cost): New vars; lifted from cm.c. (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear) (sys_tputs, sys_tgetstr): New stubs. * s/ms-w32.h (chcheckmagic, cmcostinit, cmgoto, cmputc, Wcm_clear) (tputs, tgetstr): New; define to sys_*.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 21 Apr 2010 02:17:02 +0200
parents 452f0cc5f879
children 3ccddf080698
files src/ChangeLog src/makefile.w32-in src/s/ms-w32.h src/w32console.c
diffstat 4 files changed, 79 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Apr 21 01:05:30 2010 +0200
+++ b/src/ChangeLog	Wed Apr 21 02:17:02 2010 +0200
@@ -1,3 +1,15 @@
+2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
+	    Eli Zaretskii  <eliz@gnu.org>
+
+       Don't depend on cm.c or termcap.c on Windows, use stubs.
+       * makefile.w32-in (OBJ1): Remove cm.$(O) and termcap.$(O).
+       ($(BLD)/cm.$(O), $(BLD)/termcap.$(O)): Remove.
+       * w32console.c (current_tty, cost): New vars; lifted from cm.c.
+       (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear)
+       (sys_tputs, sys_tgetstr): New stubs.
+       * s/ms-w32.h (chcheckmagic, cmcostinit, cmgoto, cmputc, Wcm_clear)
+       (tputs, tgetstr): New; define to sys_*.
+
 2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
 
 	* buffer.c (syms_of_buffer) <bidi-display-reordering>: Doc fix.
--- a/src/makefile.w32-in	Wed Apr 21 01:05:30 2010 +0200
+++ b/src/makefile.w32-in	Wed Apr 21 02:17:02 2010 +0200
@@ -62,7 +62,6 @@
 	$(BLD)/callint.$(O)		\
 	$(BLD)/callproc.$(O)		\
 	$(BLD)/casefiddle.$(O)		\
-	$(BLD)/cm.$(O)			\
 	$(BLD)/cmds.$(O)		\
 	$(BLD)/data.$(O)		\
 	$(BLD)/dired.$(O)		\
@@ -98,7 +97,6 @@
 	$(BLD)/syntax.$(O)		\
 	$(BLD)/sysdep.$(O)		\
 	$(BLD)/term.$(O)		\
-	$(BLD)/termcap.$(O)		\
 	$(BLD)/tparam.$(O)		\
 	$(BLD)/undo.$(O)		\
 	$(BLD)/unexw32.$(O)		\
@@ -494,17 +492,6 @@
 	$(SRC)/character.h \
 	$(SRC)/charset.h
 
-$(BLD)/cm.$(O) : \
-	$(SRC)/cm.c \
-	$(CONFIG_H) \
-	$(SRC)/lisp.h \
-	$(SRC)/cm.h \
-	$(SRC)/dispextern.h \
-	$(SRC)/frame.h \
-	$(SRC)/termchar.h \
-	$(SRC)/termhooks.h \
-	$(SRC)/w32gui.h
-
 $(BLD)/cmds.$(O) : \
 	$(SRC)/cmds.c \
 	$(CONFIG_H) \
@@ -1407,13 +1394,6 @@
 	$(SRC)/w32gui.h \
 	$(SRC)/window.h
 
-$(BLD)/termcap.$(O) : \
-	$(SRC)/termcap.c \
-	$(CONFIG_H) \
-	$(EMACS_ROOT)/nt/inc/unistd.h \
-	$(EMACS_ROOT)/nt/inc/sys/file.h \
-	$(SRC)/lisp.h
-
 $(BLD)/terminal.$(O) : \
 	$(SRC)/terminal.c \
 	$(CONFIG_H) \
--- a/src/s/ms-w32.h	Wed Apr 21 01:05:30 2010 +0200
+++ b/src/s/ms-w32.h	Wed Apr 21 02:17:02 2010 +0200
@@ -260,6 +260,17 @@
 #define kill    sys_kill
 #define signal  sys_signal
 
+/* termcap.c calls that are emulated */
+#define tputs   sys_tputs
+#define tgetstr sys_tgetstr
+
+/* cm.c calls that are emulated */
+#define chcheckmagic sys_chcheckmagic
+#define cmcostinit   sys_cmcostinit
+#define cmgoto       sys_cmgoto
+#define cmputc       sys_cmputc
+#define Wcm_clear    sys_Wcm_clear
+
 #endif /* emacs */
 
 /* map to MSVC names */
--- a/src/w32console.c	Wed Apr 21 01:05:30 2010 +0200
+++ b/src/w32console.c	Wed Apr 21 02:17:02 2010 +0200
@@ -488,6 +488,62 @@
 }
 
 /***********************************************************************
+			stubs from termcap.c
+ ***********************************************************************/
+
+void
+sys_tputs (char *str, int nlines, int (*outfun)())
+{
+}
+
+char *
+sys_tgetstr (char *cap, char **area)
+{
+  return NULL;
+}
+
+
+/***********************************************************************
+			stubs from cm.c
+ ***********************************************************************/
+
+struct tty_display_info *current_tty = NULL;
+int cost = 0;
+
+int
+evalcost (char c)
+{
+  return c;
+}
+
+int
+cmputc (char c)
+{
+  return c;
+}
+
+void
+cmcheckmagic (struct tty_display_info *tty)
+{
+}
+
+void
+cmcostinit (struct tty_display_info *tty)
+{
+}
+
+void
+cmgoto (struct tty_display_info *tty, int row, int col)
+{
+}
+
+void
+Wcm_clear (struct tty_display_info *tty)
+{
+}
+
+
+/***********************************************************************
 				Faces
  ***********************************************************************/