mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Minor changes
This commit is contained in:
parent
3da053cbfa
commit
f59cd3e90f
14
nnn.c
14
nnn.c
|
@ -436,11 +436,11 @@ spawn(char *file, char *arg1, char *arg2, char *dir, uchar flag)
|
||||||
static char *
|
static char *
|
||||||
xgetenv(char *name, char *fallback)
|
xgetenv(char *name, char *fallback)
|
||||||
{
|
{
|
||||||
char *value;
|
|
||||||
|
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
return fallback;
|
return fallback;
|
||||||
value = getenv(name);
|
|
||||||
|
char *value = getenv(name);
|
||||||
|
|
||||||
return value && value[0] ? value : fallback;
|
return value && value[0] ? value : fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1683,9 +1683,9 @@ redraw(char *path)
|
||||||
static void
|
static void
|
||||||
browse(char *ipath, char *ifilter)
|
browse(char *ipath, char *ifilter)
|
||||||
{
|
{
|
||||||
static char path[PATH_MAX], oldpath[PATH_MAX], newpath[PATH_MAX];
|
char path[PATH_MAX], oldpath[PATH_MAX], newpath[PATH_MAX];
|
||||||
static char lastdir[PATH_MAX];
|
char lastdir[PATH_MAX];
|
||||||
static char fltr[LINE_MAX];
|
char fltr[LINE_MAX];
|
||||||
char *mime, *dir, *tmp, *run, *env;
|
char *mime, *dir, *tmp, *run, *env;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
int r, fd, presel;
|
int r, fd, presel;
|
||||||
|
@ -2317,7 +2317,7 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char cwd[PATH_MAX], *ipath;
|
char cwd[PATH_MAX], *ipath;
|
||||||
char *ifilter, *bmstr;
|
char *ifilter, *bmstr;
|
||||||
int opt = 0;
|
int opt;
|
||||||
|
|
||||||
/* Confirm we are in a terminal */
|
/* Confirm we are in a terminal */
|
||||||
if (!isatty(0) || !isatty(1)) {
|
if (!isatty(0) || !isatty(1)) {
|
||||||
|
|
Loading…
Reference in a new issue