mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
get ncls compiling on windows, windows terminal has quads+braille
This commit is contained in:
parent
250681cf8d
commit
bbaa3f4afa
@ -603,9 +603,9 @@ file(GLOB MANSOURCE1 CONFIGURE_DEPENDS doc/man/man1/*.md)
|
|||||||
file(GLOB MANSOURCE3 CONFIGURE_DEPENDS doc/man/man3/*.md)
|
file(GLOB MANSOURCE3 CONFIGURE_DEPENDS doc/man/man3/*.md)
|
||||||
|
|
||||||
# all further binaries require multimedia support
|
# all further binaries require multimedia support
|
||||||
if(${USE_MULTIMEDIA} STREQUAL "none" OR WIN32)
|
if(${USE_MULTIMEDIA} STREQUAL "none")
|
||||||
list(FILTER MANSOURCE1 EXCLUDE REGEX "ncls.1.md")
|
list(FILTER MANSOURCE1 EXCLUDE REGEX "ncls.1.md")
|
||||||
#list(FILTER MANSOURCE1 EXCLUDE REGEX "ncplayer.1.md")
|
list(FILTER MANSOURCE1 EXCLUDE REGEX "ncplayer.1.md")
|
||||||
else()
|
else()
|
||||||
############################################################################
|
############################################################################
|
||||||
# ncls
|
# ncls
|
||||||
|
@ -82,6 +82,7 @@ int handle_inode(const std::string& dir, const char* p, const struct stat* st, c
|
|||||||
// passing false for toplevel (but preserving |ctx|).
|
// passing false for toplevel (but preserving |ctx|).
|
||||||
int handle_dir(int dirfd, const std::string& pdir, const char* p,
|
int handle_dir(int dirfd, const std::string& pdir, const char* p,
|
||||||
const struct stat* st, const lsContext& ctx, bool toplevel){
|
const struct stat* st, const lsContext& ctx, bool toplevel){
|
||||||
|
#ifndef __MINGW64__
|
||||||
if(ctx.directories){
|
if(ctx.directories){
|
||||||
return handle_inode(pdir, p, st, ctx);
|
return handle_inode(pdir, p, st, ctx);
|
||||||
}
|
}
|
||||||
@ -116,6 +117,9 @@ int handle_dir(int dirfd, const std::string& pdir, const char* p,
|
|||||||
closedir(dir);
|
closedir(dir);
|
||||||
close(newdir);
|
close(newdir);
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int handle_deref(const char* p, const struct stat* st, const lsContext& ctx){
|
int handle_deref(const char* p, const struct stat* st, const lsContext& ctx){
|
||||||
@ -129,6 +133,7 @@ int handle_deref(const char* p, const struct stat* st, const lsContext& ctx){
|
|||||||
// true iff the path was directly listed on the command line.
|
// true iff the path was directly listed on the command line.
|
||||||
int handle_path(int dirfd, const std::string& pdir, const char* p, const lsContext& ctx, bool toplevel){
|
int handle_path(int dirfd, const std::string& pdir, const char* p, const lsContext& ctx, bool toplevel){
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
#ifndef __MINGW64__
|
||||||
if(fstatat(dirfd, p, &st, AT_NO_AUTOMOUNT)){
|
if(fstatat(dirfd, p, &st, AT_NO_AUTOMOUNT)){
|
||||||
std::cerr << "Error running fstatat(" << p << "): " << strerror(errno) << std::endl;
|
std::cerr << "Error running fstatat(" << p << "): " << strerror(errno) << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
@ -141,6 +146,9 @@ int handle_path(int dirfd, const std::string& pdir, const char* p, const lsConte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return handle_inode(pdir, p, &st, ctx);
|
return handle_inode(pdir, p, &st, ctx);
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// return long-term return code
|
// return long-term return code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user