Skip to content

Commit

Permalink
Modified progress_init().
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayasy committed Aug 7, 2021
1 parent 6a73ff2 commit 4511d26
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ So for this to work, you must be able to login to the sync-host with [OpenSSH].
This work is required for each sync-host include local-host.
1. Do the following to build and install.
```
curl -LOJs https://github.com/kobayasy/pSync/releases/download/2.13/psync-2.13.tar.gz
tar xzf psync-2.13.tar.gz
cd psync-2.13
curl -LOJs https://github.com/kobayasy/pSync/releases/download/2.14/psync-2.14.tar.gz
tar xzf psync-2.14.tar.gz
cd psync-2.14
./configure --prefix=$HOME
make install
```
Expand Down
6 changes: 3 additions & 3 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
ローカルホストを含めた全ての同期ホストに対してこの作業が必要です。
1. 以下の手順でビルドとインストールを行ないます。
```
curl -LOJs https://github.com/kobayasy/pSync/releases/download/2.13/psync-2.13.tar.gz
tar xzf psync-2.13.tar.gz
cd psync-2.13
curl -LOJs https://github.com/kobayasy/pSync/releases/download/2.14/psync-2.14.tar.gz
tar xzf psync-2.14.tar.gz
cd psync-2.14
./configure --prefix=$HOME
make install
```
Expand Down
Binary file modified psync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Installation:
This work is required for each sync-host include local-host.
1. Do the following to build and install.
---
tar xzf psync-2.13.tar.gz
cd psync-2.13
tar xzf psync-2.14.tar.gz
cd psync-2.14
./configure --prefix=$HOME
make install
---
Expand Down
18 changes: 9 additions & 9 deletions src/configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for pSync 2.13.
# Generated by GNU Autoconf 2.69 for pSync 2.14.
#
# Report bugs to <kobayasy@kobayasy.com>.
#
Expand Down Expand Up @@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pSync'
PACKAGE_TARNAME='psync'
PACKAGE_VERSION='2.13'
PACKAGE_STRING='pSync 2.13'
PACKAGE_VERSION='2.14'
PACKAGE_STRING='pSync 2.14'
PACKAGE_BUGREPORT='kobayasy@kobayasy.com'
PACKAGE_URL='http://kobayasy.com/psync/'

Expand Down Expand Up @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures pSync 2.13 to adapt to many kinds of systems.
\`configure' configures pSync 2.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1307,7 +1307,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of pSync 2.13:";;
short | recursive ) echo "Configuration of pSync 2.14:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1394,7 +1394,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pSync configure 2.13
pSync configure 2.14
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1763,7 +1763,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pSync $as_me 2.13, which was
It was created by pSync $as_me 2.14, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -4760,7 +4760,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by pSync $as_me 2.13, which was
This file was extended by pSync $as_me 2.14, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -4823,7 +4823,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pSync config.status 2.13
pSync config.status 2.14
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
4 changes: 2 additions & 2 deletions src/configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# configure.ac - Last modified: 31-Jul-2021 (kobayasy)
# configure.ac - Last modified: 08-Aug-2021 (kobayasy)
#
# Copyright (c) 2018-2021 by Yuichi Kobayashi <kobayasy@kobayasy.com>
#
Expand All @@ -23,7 +23,7 @@
# SOFTWARE.

AC_PREREQ(2.69)
AC_INIT([pSync], [2.13], [kobayasy@kobayasy.com], [psync], [http://kobayasy.com/psync/])
AC_INIT([pSync], [2.14], [kobayasy@kobayasy.com], [psync], [http://kobayasy.com/psync/])
AC_CONFIG_SRCDIR([psync.c])
AC_CONFIG_AUX_DIR([conf])

Expand Down
9 changes: 5 additions & 4 deletions src/psync.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* psync.c - Last modified: 31-Jul-2021 (kobayasy)
/* psync.c - Last modified: 08-Aug-2021 (kobayasy)
*
* Copyright (c) 2018-2021 by Yuichi Kobayashi <kobayasy@kobayasy.com>
*
Expand Down Expand Up @@ -147,7 +147,8 @@ typedef struct {
((long)((_now).tv_sec - (_last).tv_sec) * 1000 + \
((_now).tv_nsec - (_last).tv_nsec) / 1000000 )

static int progress_init(PROGRESS *progress, int fd, unsigned long interval, const char *format, intmax_t update) {
static int progress_init(PROGRESS *progress, intmax_t update,
int fd, unsigned long interval, const char *format ) {
int status = -1;
struct timespec now;

Expand Down Expand Up @@ -785,7 +786,7 @@ static int preload(PRIV *priv) {
char buffer[SYMLINK_MAX];

ONSTOP(priv->stop, ERROR_STOP);
progress_init(&progress, priv->info, PROGRESS_INTERVAL, "U%+jd\n", 0);
progress_init(&progress, 0, priv->info, PROGRESS_INTERVAL, "U%+jd\n");
name = pathname, name += sprintf(name, "%s/", priv->dirname);
p = loadname, p += sprintf(p, "%s/"SYNCDIR"/"LOCKDIR"/", priv->dirname);
count = 0;
Expand Down Expand Up @@ -909,7 +910,7 @@ static int download(PRIV *priv) {
struct timeval tv[2];

ONSTOP(priv->stop, ERROR_STOP);
progress_init(&progress, priv->info, PROGRESS_INTERVAL, "D%+jd\n", 0);
progress_init(&progress, 0, priv->info, PROGRESS_INTERVAL, "D%+jd\n");
p = loadname, p += sprintf(p, "%s/"SYNCDIR"/"LOCKDIR"/", priv->dirname);
count = 0;
for (fsynced = priv->fsynced.next; *fsynced->name; fsynced = fsynced->next) {
Expand Down

0 comments on commit 4511d26

Please sign in to comment.