Minor spacing changes due to "indent".
This commit is contained in:
+2
-2
@@ -20,11 +20,11 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
# include <termios.h>
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#ifdef GWINSZ_IN_SYS_IOCTL
|
||||
# include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -31,7 +31,7 @@ static pvstate_t pv_sig_state = NULL;
|
||||
* subsequent SIGCONT we can try writing to the terminal again, in case we
|
||||
* get backgrounded and later get foregrounded again.
|
||||
*/
|
||||
static void pv_sig_ttou( __attribute__ ((unused))
|
||||
static void pv_sig_ttou( __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
int fd;
|
||||
@@ -52,7 +52,7 @@ static void pv_sig_ttou( __attribute__ ((unused))
|
||||
* Handle SIGTSTP (stop typed at tty) by storing the time the signal
|
||||
* happened for later use by pv_sig_cont(), and then stopping the process.
|
||||
*/
|
||||
static void pv_sig_tstp( __attribute__ ((unused))
|
||||
static void pv_sig_tstp( __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
gettimeofday(&(pv_sig_state->pv_sig_tstp_time), NULL);
|
||||
@@ -65,7 +65,7 @@ static void pv_sig_tstp( __attribute__ ((unused))
|
||||
* last SIGTSTP to the elapsed time offset, and by trying to write to the
|
||||
* terminal again (by replacing the /dev/null stderr with the old stderr).
|
||||
*/
|
||||
static void pv_sig_cont( __attribute__ ((unused))
|
||||
static void pv_sig_cont( __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
struct timeval tv;
|
||||
@@ -120,7 +120,7 @@ static void pv_sig_cont( __attribute__ ((unused))
|
||||
/*
|
||||
* Handle SIGWINCH (window size changed) by setting a flag.
|
||||
*/
|
||||
static void pv_sig_winch( __attribute__ ((unused))
|
||||
static void pv_sig_winch( __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
pv_sig_state->pv_sig_newsize = 1;
|
||||
@@ -130,7 +130,7 @@ static void pv_sig_winch( __attribute__ ((unused))
|
||||
/*
|
||||
* Handle termination signals by setting the abort flag.
|
||||
*/
|
||||
static void pv_sig_term( __attribute__ ((unused))
|
||||
static void pv_sig_term( __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
pv_sig_state->pv_sig_abort = 1;
|
||||
@@ -222,7 +222,7 @@ void pv_sig_init(pvstate_t state)
|
||||
/*
|
||||
* Shut down signal handling.
|
||||
*/
|
||||
void pv_sig_fini( __attribute__ ((unused)) pvstate_t state)
|
||||
void pv_sig_fini( __attribute__((unused)) pvstate_t state)
|
||||
{
|
||||
sigaction(SIGPIPE, &(pv_sig_state->pv_sig_old_sigpipe), NULL);
|
||||
sigaction(SIGTTOU, &(pv_sig_state->pv_sig_old_sigttou), NULL);
|
||||
|
||||
+9
-9
@@ -183,23 +183,23 @@ static ssize_t pv__transfer_write_repeated(int fd, void *buf, size_t count,
|
||||
* out of time - also on our gettimeofday() check.
|
||||
*/
|
||||
if (count > 0) {
|
||||
# if 0 /* disabled after 1.6.0 - see comment above */
|
||||
#if 0 /* disabled after 1.6.0 - see comment above */
|
||||
fd_set writefds;
|
||||
struct timeval tv;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
debug("%s %d: %s (%ld %s, %ld %s)", "fd", fd,
|
||||
"trying another write after partial buffer flush",
|
||||
nwritten, "written", count, "remaining");
|
||||
|
||||
# if 0 /* disabled after 1.6.0 - see comment above */
|
||||
#if 0 /* disabled after 1.6.0 - see comment above */
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
FD_ZERO(&writefds);
|
||||
FD_SET(fd, &writefds);
|
||||
if (select(fd + 1, NULL, &writefds, NULL, &tv) < 1)
|
||||
break;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ static int pv__transfer_read(pvstate_t state, int fd,
|
||||
*/
|
||||
} else if (nread > 0) {
|
||||
state->written = nread;
|
||||
# ifdef HAVE_FDATASYNC
|
||||
#ifdef HAVE_FDATASYNC
|
||||
if (state->sync_after_write) {
|
||||
/*
|
||||
* Ignore non IO errors, such as EBADFD (bad file
|
||||
@@ -295,7 +295,7 @@ static int pv__transfer_read(pvstate_t state, int fd,
|
||||
do_not_skip_errors = true;
|
||||
}
|
||||
}
|
||||
# endif /* HAVE_FDATASYNC */
|
||||
#endif /* HAVE_FDATASYNC */
|
||||
} else if ((-1 == nread) && (EAGAIN == errno)) {
|
||||
/* nothing read yet - do nothing */
|
||||
} else {
|
||||
@@ -707,11 +707,11 @@ static unsigned char *pv__allocate_aligned_buffer(int fd,
|
||||
|
||||
input_alignment = fd >= 0 ? fpathconf(fd, _PC_REC_XFER_ALIGN) : -1;
|
||||
output_alignment = fpathconf(STDOUT_FILENO, _PC_REC_XFER_ALIGN);
|
||||
# if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
|
||||
#if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
|
||||
min_alignment = sysconf(_SC_PAGESIZE);
|
||||
# else /* ! defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) */
|
||||
#else /* ! defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) */
|
||||
min_alignment = 8192;
|
||||
# endif /* defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) */
|
||||
#endif /* defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) */
|
||||
|
||||
if (input_alignment > output_alignment) {
|
||||
required_alignment = input_alignment;
|
||||
|
||||
Reference in New Issue
Block a user