bagder: curl-www/libcurl/c mkexam.pl,1.3,1.4
[email protected] Thu, 10 Sep 2009 17:44:57 +0000
| Newsgroups | gmane.comp.web.curl.www.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/curl/curl-www/libcurl/c
In directory labb:/tmp/cvs-serv14113
Modified Files:
mkexam.pl
Log Message:
fix bad-idea-to-use-sprintf since the code uses %s at times, and then
replace all backslashes at end of line so that the preprocessor doesn't
play with them
Index: mkexam.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl/c/mkexam.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mkexam.pl 10 Sep 2009 08:32:08 -0000 1.3
+++ mkexam.pl 10 Sep 2009 17:44:55 -0000 1.4
@@ -54,7 +54,7 @@
# find curl_ function invokes
if($l =~ /^(.*)(curl_[a-z_]*)( *\(.*)/) {
- $l = sprintf "$1<a href=\"%s\">%s</a>$3\n", "$manpage/$2.html", $2;
+ $l = "$1<a href=\"$manpage/$2.html\">$2</a>$3\n";
}
# find CURLOPT_ uses
@@ -63,10 +63,12 @@
my ($pre, $opt, $post) = ($1, $2, $3);
$cut =~ s/_//g;
- $l = sprintf "$pre<a href=\"%s\">%s</a>$post\n",
- "$manpage/curl_easy_setopt.html#$cut", $opt;
+ $l = "$pre<a href=\"$manpage/curl_easy_setopt.html#$cut\">$opt</a>$post\n";
}
+ # replace backslashes
+ $l =~ s/\\\n/\\ \n/g;
+
if($l eq "\n") {
print ET " \n";
}