aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-05 20:58:36 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-05 20:58:36 +0530
commitbde25e3ca0ae4f161c0e03554d761fb6701c3c55 (patch)
tree81a6ce80ab130323081e5bd24ef5db9656a99a26 /src
parentc373b4b2793ad0b3719bba9d1a62bb4fe428885e (diff)
downloadnnn-bde25e3ca0ae4f161c0e03554d761fb6701c3c55.tar.gz
Minor refactor
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 8e27608..d5c299b 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -145,14 +145,13 @@
#define FILE_COPIED 0x10
/* Macros to define process spawn behaviour as flags */
-#define F_NONE 0x00 /* no flag set */
-#define F_MULTI 0x01 /* first arg can be combination of args; to be used with F_NORMAL */
-#define F_NOWAIT 0x02 /* don't wait for child process (e.g. file manager) */
-#define F_NOTRACE 0x04 /* suppress stdout and strerr (no traces) */
-#define F_NORMAL 0x08 /* spawn child process in non-curses regular CLI mode */
-#define F_CMD 0x10 /* run command - show results before exit (must have F_NORMAL) */
-
-#define F_CLI (F_NORMAL | F_MULTI)
+#define F_NONE 0x00 /* no flag set */
+#define F_MULTI 0x01 /* first arg can be combination of args; to be used with F_NORMAL */
+#define F_NOWAIT 0x02 /* don't wait for child process (e.g. file manager) */
+#define F_NOTRACE 0x04 /* suppress stdout and strerr (no traces) */
+#define F_NORMAL 0x08 /* spawn child process in non-curses regular CLI mode */
+#define F_CMD 0x10 /* run command - show results before exit (must have F_NORMAL) */
+#define F_CLI (F_NORMAL | F_MULTI)
/* CRC8 macros */
#define UCHAR_BIT_WIDTH (sizeof(unsigned char) << 3)
@@ -165,14 +164,14 @@
* states: S_N: normal, S_I: comparing integral part, S_F: comparing
* fractional parts, S_Z: idem but with leading Zeroes only
*/
-#define S_N 0x0
-#define S_I 0x3
-#define S_F 0x6
-#define S_Z 0x9
+#define S_N 0x0
+#define S_I 0x3
+#define S_F 0x6
+#define S_Z 0x9
/* result_type: VCMP: return diff; VLEN: compare using len_diff/diff */
-#define VCMP 2
-#define VLEN 3
+#define VCMP 2
+#define VLEN 3
/* Volume info */
#define FREE 0
@@ -666,7 +665,6 @@ static size_t xstrlcpy(char *dest, const char *src, size_t n)
size_t len = strlen(src) + 1, blocks;
const uint _WSHIFT = (LONG_SIZE == 8) ? 3 : 2;
-
if (n > len)
n = len;
else if (len > n)