mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 21:04:56 +00:00
Clarify the statusbar config option so it states which applet it applies to.
This commit is contained in:
parent
6092680305
commit
370fb08e79
2
Config.h
2
Config.h
@ -283,7 +283,7 @@
|
|||||||
// #define BB_FEATURE_INSTALLER
|
// #define BB_FEATURE_INSTALLER
|
||||||
//
|
//
|
||||||
// Enable a nifty progress meter in wget (adds just under 2k)
|
// Enable a nifty progress meter in wget (adds just under 2k)
|
||||||
#define BB_FEATURE_STATUSBAR
|
#define BB_FEATURE_WGET_STATUSBAR
|
||||||
//
|
//
|
||||||
// Clean up all memory before exiting -- usually not needed
|
// Clean up all memory before exiting -- usually not needed
|
||||||
// as the OS can clean up... Don't enable this unless you
|
// as the OS can clean up... Don't enable this unless you
|
||||||
|
@ -40,7 +40,7 @@ void progressmeter(int flag);
|
|||||||
|
|
||||||
/* Globals (can be accessed from signal handlers */
|
/* Globals (can be accessed from signal handlers */
|
||||||
static off_t filesize = 0; /* content-length of the file */
|
static off_t filesize = 0; /* content-length of the file */
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
static char *curfile; /* Name of current file being transferred. */
|
static char *curfile; /* Name of current file being transferred. */
|
||||||
static struct timeval start; /* Time a transfer started. */
|
static struct timeval start; /* Time a transfer started. */
|
||||||
volatile unsigned long statbytes; /* Number of bytes transferred so far. */
|
volatile unsigned long statbytes; /* Number of bytes transferred so far. */
|
||||||
@ -113,18 +113,18 @@ int wget_main(int argc, char **argv)
|
|||||||
/* Guess an output filename */
|
/* Guess an output filename */
|
||||||
if (!fname_out) {
|
if (!fname_out) {
|
||||||
fname_out =
|
fname_out =
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
curfile =
|
curfile =
|
||||||
#endif
|
#endif
|
||||||
get_last_path_component(uri_path);
|
get_last_path_component(uri_path);
|
||||||
if (fname_out==NULL || strlen(fname_out)<1) {
|
if (fname_out==NULL || strlen(fname_out)<1) {
|
||||||
fname_out =
|
fname_out =
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
curfile =
|
curfile =
|
||||||
#endif
|
#endif
|
||||||
"index.html";
|
"index.html";
|
||||||
}
|
}
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
} else {
|
} else {
|
||||||
curfile=argv[optind];
|
curfile=argv[optind];
|
||||||
#endif
|
#endif
|
||||||
@ -217,14 +217,14 @@ int wget_main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Retrieve HTTP body.
|
* Retrieve HTTP body.
|
||||||
*/
|
*/
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
statbytes=0;
|
statbytes=0;
|
||||||
if (quiet_flag==FALSE)
|
if (quiet_flag==FALSE)
|
||||||
progressmeter(-1);
|
progressmeter(-1);
|
||||||
#endif
|
#endif
|
||||||
while (filesize > 0 && (n = fread(buf, 1, sizeof(buf), sfp)) > 0) {
|
while (filesize > 0 && (n = fread(buf, 1, sizeof(buf), sfp)) > 0) {
|
||||||
fwrite(buf, 1, n, output);
|
fwrite(buf, 1, n, output);
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
statbytes+=n;
|
statbytes+=n;
|
||||||
if (quiet_flag==FALSE)
|
if (quiet_flag==FALSE)
|
||||||
progressmeter(1);
|
progressmeter(1);
|
||||||
@ -341,7 +341,7 @@ char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc)
|
|||||||
return hdrval;
|
return hdrval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
/* Stuff below is from BSD rcp util.c, as added to openshh.
|
/* Stuff below is from BSD rcp util.c, as added to openshh.
|
||||||
* Original copyright notice is retained at the end of this file.
|
* Original copyright notice is retained at the end of this file.
|
||||||
*
|
*
|
||||||
@ -476,7 +476,7 @@ progressmeter(int flag)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Original copyright notice which applies to the BB_FEATURE_STATUSBAR stuff,
|
/* Original copyright notice which applies to the BB_FEATURE_WGET_STATUSBAR stuff,
|
||||||
* much of which was blatently stolen from openssh. */
|
* much of which was blatently stolen from openssh. */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -511,7 +511,7 @@ progressmeter(int flag)
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: wget.c,v 1.15 2001/01/03 16:15:15 kraai Exp $
|
* $Id: wget.c,v 1.16 2001/01/20 20:07:00 andersen Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
18
wget.c
18
wget.c
@ -40,7 +40,7 @@ void progressmeter(int flag);
|
|||||||
|
|
||||||
/* Globals (can be accessed from signal handlers */
|
/* Globals (can be accessed from signal handlers */
|
||||||
static off_t filesize = 0; /* content-length of the file */
|
static off_t filesize = 0; /* content-length of the file */
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
static char *curfile; /* Name of current file being transferred. */
|
static char *curfile; /* Name of current file being transferred. */
|
||||||
static struct timeval start; /* Time a transfer started. */
|
static struct timeval start; /* Time a transfer started. */
|
||||||
volatile unsigned long statbytes; /* Number of bytes transferred so far. */
|
volatile unsigned long statbytes; /* Number of bytes transferred so far. */
|
||||||
@ -113,18 +113,18 @@ int wget_main(int argc, char **argv)
|
|||||||
/* Guess an output filename */
|
/* Guess an output filename */
|
||||||
if (!fname_out) {
|
if (!fname_out) {
|
||||||
fname_out =
|
fname_out =
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
curfile =
|
curfile =
|
||||||
#endif
|
#endif
|
||||||
get_last_path_component(uri_path);
|
get_last_path_component(uri_path);
|
||||||
if (fname_out==NULL || strlen(fname_out)<1) {
|
if (fname_out==NULL || strlen(fname_out)<1) {
|
||||||
fname_out =
|
fname_out =
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
curfile =
|
curfile =
|
||||||
#endif
|
#endif
|
||||||
"index.html";
|
"index.html";
|
||||||
}
|
}
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
} else {
|
} else {
|
||||||
curfile=argv[optind];
|
curfile=argv[optind];
|
||||||
#endif
|
#endif
|
||||||
@ -217,14 +217,14 @@ int wget_main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Retrieve HTTP body.
|
* Retrieve HTTP body.
|
||||||
*/
|
*/
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
statbytes=0;
|
statbytes=0;
|
||||||
if (quiet_flag==FALSE)
|
if (quiet_flag==FALSE)
|
||||||
progressmeter(-1);
|
progressmeter(-1);
|
||||||
#endif
|
#endif
|
||||||
while (filesize > 0 && (n = fread(buf, 1, sizeof(buf), sfp)) > 0) {
|
while (filesize > 0 && (n = fread(buf, 1, sizeof(buf), sfp)) > 0) {
|
||||||
fwrite(buf, 1, n, output);
|
fwrite(buf, 1, n, output);
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
statbytes+=n;
|
statbytes+=n;
|
||||||
if (quiet_flag==FALSE)
|
if (quiet_flag==FALSE)
|
||||||
progressmeter(1);
|
progressmeter(1);
|
||||||
@ -341,7 +341,7 @@ char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc)
|
|||||||
return hdrval;
|
return hdrval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BB_FEATURE_STATUSBAR
|
#ifdef BB_FEATURE_WGET_STATUSBAR
|
||||||
/* Stuff below is from BSD rcp util.c, as added to openshh.
|
/* Stuff below is from BSD rcp util.c, as added to openshh.
|
||||||
* Original copyright notice is retained at the end of this file.
|
* Original copyright notice is retained at the end of this file.
|
||||||
*
|
*
|
||||||
@ -476,7 +476,7 @@ progressmeter(int flag)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Original copyright notice which applies to the BB_FEATURE_STATUSBAR stuff,
|
/* Original copyright notice which applies to the BB_FEATURE_WGET_STATUSBAR stuff,
|
||||||
* much of which was blatently stolen from openssh. */
|
* much of which was blatently stolen from openssh. */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -511,7 +511,7 @@ progressmeter(int flag)
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: wget.c,v 1.15 2001/01/03 16:15:15 kraai Exp $
|
* $Id: wget.c,v 1.16 2001/01/20 20:07:00 andersen Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user