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>
This commit is contained in:
parent
a3beb626d2
commit
30683c70ab
4 changed files with 29 additions and 27 deletions
9
st.h
9
st.h
|
@ -125,7 +125,8 @@ int tattrset(int);
|
|||
void tnew(int, int);
|
||||
void tresize(int, int);
|
||||
void tsetdirtattr(int);
|
||||
void ttynew(char *, char *, char **);
|
||||
void ttyhangup(void);
|
||||
int ttynew(char *, char *, char *, char **);
|
||||
size_t ttyread(void);
|
||||
void ttyresize(int, int);
|
||||
void ttywrite(const char *, size_t, int);
|
||||
|
@ -147,13 +148,7 @@ void *xmalloc(size_t);
|
|||
void *xrealloc(void *, size_t);
|
||||
char *xstrdup(char *);
|
||||
|
||||
/* Globals */
|
||||
extern int cmdfd;
|
||||
extern pid_t pid;
|
||||
extern int oldbutton;
|
||||
|
||||
/* config.h globals */
|
||||
extern char *shell;
|
||||
extern char *utmp;
|
||||
extern char *stty_args;
|
||||
extern char *vtiden;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue