Re: Strange character in file length

2006-03-06 Thread Hrvoje Niksic
Alain Bench <[EMAIL PROTECTED]> writes:

> Seems a little bit like unusable nonsense to me. Either there is a
> magic option I missed, or I'd recommend to treat Borland as C locale
> (forcing coma separator and grouping by 3).

That's totally weird.  I suggest we do the latter, as I don't think
all that many people use the Borland environment.

By the way, why does your patch work against 1.10.x?  It's always a
better idea to patch thed trunk code, as that's the one new features
get added to.


Re: Strange character in file length

2006-03-06 Thread Alain Bench
 On Thursday, March 2, 2006 at 22:28:28 +0100, Hrvoje Niksic wrote:

> you can get a free compiler from here:
> http://www.borland.com/downloads/download_cbuilder.html

Nice tip, thank you!


Bad news: Borland 5.5.1 seems to do locales in its own way. Not at
all as I explained here, about msvcrt.dll. Seems that:

 · setlocale() returns always a composite string with newlines (as if
categories were not identical). Example setlocale(LC_ALL, ".852")
returns:

| LC_MONETARY=French_France.852
| LC_TIME=French_France.852
| LC_NUMERIC=French_France.852
| LC_COLLATE=French_France.852
| LC_CTYPE=French_France.852

 · setlocale("") does French_France.850, not following chcp.

 · It doesn't know about ".OCP" nor ".ACP", but still accepts "C",
".1252" and such.

 · Whatever setlocale charset, localeconv() only outputs CP-1252.

 · localeconv() grouping gives an Ascii string "3;0" (or "3;2;0" for
Indian). Wget of course groups by... 51 digits (Ascii code of "3").

Seems a little bit like unusable nonsense to me. Either there is a
magic option I missed, or I'd recommend to treat Borland as C locale
(forcing coma separator and grouping by 3).


The test code works well on MinGW. Wget itself doesn't like the
unixish ./configure and make procedure under Msys 1.0.10, but I found
the configure.bat --mingw way to use directly MinGW 3.1.0. Wget 1.10.2
so compiles, and seemingly grouping, charset, and decimal point work
well with the attached patch.

BTW I had a problem compiling straight subversion trunk:

| F:\wget-r2129\src>mingw32-make.exe
| gcc -DWINDOWS -DHAVE_CONFIG_H -O3 -Wall -I.   -c -o cmpt.o cmpt.c
| In file included from wget.h:89,
|  from cmpt.c:43:
| sysdep.h:199: warning: redefinition of `uint32_t'
| c:/MinGW/include/stdint.h:32: warning: `uint32_t' previously declared here
| sysdep.h:215: conflicting types for `uintptr_t'
| c:/MinGW/include/stdint.h:61: previous declaration of `uintptr_t'
| mingw32-make.exe: *** [cmpt.o] Error 1


Bye!Alain.
-- 
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html>


wget-1.10.2.win32-setlocale.1.patch.gz
Description: application/gunzip


Re: How do I make Wget download these files?

2006-03-06 Thread Philip

Mauro Tortonesi wrote:

Philip wrote:
  

I am using WGet under Windows XP to download files for our community
radio station. But these are files whose names are fixed.

Now here's   a problem:

How can I tell WGet to download files whose names change each week.

Specifically:

The files are hosted at http://www.artistlaunch.com/alhourpub/

The filenames are in the format: The_Artistlaunch_Hour_-_02-26-06-1.mp3



where the date element of the filename (in American date format), and
the segment number,  changes every week.

There are four files to download, and I need to save each of the four to
its proper directory, which is q:\1ZZ music\artistlaunch\artist launch
1st (2nd,3rd,4th).

Here's what I tried in the batch file:

q:\W-Get\bin\wget.exe
-r--output-document=q:\1ZZMUS~1\ArtistLaunch\ARTIST~1\"The_Artistlaunch_Hour_-_??-??-06-1".mp3:http://www.artistlaunch.com/alhourpub/"The_Artistlaunch_Hour_-_??-??-06-1".mp3


It doesn't work.

Any ideas what would work?

All non-violent solutions gratefully received.



hi philip,

unfortunately HTTP does not allow wildcard characters, so you can't use
*, ?, etc., in the HTTP URLs you give to wget.

however, you can easily solve your problem with a simple script that
provides wget with the complete URLs.
  


Thaks for that, Mauro. I don't know how to do that -I'm betterat 
programming radio stations than computers!. Can you point me to where I 
could learn what I need to do and how to do it?


Philip



RE: wget -O option not doing the expected

2006-03-06 Thread McDonald, Jacob M.

On Mon, March 6, 2006 09:56, Tony Lewis wrote:
> Are you sure that's what you want to do? Even if wget didn't silently
> ignore
> -r (as Mauro pointed out in his response to you), the options imply that
> everything in the path should be written to "file" (presumably appended
> one
> after the other). (wget ignores -r in this case because the authors
> believe
> such behavior doesn't make any sense.)
>
> What are you trying to get wget to do?

Yeah, that's really what I'm trying to do... I just want to gauge
performance of a web server on a given network port...

I've found the "pavuk" utility fits the bill and has many more advanced
options, such as thread controlling, rate limiting, random delay between
downloads, a "-dontstore" option that does what I wanted with the "-O
/dev/null" and more, so I've started using that instead.

I just thought I'd ask on the list to see if the behavior I was observing
with wget was expected... I suppose it is. :o)

Cheers



Re: wget -O option not doing the expected

2006-03-06 Thread Mauro Tortonesi
McDonald, Jacob M. wrote:
> When using, for instance:
>   wget -r -l 15 -O file http://1.2.3.4/path
> the -O doesn't seem to work as intended. wget downloads a single file
> (or two including robots.txt) and quits without any errors. It seems
> satisfied it has done its job.
> 
> Without -O the tree is saved correctly...
> 
> Ideas?

unfortunately the -r option doesn't work with -O. right now wget
silently ignores -r, but the next version of wget will print an error
and exit.

-- 
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi  http://www.tortonesi.com

University of Ferrara - Dept. of Eng.http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool  http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linuxhttp://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it


Re: Bug in TOLOWER macro when STANDALONE (?)

2006-03-06 Thread Hrvoje Niksic
"Beni Serfaty" <[EMAIL PROTECTED]> writes:

> I Think I found a bug when STANDALONE is defined on hash.c
> I hope I'm not missing something here...

Good catch, thanks.  I've applied a slightly different fix, appended
below.

By the way, are you using hash.c in a project?  I'd like to hear if
you're satisfied with it and would be very interested in any
suggestions and, of course, bugs.  hash.c was written to be
reuse-friendly.

Also note that you can get the latest version of the file (this fix
included) from http://svn.dotsrc.org/repo/wget/trunk/src/hash.c .


2006-03-06  Hrvoje Niksic  <[EMAIL PROTECTED]>

* hash.c (TOLOWER): Fix definition when STANDALONE.
Reported by Beni Serfaty.

Index: src/hash.c
===
--- src/hash.c  (revision 2119)
+++ src/hash.c  (working copy)
@@ -53,7 +53,8 @@
 # ifndef countof
 #  define countof(x) (sizeof (x) / sizeof ((x)[0]))
 # endif
-# define TOLOWER(x) ('A' <= (x) && (x) <= 'Z' ? (x) - 32 : (x))
+# include 
+# define TOLOWER(x) tolower ((unsigned char) x)
 # if __STDC_VERSION__ >= 199901L
 #  include   /* for uintptr_t */
 # else


wget -O option not doing the expected

2006-03-06 Thread McDonald, Jacob M.
When using, for instance:
  wget -r -l 15 -O file http://1.2.3.4/path
the -O doesn't seem to work as intended. wget downloads a single file
(or two including robots.txt) and quits without any errors. It seems
satisfied it has done its job.

Without -O the tree is saved correctly...

Ideas?


Bug in TOLOWER macro when STANDALONE (?)

2006-03-06 Thread Beni Serfaty
I Think I found a bug when STANDALONE is defined on hash.cI hope I'm not missing something here...(Please cc me the replies)@@ -63,7 +63,7 @@   if not enough memory */
 # define xfree free # define countof(x) (sizeof (x) / sizeof ((x)[0]))-# define TOLOWER(x) ('A' <= (x) && (x) <= 'Z' ? (x) - 32 : (x))+# define TOLOWER(x) ('A' <= (x) && (x) <= 'Z' ? (x) + 32 : (x))
 # define PARAMS(x) x #endif


Re: How do I make Wget download these files?

2006-03-06 Thread Mauro Tortonesi
Philip wrote:
> I am using WGet under Windows XP to download files for our community
> radio station. But these are files whose names are fixed.
> 
> Now here's   a problem:
> 
> How can I tell WGet to download files whose names change each week.
> 
> Specifically:
> 
> The files are hosted at http://www.artistlaunch.com/alhourpub/
> 
> The filenames are in the format: The_Artistlaunch_Hour_-_02-26-06-1.mp3
> 
> 
> 
> where the date element of the filename (in American date format), and
> the segment number,  changes every week.
> 
> There are four files to download, and I need to save each of the four to
> its proper directory, which is q:\1ZZ music\artistlaunch\artist launch
> 1st (2nd,3rd,4th).
> 
> Here's what I tried in the batch file:
> 
> q:\W-Get\bin\wget.exe
> -r--output-document=q:\1ZZMUS~1\ArtistLaunch\ARTIST~1\"The_Artistlaunch_Hour_-_??-??-06-1".mp3:http://www.artistlaunch.com/alhourpub/"The_Artistlaunch_Hour_-_??-??-06-1".mp3
> 
> 
> It doesn't work.
> 
> Any ideas what would work?
> 
> All non-violent solutions gratefully received.

hi philip,

unfortunately HTTP does not allow wildcard characters, so you can't use
*, ?, etc., in the HTTP URLs you give to wget.

however, you can easily solve your problem with a simple script that
provides wget with the complete URLs.

-- 
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi  http://www.tortonesi.com

University of Ferrara - Dept. of Eng.http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool  http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linuxhttp://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it


How do I make Wget download these files?

2006-03-06 Thread Philip
I am using WGet under Windows XP to download files for our community 
radio station. But these are files whose names are fixed.


Now here's   a problem:

How can I tell WGet to download files whose names change each week.

Specifically:

The files are hosted at http://www.artistlaunch.com/alhourpub/

The filenames are in the format: The_Artistlaunch_Hour_-_02-26-06-1.mp3 



where the date element of the filename (in American date format), and 
the segment number,  changes every week.


There are four files to download, and I need to save each of the four to 
its proper directory, which is q:\1ZZ music\artistlaunch\artist launch 
1st (2nd,3rd,4th).


Here's what I tried in the batch file:

q:\W-Get\bin\wget.exe 
-r--output-document=q:\1ZZMUS~1\ArtistLaunch\ARTIST~1\"The_Artistlaunch_Hour_-_??-??-06-1".mp3:http://www.artistlaunch.com/alhourpub/"The_Artistlaunch_Hour_-_??-??-06-1".mp3 



It doesn't work.

Any ideas what would work?

All non-violent solutions gratefully received.

Philip

Primetime Radio 1ZZ
Bay of Islands
New Zealand




RE: Another problem with install of WGET 1.10.2 on AIX

2006-03-06 Thread Davis Adrian
 Steven,

I've got exactly the same messages in my "config.log". I haven't used any
options at all with the configure. I'm afraid I don't have a clue how to
progress from here.

The solution to the "cannot run C compiled programs" was to try this on a
different (brand new) machine!!

Many Thanks,
   =Adrian=

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 04 March 2006 03:38
To: [EMAIL PROTECTED]
Subject: Re: Another problem with install of WGET 1.10.2 on AIX

   Mr. Adrian:

   Bearing in mind my lack of recent AIX experience, ...

> /bin/sh: msgfmt:  not found.
> make: 1254-004 The error code from the last command is 127.

   Beats me.  On my Tru64 UNIX system, I have no "msgfmt" (unless through
some miracle the one in /usr/opt/netscape6/gnome/bin/msgfmt was found), and
I don't see it used in the Makefile.

   My config.log does say these:

[...]
configure:11308: checking for msgfmt
configure:11335: result: msgfmt
configure:11344: checking for xgettext
configure:11371: result: :
configure:11381: checking for gmsgfmt
configure:11412: result: msgfmt
[...]
ac_cv_path_GMSGFMT=msgfmt
ac_cv_path_MSGFMT=msgfmt
[...]
GMSGFMT='msgfmt'
[...]
MSGFMT='msgfmt'
[...]

but I see no evidence that anyone tries to use "msgfmt" for anything.


> [...] is there a configure option I should be using?

   What are you using now?


   And what was the solution to the "cannot run C compiled programs"
problem?



   Steven M. Schweda   (+1) 651-699-9818
   382 South Warwick Street[EMAIL PROTECTED]
   Saint Paul  MN  55105-2547