[hackers] [sbase] Staticise globals in ed(1) || sin

From: <git_AT_suckless.org>
Date: Mon, 14 Dec 2015 13:14:57 +0100 (CET)

commit 25f87bc360cb6c21f5ffcb6e46d2876a2ae52ee6
Author: sin <sin_AT_2f30.org>
AuthorDate: Mon Dec 14 12:13:23 2015 +0000
Commit: sin <sin_AT_2f30.org>
CommitDate: Mon Dec 14 12:14:52 2015 +0000

    Staticise globals in ed(1)

diff --git a/ed.c b/ed.c
index 9e9bdc1..4878654 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -33,34 +33,34 @@ struct undo {
         } *vec;
 };
 
-char *prompt = "*";
-regex_t *pattern;
-regmatch_t matchs[10];
-char *lastre;
-
-int optverbose, optprompt, exstatus, optdiag = 1;
-int marks['z' - 'a'];
-int nlines, line1, line2;
-int curln, lastln, ocurln;
-jmp_buf savesp;
-char *lasterr;
-size_t idxsize, lastidx;
-struct hline *zero;
-char *text;
-char savfname[FILENAME_MAX];
-char tmpname[FILENAME_MAX];
-size_t sizetxt, memtxt;
-int scratch;
-int pflag, modflag, uflag, gflag;
-size_t csize;
-char *cmdline;
-char *ocmdline;
-size_t cmdsiz, cmdcap;
-int repidx;
-char *rhs;
-char *lastmatch;
-struct undo udata;
-int newcmd;
+static char *prompt = "*";
+static regex_t *pattern;
+static regmatch_t matchs[10];
+static char *lastre;
+
+static int optverbose, optprompt, exstatus, optdiag = 1;
+static int marks['z' - 'a'];
+static int nlines, line1, line2;
+static int curln, lastln, ocurln;
+static jmp_buf savesp;
+static char *lasterr;
+static size_t idxsize, lastidx;
+static struct hline *zero;
+static char *text;
+static char savfname[FILENAME_MAX];
+static char tmpname[FILENAME_MAX];
+static size_t sizetxt, memtxt;
+static int scratch;
+static int pflag, modflag, uflag, gflag;
+static size_t csize;
+static char *cmdline;
+static char *ocmdline;
+static size_t cmdsiz, cmdcap;
+static int repidx;
+static char *rhs;
+static char *lastmatch;
+static struct undo udata;
+static int newcmd;
 
 static void
 error(char *msg)
Received on Mon Dec 14 2015 - 13:14:57 CET

This archive was generated by hypermail 2.3.0 : Mon Dec 14 2015 - 13:24:18 CET