Formatted using clang-format
parent
47a6d63f6d
commit
1df9f84dcb
|
@ -7,7 +7,7 @@ endif()
|
|||
|
||||
|
||||
# =====COMPILER=====
|
||||
set(CMAKE_C_COMPILER "clang-10")
|
||||
set(CMAKE_C_COMPILER "clang-11")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
|
||||
|
|
34
src/arg.h
34
src/arg.h
|
@ -9,10 +9,9 @@
|
|||
extern char *argv0;
|
||||
|
||||
/* use main(int argc, char *argv[]) */
|
||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||
argv[0] && argv[0][0] == '-'\
|
||||
&& argv[0][1];\
|
||||
argc--, argv++) {\
|
||||
#define ARGBEGIN \
|
||||
for (argv0 = *argv, argv++, argc--; \
|
||||
argv[0] && argv[0][0] == '-' && argv[0][1]; argc--, argv++) { \
|
||||
char argc_; \
|
||||
char **argv_; \
|
||||
int brk_; \
|
||||
|
@ -22,29 +21,28 @@ extern char *argv0;
|
|||
break; \
|
||||
} \
|
||||
int i_; \
|
||||
for (i_ = 1, brk_ = 0, argv_ = argv;\
|
||||
argv[0][i_] && !brk_;\
|
||||
i_++) {\
|
||||
for (i_ = 1, brk_ = 0, argv_ = argv; argv[0][i_] && !brk_; i_++) { \
|
||||
if (argv_ != argv) \
|
||||
break; \
|
||||
argc_ = argv[0][i_]; \
|
||||
switch (argc_)
|
||||
|
||||
#define ARGEND }\
|
||||
#define ARGEND \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ARGC() argc_
|
||||
|
||||
#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
|
||||
((x), abort(), (char *)0) :\
|
||||
(brk_ = 1, (argv[0][i_+1] != '\0')?\
|
||||
(&argv[0][i_+1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
#define EARGF(x) \
|
||||
((argv[0][i_ + 1] == '\0' && argv[1] == NULL) \
|
||||
? ((x), abort(), (char *)0) \
|
||||
: (brk_ = 1, (argv[0][i_ + 1] != '\0') ? (&argv[0][i_ + 1]) \
|
||||
: (argc--, argv++, argv[0])))
|
||||
|
||||
#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
|
||||
(char *)0 :\
|
||||
(brk_ = 1, (argv[0][i_+1] != '\0')?\
|
||||
(&argv[0][i_+1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
#define ARGF() \
|
||||
((argv[0][i_ + 1] == '\0' && argv[1] == NULL) \
|
||||
? (char *)0 \
|
||||
: (brk_ = 1, (argv[0][i_ + 1] != '\0') ? (&argv[0][i_ + 1]) \
|
||||
: (argc--, argv++, argv[0])))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -122,7 +122,6 @@ static const char *colorname[] = {
|
|||
"#555555",
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, reverse cursor
|
||||
|
@ -466,7 +465,6 @@ static uint selmasks[] = {
|
|||
* Printable characters in ASCII, used to estimate the advance width
|
||||
* of single wide characters.
|
||||
*/
|
||||
static char ascii_printable[] =
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
||||
|
|
|
@ -122,7 +122,6 @@ static const char *colorname[] = {
|
|||
"#555555",
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, reverse cursor
|
||||
|
@ -466,7 +465,6 @@ static uint selmasks[] = {
|
|||
* Printable characters in ASCII, used to estimate the advance width
|
||||
* of single wide characters.
|
||||
*/
|
||||
static char ascii_printable[] =
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#define DIVCEIL(n, d) (((n) + ((d)-1)) / (d))
|
||||
#define DEFAULT(a, b) (a) = (a) ? (a) : (b)
|
||||
#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
|
||||
#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \
|
||||
(a).bg != (b).bg)
|
||||
#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \
|
||||
(t1.tv_nsec-t2.tv_nsec)/1E6)
|
||||
#define ATTRCMP(a, b) \
|
||||
((a).mode != (b).mode || (a).fg != (b).fg || (a).bg != (b).bg)
|
||||
#define TIMEDIFF(t1, t2) \
|
||||
((t1.tv_sec - t2.tv_sec) * 1000 + (t1.tv_nsec - t2.tv_nsec) / 1E6)
|
||||
#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit)))
|
||||
|
||||
#define TRUECOLOR(r, g, b) (1 << 24 | (r) << 16 | (g) << 8 | (b))
|
||||
|
|
508
src/st/st.c
508
src/st/st.c
File diff suppressed because it is too large
Load Diff
|
@ -24,8 +24,8 @@ enum win_mode {
|
|||
MODE_MOUSEMANY = 1 << 15,
|
||||
MODE_BRCKTPASTE = 1 << 16,
|
||||
MODE_NUMLOCK = 1 << 17,
|
||||
MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
|
||||
|MODE_MOUSEMANY,
|
||||
MODE_MOUSE =
|
||||
MODE_MOUSEBTN | MODE_MOUSEMOTION | MODE_MOUSEX10 | MODE_MOUSEMANY,
|
||||
};
|
||||
|
||||
void xbell(void);
|
||||
|
|
Reference in New Issue