Staticise globals in ed(1)

This commit is contained in:
sin 2015-12-14 12:13:23 +00:00
parent 912c21ab1f
commit 25f87bc360

54
ed.c
View File

@ -33,34 +33,34 @@ struct undo {
} *vec; } *vec;
}; };
char *prompt = "*"; static char *prompt = "*";
regex_t *pattern; static regex_t *pattern;
regmatch_t matchs[10]; static regmatch_t matchs[10];
char *lastre; static char *lastre;
int optverbose, optprompt, exstatus, optdiag = 1; static int optverbose, optprompt, exstatus, optdiag = 1;
int marks['z' - 'a']; static int marks['z' - 'a'];
int nlines, line1, line2; static int nlines, line1, line2;
int curln, lastln, ocurln; static int curln, lastln, ocurln;
jmp_buf savesp; static jmp_buf savesp;
char *lasterr; static char *lasterr;
size_t idxsize, lastidx; static size_t idxsize, lastidx;
struct hline *zero; static struct hline *zero;
char *text; static char *text;
char savfname[FILENAME_MAX]; static char savfname[FILENAME_MAX];
char tmpname[FILENAME_MAX]; static char tmpname[FILENAME_MAX];
size_t sizetxt, memtxt; static size_t sizetxt, memtxt;
int scratch; static int scratch;
int pflag, modflag, uflag, gflag; static int pflag, modflag, uflag, gflag;
size_t csize; static size_t csize;
char *cmdline; static char *cmdline;
char *ocmdline; static char *ocmdline;
size_t cmdsiz, cmdcap; static size_t cmdsiz, cmdcap;
int repidx; static int repidx;
char *rhs; static char *rhs;
char *lastmatch; static char *lastmatch;
struct undo udata; static struct undo udata;
int newcmd; static int newcmd;
static void static void
error(char *msg) error(char *msg)