committer: mfx <mfx> 1050612607 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2003-04-17 20:50:07 +00:00
parent 390cdbba2d
commit 5c7bca5b3e
20 changed files with 80 additions and 162 deletions
+2 -19
View File
@@ -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
**************************************************************************/