[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 10/282: libtest/mk-lib1521: adapt to new public header layout
From: |
gnunet |
Subject: |
[gnurl] 10/282: libtest/mk-lib1521: adapt to new public header layout |
Date: |
Wed, 01 Apr 2020 14:27:55 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 5ebe5044ab3bef50e671e528cc9f92ed0e20eaf7
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Jan 7 08:30:33 2020 +0100
libtest/mk-lib1521: adapt to new public header layout
---
tests/libtest/mk-lib1521.pl | 47 +++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
index f4add1a02..e4ac6a1c5 100755
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2017 - 2019, Daniel Stenberg, <address@hidden>, et al.
+# Copyright (C) 2017 - 2020, Daniel Stenberg, <address@hidden>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -173,45 +173,45 @@ HEADER
;
while(<STDIN>) {
- if($_ =~ /^ CINIT\(([^ ]*), ([^ ]*), (\d*)\)/) {
+ if($_ =~ /^ CURLOPT\(([^ ]*), ([^ ]*), (\d*)\)/) {
my ($name, $type, $val)=($1, $2, $3);
my $w=" ";
- my $pref = "${w}res = curl_easy_setopt(curl, CURLOPT_$name,";
+ my $pref = "${w}res = curl_easy_setopt(curl, $name,";
my $i = ' ' x (length($w) + 23);
- my $check = " if(UNEX(res)) {\n err(\"$name\", res, __LINE__);
goto test_cleanup; }\n";
- if($type eq "STRINGPOINT") {
+ my $check = " if(UNEX(res)) {\n err(\"$name\", res, __LINE__);\n
goto test_cleanup;\n }\n";
+ if($type eq "CURLOPTTYPE_STRINGPOINT") {
print "${pref} \"string\");\n$check";
print "${pref} NULL);\n$check";
}
- elsif($type eq "LONG") {
+ elsif($type eq "CURLOPTTYPE_LONG") {
print "${pref} 0L);\n$check";
print "${pref} 22L);\n$check";
print "${pref} LO);\n$check";
print "${pref} HI);\n$check";
}
- elsif($type eq "OBJECTPOINT") {
+ elsif($type eq "CURLOPTTYPE_OBJECTPOINT") {
if($name =~ /DEPENDS/) {
print "${pref} dep);\n$check";
}
elsif($name =~ "SHARE") {
print "${pref} share);\n$check";
}
- elsif($name eq "ERRORBUFFER") {
+ elsif($name eq "CURLOPT_ERRORBUFFER") {
print "${pref} errorbuffer);\n$check";
}
- elsif(($name eq "POSTFIELDS") ||
- ($name eq "COPYPOSTFIELDS")) {
- # set size to zero to avoid it being "illegal"
- print " (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE,
0);\n";
- print "${pref} stringpointerextra);\n$check";
+ elsif(($name eq "CURLOPT_POSTFIELDS") ||
+ ($name eq "CURLOPT_COPYPOSTFIELDS")) {
+ # set size to zero to avoid it being "illegal"
+ print " (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE,
0);\n";
+ print "${pref} stringpointerextra);\n$check";
}
- elsif($name eq "HTTPPOST") {
+ elsif($name eq "CURLOPT_HTTPPOST") {
print "${pref} httppost);\n$check";
}
- elsif($name eq "MIMEPOST") {
+ elsif($name eq "CURLOPT_MIMEPOST") {
print "${pref} mimepost);\n$check";
}
- elsif($name eq "STDERR") {
+ elsif($name eq "CURLOPT_STDERR") {
print "${pref} stream);\n$check";
}
else {
@@ -219,20 +219,21 @@ while(<STDIN>) {
}
print "${pref} NULL);\n$check";
}
- elsif($type eq "SLISTPOINT") {
+ elsif($type eq "CURLOPTTYPE_SLISTPOINT") {
print "${pref} slist);\n$check";
}
- elsif($type eq "FUNCTIONPOINT") {
+ elsif($type eq "CURLOPTTYPE_FUNCTIONPOINT") {
if($name =~ /([^ ]*)FUNCTION/) {
- my $l=lc($1);
- print "${pref}\n$i${l}cb);\n$check";
+ my $l=lc($1);
+ $l =~ s/^curlopt_//;
+ print "${pref}\n$i${l}cb);\n$check";
}
else {
- print "${pref} &func);\n$check";
+ print "${pref} &func);\n$check";
}
print "${pref} NULL);\n$check";
}
- elsif($type eq "OFF_T") {
+ elsif($type eq "CURLOPTTYPE_OFF_T") {
# play conservative to work with 32bit curl_off_t
print "${pref} OFF_NO);\n$check";
print "${pref} OFF_HI);\n$check";
@@ -249,7 +250,7 @@ while(<STDIN>) {
($_ =~ /^ CURLINFO_([^ ]*) *= *CURLINFO_([^ ]*)/)) {
my ($info, $type)=($1, $2);
my $c = " res = curl_easy_getinfo(curl, CURLINFO_$info,";
- my $check = " if(UNEX(res)) {\n geterr(\"$info\", res, __LINE__);
goto test_cleanup; }\n";
+ my $check = " if(UNEX(res)) {\n geterr(\"$info\", res, __LINE__);\n
goto test_cleanup;\n }\n";
if($type eq "STRING") {
print "$c &charp);\n$check";
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] branch master updated (697584161 -> 10e1f0a79), gnunet, 2020/04/01
- [gnurl] 08/282: curl.h: remove WIN32 define, gnunet, 2020/04/01
- [gnurl] 02/282: runtests: make random seed fixed for a month, gnunet, 2020/04/01
- [gnurl] 03/282: docs/RELEASE-PROCEDURE.md: pushed some release dates, gnunet, 2020/04/01
- [gnurl] 07/282: tool_dirhie.c: fix the copyright year range, gnunet, 2020/04/01
- [gnurl] 05/282: tool_dirhie: Allow directory traversal during creation, gnunet, 2020/04/01
- [gnurl] 04/282: KNOWN_BUGS: AUTH PLAIN for SMTP is not working on all servers, gnunet, 2020/04/01
- [gnurl] 01/282: RELEASE-PROCEDURE.md: fix next release date (Feb 26), gnunet, 2020/04/01
- [gnurl] 10/282: libtest/mk-lib1521: adapt to new public header layout,
gnunet <=
- [gnurl] 06/282: bump: work towards 7.69.0 is started, gnunet, 2020/04/01
- [gnurl] 12/282: scripts/delta: adapt to new public header layout, gnunet, 2020/04/01
- [gnurl] 15/282: vtls: Refactor Curl_multissl_version to make the code clearer, gnunet, 2020/04/01
- [gnurl] 20/282: cmake: Improve libssh2 check on Windows, gnunet, 2020/04/01
- [gnurl] 17/282: multi: Change curl_multi_wait/poll to error on negative timeout, gnunet, 2020/04/01
- [gnurl] 16/282: cmake: Enable SMB for Windows builds, gnunet, 2020/04/01
- [gnurl] 14/282: fix: Copyright year out of date, should be 2020, gnunet, 2020/04/01
- [gnurl] 18/282: ngtcp2: Add an error code for QUIC connection errors, gnunet, 2020/04/01
- [gnurl] 09/282: include: remove non-curl prefixed defines, gnunet, 2020/04/01
- [gnurl] 21/282: libssh2: add support for forcing a hostkey type, gnunet, 2020/04/01