From: Juanma Barranquero Date: Wed, 21 Apr 2010 00:17:02 +0000 (+0200) Subject: Don't depend on cm.c or termcap.c on Windows, use stubs. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~464 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91eac4bb57f50a69306a28f9e2363695d2f8e146;p=emacs.git 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_*. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2354160c0d9..b3e29f09185 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2010-04-21 Juanma Barranquero + Eli Zaretskii + + 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 * buffer.c (syms_of_buffer) : Doc fix. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 5eaba6374fd..241040d5eb3 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -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) \ diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 3e5c65eaab5..66aae334b3f 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -260,6 +260,17 @@ along with GNU Emacs. If not, see . */ #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 */ diff --git a/src/w32console.c b/src/w32console.c index c10f2181e7d..dcebe466e32 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -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 ***********************************************************************/