From 6f81579213615debc840e7e74e63acc79597de69 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Fri, 27 Sep 2013 14:16:29 +0800 Subject: [PATCH] Move global variable to private scope. --- edef.h | 2 +- globals.c | 2 +- window.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/edef.h b/edef.h index 1dd5fc6..770b1d9 100644 --- a/edef.h +++ b/edef.h @@ -62,7 +62,7 @@ extern int quotec; /* quote char during mlreply() */ extern int tabmask; extern char *cname[]; /* names of colors */ -extern struct window *swindow; /* saved window pointer */ + extern int *kbdptr; /* current position in keyboard buf */ extern int *kbdend; /* ptr to end of the keyboard */ diff --git a/globals.c b/globals.c index 0c613b3..e3d45e2 100644 --- a/globals.c +++ b/globals.c @@ -75,7 +75,7 @@ char *cname[] = { /* names of colors */ #endif }; -struct window *swindow = NULL; /* saved window pointer */ + int *kbdptr; /* current position in keyboard buf */ int *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ kbdstate kbdmode = STOP; /* current keyboard macro mode */ diff --git a/window.c b/window.c index f31ee5a..288bb9e 100644 --- a/window.c +++ b/window.c @@ -21,6 +21,10 @@ #include "terminal.h" #include "wrapper.h" + +static struct window *swindow = NULL ; /* saved window pointer */ + + /* * Reposition dot in the current window to line "n". If the argument is * positive, it is that line. If it is negative it is that line from the