From 2ed4446758e3d9d4fb9ccc8d7677b29c24876123 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Thu, 30 May 2013 15:05:19 +0800 Subject: [PATCH] ebind as a module instead of include in main. --- Makefile | 8 ++++---- ebind.h => ebind.c | 9 +++------ main.c | 9 ++++++++- 3 files changed, 15 insertions(+), 11 deletions(-) rename ebind.h => ebind.c (98%) diff --git a/Makefile b/Makefile index 015c91b..79f64b4 100644 --- a/Makefile +++ b/Makefile @@ -16,19 +16,19 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') PROGRAM=ue -SRC=basic.c bind.c buffer.c crypt.c display.c eval.c exec.c \ +SRC=basic.c bind.c buffer.c crypt.c display.c ebind.c eval.c exec.c \ file.c fileio.c input.c isearch.c line.c lock.c main.c \ pklock.c posix.c random.c region.c search.c spawn.c tcap.c \ termio.c window.c word.c names.c globals.c \ wrapper.c utf8.c -OBJ=basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \ +OBJ=basic.o bind.o buffer.o crypt.o display.o ebind.o eval.o exec.o \ file.o fileio.o input.o isearch.o line.o lock.o main.o \ pklock.o posix.o random.o region.o search.o spawn.o tcap.o \ termio.o window.o word.o names.o globals.o \ wrapper.o utf8.o -HDR=basic.h bind.h buffer.h crypt.h display.h ebind.h edef.h efunc.h \ +HDR=basic.h bind.h buffer.h crypt.h display.h edef.h efunc.h \ estruct.h eval.h exec.h file.h fileio.h input.h isearch.h line.h \ lock.h main.h pklock.h random.h region.h search.h spawn.h \ termio.h utf8.h version.h window.h word.h wrapper.h @@ -148,7 +148,7 @@ input.o: input.c input.h estruct.h edef.h isearch.o: isearch.c isearch.h estruct.h edef.h line.o: line.c line.h estruct.h edef.h lock.o: lock.c lock.h estruct.h edef.h -main.o: main.c main.h estruct.h crypt.h edef.h ebind.h version.h +main.o: main.c main.h estruct.h crypt.h edef.h version.h names.o: names.c estruct.h crypt.h edef.h line.h pklock.o: pklock.c pklock.h estruct.h posix.o: posix.c termio.h estruct.h utf8.h diff --git a/ebind.h b/ebind.c similarity index 98% rename from ebind.h rename to ebind.c index e27a586..deb3559 100644 --- a/ebind.h +++ b/ebind.c @@ -1,22 +1,21 @@ -/* ebind.h +/* ebind.c * * Initial default key to function bindings * * Modified by Petri Kutvonen */ -#ifndef EBIND_H_ -#define EBIND_H_ - #include "basic.h" #include "bind.h" #include "buffer.h" #include "crypt.h" +#include "estruct.h" #include "eval.h" #include "exec.h" #include "file.h" #include "isearch.h" #include "line.h" +#include "main.h" #include "random.h" #include "region.h" #include "search.h" @@ -435,5 +434,3 @@ struct key_tab keytab[NBINDS] = { {0, NULL} }; - -#endif /* EBIND_H_ */ diff --git a/main.c b/main.c index 0bb70bf..7525747 100644 --- a/main.c +++ b/main.c @@ -67,11 +67,18 @@ #include "display.h" #include "estruct.h" /* Global structures and defines. */ #include "edef.h" /* Global definitions. */ -#include "ebind.h" /* Default key bindings. */ #include "input.h" #include "termio.h" #include "version.h" +#include "basic.h" +#include "bind.h" +#include "buffer.h" +#include "eval.h" +#include "file.h" +#include "random.h" +#include "search.h" + /* For MSDOS, increase the default stack space. */ #if MSDOS & TURBO #if PKCODE