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_*.
This commit is contained in:
Juanma Barranquero 2010-04-21 02:17:02 +02:00
parent 938efb776d
commit 91eac4bb57
4 changed files with 79 additions and 20 deletions

View file

@ -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.

View file

@ -62,7 +62,6 @@ OBJ1 = $(BLD)/alloc.$(O) \
$(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 @@ OBJ1 = $(BLD)/alloc.$(O) \
$(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 @@ $(BLD)/chartab.$(O) : \
$(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 @@ $(BLD)/term.$(O) : \
$(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) \

View file

@ -260,6 +260,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 */

View file

@ -487,6 +487,62 @@ w32con_set_terminal_window (struct frame *f, int size)
{
}
/***********************************************************************
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
***********************************************************************/