cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Patch for compressed help

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 29 Jul 2003 00:07:12 +0200 (CEST)

On Mon, 28 Jul 2003, Gisle Vanem wrote:

Thanks for your feedback!

> I cannot get the ./src/mkhelp.pl script to generate compressed help text.
> Seems the $c variable is unitialised; where is it assigned from $ARGV[0]?

<perl school>

By the use of the -s command line option to perl. It makes the command line
arguments given to the script get importet to the script as global variables:

   perl -s mkhelp.pl -c

... makes $c defined in the script.

</perl school>

Doesn't this work for you? I'll make it work without the -s too.

> The second problem is that
> open(GZIP, "|gzip -9 >dumpit.gz")
>
> just doesn't work under my Perl (ActiveState perl for Win32). "gzip -tv
> dumpit.gz" fails. I assume it's related to binary/ascii mode of STDOUT or
> something hairy.

Hm, I did try to add a 'binmode' in there for exactly that purpose...

> Or maybe it's my gzip which is too old (1.2.4).

I doubt that, I use 1.2.4 successfully for this on my Linux box.

> I patched mkhelp.pl by simply spawning "gzip -9f dumpit".

I did this change too, in hope that it might improve things.

> But this needed some more checks in hugehelp() before inflating the buffer.

I managed to avoid this need by using the --no-name option to gzip, which
causes it to not store that extra data.

Does my attached patch work for you? It is a smaller change than your patch,
but should still do the same basics you need I think.

> PS. Anybody know how to get groff/nroff to produce a wider man output?

I wish I knew.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

Received on 2003-07-29