Move global variables to module scope, public of search and private of word.

This commit is contained in:
Renaud 2013-09-29 13:26:48 +08:00
parent 097de3bcdf
commit 2a34d732c5
5 changed files with 12 additions and 12 deletions

6
edef.h
View File

@ -22,9 +22,6 @@ typedef int (*fn_t)(int, int);
/* Initialized global external declarations. */
extern int fillcol; /* Fill column */
extern char pat[]; /* Search pattern */
extern char rpat[]; /* Replacement pattern */
extern char tap[]; /* Reversed pattern array. */
extern char *execstr; /* pointer to string to execute */
@ -84,9 +81,6 @@ extern int cmdstatus; /* last command status */
extern char palstr[]; /* palette string */
extern int saveflag; /* Flags, saved with the $target var */
extern int rval; /* return value of a subprocess */
#if PKCODE
extern int justflag; /* justify, don't fill */
#endif
extern int overlap; /* line overlap in forw/back page */
extern int scrollcount; /* number of lines to scroll */

View File

@ -82,9 +82,6 @@ int cmdstatus = TRUE; /* last command status */
char palstr[49] = ""; /* palette string */
int saveflag = 0; /* Flags, saved with the $target var */
int rval = 0; /* return value of a subprocess */
#if PKCODE
int justflag = FALSE; /* justify, don't fill */
#endif
int overlap = 0; /* line overlap in forw/back page */
int scrollcount = 1; /* number of lines to scroll */
@ -102,9 +99,6 @@ struct buffer *bheadp; /* Head of list of buffers */
struct buffer *blistp; /* Buffer for C-X C-B */
char sres[NBUFN]; /* current screen resolution */
char pat[NPAT]; /* Search pattern */
char tap[NPAT]; /* Reversed pattern array. */
char rpat[NPAT]; /* replacement pattern */
#if DEBUGM

View File

@ -85,6 +85,10 @@ char *patmatch = NULL ;
static struct line *matchline = NULL;
static int matchoff = 0;
char pat[ NPAT] ; /* Search pattern */
char tap[ NPAT] ; /* Reversed pattern array. */
char rpat[ NPAT] ; /* replacement pattern */
#if defined(MAGIC)
/*

View File

@ -8,6 +8,10 @@
extern unsigned int matchlen ;
extern char *patmatch ;
extern char pat[] ; /* Search pattern */
extern char tap[] ; /* Reversed pattern array. */
extern char rpat[] ; /* replacement pattern */
/*
* PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for
* the scan routines.

4
word.c
View File

@ -22,6 +22,10 @@
#include "region.h"
#include "window.h"
#if PKCODE
static int justflag = FALSE ; /* justify, don't fill */
#endif
static int inword( void) ;
/* Word wrap on n-spaces. Back-over whatever precedes the point on the current