Updates.
committer: mfx <mfx> 1050612607 +0000
This commit is contained in:
+2
-19
@@ -29,6 +29,8 @@
|
||||
#include "conf.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "acc/acc_lib.ch"
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// qsort() util
|
||||
@@ -516,25 +518,6 @@ bool makebakname(char *ofilename, size_t size,
|
||||
}
|
||||
|
||||
|
||||
/* test if fd is connected to a file or a pipe */
|
||||
bool isafile(int fd)
|
||||
{
|
||||
if (isatty(fd))
|
||||
return 0;
|
||||
#if defined(HAVE_FSTAT)
|
||||
{
|
||||
struct stat st;
|
||||
if (fstat(fd, &st) != 0)
|
||||
return 0;
|
||||
/* fprintf(stderr,"fstat(%d): %o\n", fd, st.st_mode); */
|
||||
if (S_ISDIR(st.st_mode))
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// return compression ratio, where 100% == 1000*1000 == 1e6
|
||||
**************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user