diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-12 22:25:49 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | 69e32a61df15787c410a48eaa10a89240c36257d (patch) | |
tree | a8de7f88f5d712df627e9c0302ce7e77f2f208c2 /st.h | |
parent | ed132e11271d18a5d8aa163096bc6192c694bc47 (diff) | |
download | st-patched-69e32a61df15787c410a48eaa10a89240c36257d.tar.bz2 st-patched-69e32a61df15787c410a48eaa10a89240c36257d.tar.xz st-patched-69e32a61df15787c410a48eaa10a89240c36257d.zip |
Move opt_* into same file as main()/run()
This commit is purely about reducing externs and LOC. If the main and
run functions ever move elsewhere (which will probably make sense
eventually), these should come along with them.
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.h')
-rw-r--r-- | st.h | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -9,6 +9,7 @@ | |||
9 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) | 9 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) |
10 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) | 10 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) |
11 | #define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) | 11 | #define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) |
12 | #define DEFAULT(a, b) (a) = (a) ? (a) : (b) | ||
12 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) | 13 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) |
13 | #define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ | 14 | #define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ |
14 | (a).bg != (b).bg) | 15 | (a).bg != (b).bg) |
@@ -194,7 +195,7 @@ void tnew(int, int); | |||
194 | void tresize(int, int); | 195 | void tresize(int, int); |
195 | void tsetdirt(int, int); | 196 | void tsetdirt(int, int); |
196 | void tsetdirtattr(int); | 197 | void tsetdirtattr(int); |
197 | void ttynew(void); | 198 | void ttynew(char *, char *, char **); |
198 | size_t ttyread(void); | 199 | size_t ttyread(void); |
199 | void ttyresize(int, int); | 200 | void ttyresize(int, int); |
200 | void ttysend(char *, size_t); | 201 | void ttysend(char *, size_t); |
@@ -221,14 +222,6 @@ extern Term term; | |||
221 | extern Selection sel; | 222 | extern Selection sel; |
222 | extern int cmdfd; | 223 | extern int cmdfd; |
223 | extern pid_t pid; | 224 | extern pid_t pid; |
224 | extern char **opt_cmd; | ||
225 | extern char *opt_class; | ||
226 | extern char *opt_embed; | ||
227 | extern char *opt_font; | ||
228 | extern char *opt_io; | ||
229 | extern char *opt_line; | ||
230 | extern char *opt_name; | ||
231 | extern char *opt_title; | ||
232 | extern int oldbutton; | 225 | extern int oldbutton; |
233 | 226 | ||
234 | /* config.h globals */ | 227 | /* config.h globals */ |