From 0e9fc236f9520e8bfa755f11de5e2ef15a1103c2 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Sat, 18 May 2013 14:43:13 +0800 Subject: [PATCH] display depends on window instead of efunc. --- Makefile | 6 +++--- display.c | 2 +- efunc.h | 23 +---------------------- window.c | 4 ++++ window.h | 28 ++++++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 window.h diff --git a/Makefile b/Makefile index eb64892..0f0ed63 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ OBJ=basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \ wrapper.o utf8.o HDR=crypt.h display.h ebind.h edef.h efunc.h estruct.h fileio.h input.h \ - version.h + version.h window.h # DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them @@ -136,7 +136,7 @@ basic.o: basic.c estruct.h edef.h bind.o: bind.c estruct.h edef.h fileio.h buffer.o: buffer.c estruct.h edef.h crypt.o: crypt.c crypt.h display.h estruct.h edef.h input.h -display.o: display.c display.h estruct.h edef.h utf8.h version.h +display.o: display.c display.h estruct.h edef.h utf8.h version.h window.h eval.o: eval.c estruct.h edef.h version.h fileio.h exec.o: exec.c estruct.h edef.h file.o: file.c crypt.h estruct.h edef.h fileio.h @@ -159,7 +159,7 @@ termio.o: termio.c estruct.h edef.h utf8.o: utf8.c utf8.h vmsvt.o: vmsvt.c estruct.h edef.h vt52.o: vt52.c estruct.h edef.h -window.o: window.c estruct.h edef.h +window.o: window.c window.h estruct.h edef.h word.o: word.c estruct.h edef.h wrapper.o: wrapper.c wrapper.h diff --git a/display.c b/display.c index 2f09f65..1ac864c 100644 --- a/display.c +++ b/display.c @@ -19,11 +19,11 @@ #include "estruct.h" #include "edef.h" -#include "efunc.h" #include "line.h" #include "version.h" #include "wrapper.h" #include "utf8.h" +#include "window.h" struct video { int v_flag; /* Flags */ diff --git a/efunc.h b/efunc.h index 6a11c9e..3f9e841 100644 --- a/efunc.h +++ b/efunc.h @@ -27,28 +27,7 @@ extern int killpara(int f, int n); extern int wordcount(int f, int n); /* window.c */ -extern int reposition(int f, int n); -extern int redraw(int f, int n); -extern int nextwind(int f, int n); -extern int prevwind(int f, int n); -extern int mvdnwind(int f, int n); -extern int mvupwind(int f, int n); -extern int onlywind(int f, int n); -extern int delwind(int f, int n); -extern int splitwind(int f, int n); -extern int enlargewind(int f, int n); -extern int shrinkwind(int f, int n); -extern int resize(int f, int n); -extern int scrnextup(int f, int n); -extern int scrnextdw(int f, int n); -extern int savewnd(int f, int n); -extern int restwnd(int f, int n); -extern int newsize(int f, int n); -extern int newwidth(int f, int n); -extern int getwpos(void); -extern void cknewwindow(void); -extern struct window *wpopup(void); /* Pop up window creation. */ - +#include "window.h" /* basic.c */ extern int gotobol(int f, int n); diff --git a/window.c b/window.c index 86da9a8..27743e8 100644 --- a/window.c +++ b/window.c @@ -1,3 +1,7 @@ +/* window.c -- inplements window.h */ + +#include "window.h" + /* window.c * * Window management. Some of the functions are internal, and some are diff --git a/window.h b/window.h new file mode 100644 index 0000000..5e0417c --- /dev/null +++ b/window.h @@ -0,0 +1,28 @@ +#ifndef _WINDOW_H_ +#define _WINDOW_H_ + +#include "estruct.h" + +int reposition( int f, int n); +int redraw( int f, int n) ; +int nextwind( int f, int n) ; +int prevwind( int f, int n) ; +int mvdnwind( int f, int n) ; +int mvupwind( int f, int n) ; +int onlywind( int f, int n) ; +int delwind( int f, int n) ; +int splitwind( int f, int n) ; +int enlargewind( int f, int n) ; +int shrinkwind( int f, int n) ; +int resize( int f, int n) ; +int scrnextup( int f, int n) ; +int scrnextdw( int f, int n) ; +int savewnd( int f, int n) ; +int restwnd( int f, int n) ; +int newsize( int f, int n) ; +int newwidth( int f, int n) ; +int getwpos( void) ; +void cknewwindow( void) ; +struct window *wpopup( void) ; /* Pop up window creation. */ + +#endif