cURL / Mailing Lists / curl-users / Single Mail

curl-users

mkhelp.pl patch

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Tue, 20 May 2003 19:30:03 +0200

The manual available at "curl -M" sometimes breaks lines
where it shouldn't (and it looks ugly). Due to use of puts()
and line-endings at end of the 500 byte chunk.

Here's a patch using 'fputs(x,stdout)' instead:

--- ../orig/src\mkhelp.pl Fri Mar 9 13:11:28 2001
+++ mkhelp.pl Tue May 20 19:25:46 2003
@@ -67,7 +67,7 @@
 print "#include <stdio.h>\n";
 print "void hugehelp(void)\n";
 print "{\n";
-print "puts (\n";
+print "fputs (\n";

 $outsize=0;
 for(@out) {
@@ -82,13 +82,13 @@

     # gcc 2.96 claims ISO C89 only is required to support 509 letter strings
     if($outsize > 500) {
- # terminate and make another puts() call here
- print ");\n puts(\n";
+ # terminate and make another fputs() call here
+ print ",stdout);\n fputs(\n";
         $outsize=length($new)+1;
     }
     printf("\"%s\\n\"\n", $new);

 }

-print " ) ;\n}\n"
+print ", stdout) ;\n}\n"

--gv

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-20