mirror of
https://github.com/jarun/nnn.git
synced 2025-01-09 17:39:38 +00:00
Use a macro for readability
This commit is contained in:
parent
2ac22cfc9f
commit
04cba31128
|
@ -108,6 +108,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _ABSSUB(N, M) (((N) <= (M)) ? ((M) - (N)) : ((N) - (M)))
|
#define _ABSSUB(N, M) (((N) <= (M)) ? ((M) - (N)) : ((N) - (M)))
|
||||||
|
#define DOUBLECLICK_INTERVAL_NS 400000000
|
||||||
#define LEN(x) (sizeof(x) / sizeof(*(x)))
|
#define LEN(x) (sizeof(x) / sizeof(*(x)))
|
||||||
#undef MIN
|
#undef MIN
|
||||||
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||||
|
@ -3743,7 +3744,7 @@ nochange:
|
||||||
/*Single click just selects, double click also opens */
|
/*Single click just selects, double click also opens */
|
||||||
if (((_ABSSUB(mousetimings[0].tv_sec, mousetimings[1].tv_sec) << 30)
|
if (((_ABSSUB(mousetimings[0].tv_sec, mousetimings[1].tv_sec) << 30)
|
||||||
+ (mousetimings[0].tv_nsec - mousetimings[1].tv_nsec))
|
+ (mousetimings[0].tv_nsec - mousetimings[1].tv_nsec))
|
||||||
> 400000000)
|
> DOUBLECLICK_INTERVAL_NS)
|
||||||
break;
|
break;
|
||||||
mousetimings[currentmouse].tv_sec = 0;
|
mousetimings[currentmouse].tv_sec = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue