/*
* Base64-encode character string
* oops... isn't something similar in uuencode.c?
- * It would be better to use already existing code
+ * XXX: It would be better to use already existing code
*/
-char *base64enc(unsigned char *p, char *buf, int len) {
+static char *base64enc(unsigned char *p, char *buf, int len) {
char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789+/";
/*
* Crack command line.
*/
- bb_opt_complementaly = "\203*";
+ bb_opt_complementally = "\203*";
bb_applet_long_options = wget_long_options;
opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:", &fname_out, &headers_llist, &dir_prefix, &proxy_flag);
if (opt & WGET_OPT_CONTINUE) {
/* Guess an output filename */
if (!fname_out) {
- fname_out =
+ // Dirty hack. Needed because bb_get_last_path_component
+ // will destroy trailing / by storing '\0' in last byte!
+ if(target.path[strlen(target.path)-1]!='/') {
+ fname_out =
#ifdef CONFIG_FEATURE_WGET_STATUSBAR
- curfile =
+ curfile =
#endif
- bb_get_last_path_component(target.path);
+ bb_get_last_path_component(target.path);
+ }
if (fname_out==NULL || strlen(fname_out)<1) {
fname_out =
#ifdef CONFIG_FEATURE_WGET_STATUSBAR
#endif
/* Original copyright notice which applies to the CONFIG_FEATURE_WGET_STATUSBAR stuff,
- * much of which was blatently stolen from openssh. */
+ * much of which was blatantly stolen from openssh. */
/*-
* Copyright (c) 1992, 1993
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.73 2004/04/08 10:27:11 bug1 Exp $
+ * $Id: wget.c,v 1.75 2004/10/08 08:27:40 andersen Exp $
*/