*/
#include "includes.h"
-RCSID("$Id: scp.c,v 1.27 2000/04/14 10:30:32 markus Exp $");
+RCSID("$Id: scp.c,v 1.28 2000/04/16 04:47:43 deraadt Exp $");
#include "ssh.h"
#include "xmalloc.h"
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scp.c,v 1.27 2000/04/14 10:30:32 markus Exp $
+ * $Id: scp.c,v 1.28 2000/04/16 04:47:43 deraadt Exp $
*/
char *
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
" - stalled -");
} else {
- remaining = (int) (totalbytes / (statbytes / elapsed) - elapsed);
+ if (flag != 1)
+ remaining =
+ (int)(totalbytes / (statbytes / elapsed) - elapsed);
+ else
+ remaining = elapsed;
+
i = remaining / 3600;
if (i)
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
" ");
i = remaining % 3600;
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
- "%02d:%02d ETA", i / 60, i % 60);
+ "%02d:%02d%s", i / 60, i % 60,
+ (flag != 1) ? " ETA" : " ");
}
atomicio(write, fileno(stdout), buf, strlen(buf));