search for: curfile

Displaying 11 results from an estimated 11 matches for "curfile".

Did you mean: cuefile
2002 Feb 06
2
SFTP Status Bar..
...sh-3.0.2p1/misc.h Wed Jul 4 12:25:55 2001 +++ openssh/misc.h Wed Feb 6 13:02:33 2002 @@ -29,7 +29,11 @@ int num; int nalloc; }; + void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); +void progressmeter(off_t statbytes, off_t totalbytes, char *curfile); + +#define PROGRESSTIME 1 /* alarm() interval for updating progress meter */ /* wrapper for signal interface */ typedef void (*mysig_t)(int); diff -ur openssh-3.0.2p1/scp.c openssh/scp.c --- openssh-3.0.2p1/scp.c Sun Oct 21 19:53:59 2001 +++ openssh/scp.c Wed Feb 6 13:07:33 2002 @@ -89,32...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...iff -u -r1.11 misc.h --- misc.h 2002/01/24 21:09:25 1.11 +++ misc.h 2002/02/02 21:47:40 @@ -30,4 +30,8 @@ int num; int nalloc; }; + void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); +void progressmeter(off_t statbytes, off_t totalbytes, char *curfile); + +#define PROGRESSTIME 1 /* alarm() interval for updating progress meter */ Index: scp.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/scp.c,v retrieving revision 1.86 diff -u -r1.86 scp.c --- scp.c 2001/12/05 03:56:39 1.86 +++ scp.c 2002/0...
2002 Jan 30
1
Quick sftp status indicator.
...static int +foregroundproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +void +progressmeter(int flag, off_t statbytes, off_t totalbytes, char *curfile) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static struct timeval lastupdate; + static off_t lastsize; + static u_char *progressbar = NULL; + static size_t progressbar_size = 0; + static struct...
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all; I'm not subscribed to this list so I'm first sending this message to verify that mails from me make it through, and then later I'll send the juicy messages with patches. Also, the address I'm using is IPv6-only and doesn't often work, so drop me from any replies and I'll catch the archives, or drop only the hostname part to get an IPv4 address that
2000 Jul 02
1
minor cosmetic bug
The progress metre in scp(1) breaks when the tty is too wide. This patch is the effortless fix: ########################################################################### :; diff -u openssh-2.1.1p2/scp.c openssh-2.1.1p2+jhc/scp.c --- openssh-2.1.1p2+jhc/scp.c Thu Jun 22 07:32:32 2000 +++ openssh-2.1.1p2/scp.c Sat Jul 1 22:15:36 2000 @@ -1176,8 +1176,9 @@ i = barlength *
2017 Aug 04
4
Filter files received on scp server
Hey, So, I would be looking at type A. Forgive me if my understanding of how OpenSSH operates is not reflective of reality. I am assuming that, the file transfer is happening somewhat logically, with a name being known, content written, blah blah. >From reading scp.c, it appears that, the client end at least knows the file name so I must assume the server end must be given it. I am hoping to
2002 Jul 13
0
[PATCH]: scp program improved
...AUGELEN 200 - (void) gettimeofday(&now, (struct timezone *) 0); - cursize = statbytes; - if (totalbytes != 0) { - ratio = 100.0 * cursize / totalbytes; - ratio = MAX(ratio, 0); - ratio = MIN(ratio, 100); - } else - ratio = 100; - - snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio); - - barlength = getttywidth() - 51; - if (barlength > 0) { - i = barlength * ratio / 100; - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "|%.*s%*s|", i, - "*******************************************************" - "*****************...
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...rgv) continue; } - if (*cp != 'C' && *cp != 'D') { + if (*cp != 'C' && *cp != 'D' && *cp != 'L') { /* * Check for the case "rcp remote:foo\* local:bar". @@ -816,5 +840,5 @@ sink(argc, argv) np = targ; curfile = cp; - exists = stat(np, &stb) == 0; + exists = (buf[0] == 'L' ? lstat : stat)(np, &stb) == 0; if (buf[0] == 'D') { int mod_flag = pflag; @@ -845,9 +869,14 @@ sink(argc, argv) continue; } - omode = mode; - mode |= S_IWRITE; - if ((ofd = open(np, O_WRONLY...
2000 Aug 24
0
patch for a few things
...ize, abbrevsize; double elapsed; + double rate, abbrevrate; + int j; + char b; int ratio, barlength, i, remaining; char buf[256]; *************** *** 1148,1157 **** ratio = MIN(ratio, 100); } else ratio = 100; ! snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio); ! ! barlength = getttywidth() - 51; barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH; if (barlength > 0) { i = barlength * ratio / 100; --- 1176,1184 ---- ratio = MIN(ratio, 100); } else ratio = 100; + snprintf(buf, sizeof(buf), "\r%-18.18...
2001 May 12
4
Erase the source file open; specify a tempfile name option
...; int setimes, targisdir, wrerrno = 0; - char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; + char ch, *cp, *np, *targ, *dest, *why, *vect[1], buf[2048]; struct timeval tv[2]; #define atime tv[0] @@ -770,6 +793,7 @@ np = namebuf; } else np = targ; + dest = *tmpfn? tmpfn : np; curfile = cp; exists = stat(np, &stb) == 0; if (buf[0] == 'D') { @@ -804,8 +828,8 @@ } omode = mode; mode |= S_IWRITE; - if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) { -bad: run_err("%s: %s", np, strerror(errno)); + if ((ofd = open(dest, O_WRONLY...
2002 Oct 05
2
ogg123 remote interface
Hi, I've been working on ogg123 to see if i could add a remote interface compatible with the one in mpg123. This remote interface is used mainly by mp3 players which use mpg123 as their backend. The reason i did this was that i have recently encoded some of my cd's in ogg vorbis format but wanted to keep using my favourite player (playmp3list,