aboutsummaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-24 16:16:12 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:56:26 -0600
commit30683c70ab62fd37b5921cf72077b9aef2cb842e (patch)
treef81bf19a9cf62cd9ac97c4c7e4eab6a4cc131c89 /st.h
parenta3beb626d2dae9d4d0883c7c8cb6ba58b0609105 (diff)
downloadst-patched-30683c70ab62fd37b5921cf72077b9aef2cb842e.tar.bz2
st-patched-30683c70ab62fd37b5921cf72077b9aef2cb842e.tar.xz
st-patched-30683c70ab62fd37b5921cf72077b9aef2cb842e.zip
Limit usage of extern to config.h globals
Prefer passing arguments to declaring external global variables. The only remaining usage of extern is for config.h variables which are needed in st.c instead of x.c (where it is now included). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.h')
-rw-r--r--st.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/st.h b/st.h
index b5bc1b5..0a7472b 100644
--- a/st.h
+++ b/st.h
@@ -125,7 +125,8 @@ int tattrset(int);
125void tnew(int, int); 125void tnew(int, int);
126void tresize(int, int); 126void tresize(int, int);
127void tsetdirtattr(int); 127void tsetdirtattr(int);
128void ttynew(char *, char *, char **); 128void ttyhangup(void);
129int ttynew(char *, char *, char *, char **);
129size_t ttyread(void); 130size_t ttyread(void);
130void ttyresize(int, int); 131void ttyresize(int, int);
131void ttywrite(const char *, size_t, int); 132void ttywrite(const char *, size_t, int);
@@ -147,13 +148,7 @@ void *xmalloc(size_t);
147void *xrealloc(void *, size_t); 148void *xrealloc(void *, size_t);
148char *xstrdup(char *); 149char *xstrdup(char *);
149 150
150/* Globals */
151extern int cmdfd;
152extern pid_t pid;
153extern int oldbutton;
154
155/* config.h globals */ 151/* config.h globals */
156extern char *shell;
157extern char *utmp; 152extern char *utmp;
158extern char *stty_args; 153extern char *stty_args;
159extern char *vtiden; 154extern char *vtiden;