1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 09:21:50 -05:00

os400: ebcdic wrappers for new functions. Upgrade ILE/RPG bindings.

This commit is contained in:
Patrick Monnerat 2015-07-21 16:36:34 +02:00
parent 1df8d28381
commit 32d4260c2d
5 changed files with 110 additions and 5 deletions

View File

@ -148,7 +148,7 @@ parameter/array boundary.
Please note that CURLFORM_PTRCONTENTS and CURLFORM_BUFFERPTR are considered
unconvertible strings and thus are NOT followed by a CCSID.
_ curl_easy_getinfo_ccsid
_ curl_easy_getinfo_ccsid()
The following options are followed by a 'char * *' and a CCSID. Unlike
curl_easy_getinfo(), the value returned in the pointer should be freed after
use:
@ -169,6 +169,14 @@ CCSID. Returned structures sould be free'ed using curl_certinfo_free_all() after
use.
Other options are processed like in curl_easy_getinfo().
_ curl_pushheader_bynum_cssid() and curl_pushheader_byname_ccsid()
Although the prototypes are self-explanatory, the returned string pointer
should be freed after use, as opposite to the non-ccsid versions of these
procedures.
Please note that HTTP2 is not (yet) implemented on OS/400, thus these
functions will always return NULL.
Standard compilation environment does support neither autotools nor make;
in fact, very few common utilities are available. As a consequence, the
config-os400.h has been coded manually and the compilation scripts are
@ -265,14 +273,14 @@ _ Do not use original source include files unless you know what you are doing.
ILE/RPG support:
Since 95% of the OS/400 programmers use ILE/RPG exclusively, a definition
/COPY member is provided for this language. To include all libcurl
/INCLUDE member is provided for this language. To include all libcurl
definitions in an ILE/RPG module, line
h bnddir('CURL/CURL')
must figure in the program header, and line
d/copy curl/h,curl.inc
d/include curl/h,curl.inc
in the global data section of the module's source code.

View File

@ -1278,3 +1278,42 @@ curl_form_long_value(long value)
return (char *) value;
}
char *
curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
size_t num, unsigned int ccsid)
{
char *d = (char *) NULL;
char *s = curl_pushheader_bynum(h, num);
if(s)
d = dynconvert(ccsid, s, -1, ASCII_CCSID);
return d;
}
char *
curl_pushheader_byname_ccsid(struct curl_pushheaders *h, const char *header,
unsigned int ccsidin, unsigned int ccsidout)
{
char *d = (char *) NULL;
char *s;
if(header) {
header = dynconvert(ASCII_CCSID, header, -1, ccsidin);
if(header) {
s = curl_pushheader_byname(h, header);
free((char *) header);
if(s)
d = dynconvert(ccsidout, s, -1, ASCII_CCSID);
}
}
return d;
}

View File

@ -61,5 +61,11 @@ CURL_EXTERN int curl_formget_ccsid(struct curl_httppost * form, void * arg,
unsigned int ccsid);
CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...);
CURL_EXTERN void curl_certinfo_free_all(struct curl_certinfo *info);
CURL_EXTERN char *curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
size_t num, unsigned int ccsid);
CURL_EXTERN char *curl_pushheader_byname_ccsid(struct curl_pushheaders *h,
const char *header,
unsigned int ccsidin,
unsigned int ccsidout);
#endif

View File

@ -221,6 +221,8 @@
d CURL_HTTP_VERSION_1_1...
d c 2
d CURL_HTTP_VERSION_2_0...
d c 3
d CURL_HTTP_VERSION_2...
d c 3
*
d CURL_NETRC_IGNORED...
@ -276,6 +278,9 @@
d CURL_CSELECT_ERR...
d c X'00000004'
*
d CURL_PUSH_OK c 0
d CURL_PUSH_DENY c 1
*
d CURLPAUSE_RECV c X'00000001'
d CURLPAUSE_RECV_CONT...
d c X'00000000'
@ -676,7 +681,9 @@
d c 3
*
d CURLSSLOPT_ALLOW_BEAST...
d c 1
d c X'0001'
d CURLSSLOPT_NO_REVOKE...
d c X'0002'
*
/if not defined(CURL_NO_OLDIES)
d curl_ftpssl s like(curl_usessl)
@ -1215,6 +1222,8 @@
d c 10235
d CURLOPT_SERVICE_NAME...
d c 10236
d CURLOPT_PIPEWAIT...
d c 00237
*
/if not defined(CURL_NO_OLDIES)
d CURLOPT_FILE c 10001
@ -1573,6 +1582,18 @@
d c 10012
d CURLMOPT_MAX_TOTAL_CONNECTIONS...
d c 00013
d CURLMOPT_PUSHFUNCTION...
d c 20014
d CURLMOPT_PUSHDATA...
d c 10015
*
* Bitmask bits for CURLMOPT_PIPELING.
*
d CURLPIPE_NOTHING...
d c x'00000000'
d CURLPIPE_HTTP1 c x'00000001'
d CURLPIPE_MULTIPLEX...
d c x'00000002'
*
* Public API enums for RTSP requests.
*
@ -1789,6 +1810,12 @@
d s * based(######ptr######) procptr
*
d curl_socket_callback...
d s * based(######ptr######) procptr
*
d curl_multi_timer_callback...
d s * based(######ptr######) procptr
*
d curl_push_callback...
d s * based(######ptr######) procptr
*
d curl_opensocket_callback...
@ -2106,6 +2133,16 @@
d pr * extproc('curl_multi_strerror') char *
d code value like(CURLMcode)
*
d curl_pushheader_bynum...
d pr * extproc('curl_pushheader_bynum') char *
d h * value curl_pushheaders *
d num 10u 0 value
*
d curl_pushheader_byname...
d pr * extproc('curl_pushheader_byname') char *
d h * value curl_pushheaders *
d header * value options(*string) const char *
*
d curl_multi_socket...
d pr extproc('curl_multi_socket')
d like(CURLMcode)
@ -2273,4 +2310,19 @@
d objectarg * value options(*string: *nopass)
d ccsid 10u 0 value options(*nopass)
*
d curl_pushheader_bynum_ccsid...
d pr * extproc( char *
d 'curl_pushheader_bynum_ccsid')
d h * value curl_pushheaders *
d num 10u 0 value
d ccsid 10u 0 value
*
d curl_pushheader_byname_ccsid...
d pr * extproc( char *
d 'curl_pushheader_byname_ccsid')
d h * value curl_pushheaders *
d header * value options(*string) const char *
d ccsidin 10u 0 value
d ccsidout 10u 0 value
*
/endif

View File

@ -21,7 +21,7 @@ fi
# Create the DOCS source file if it does not exist.
if action_needed "${LIBIFSNAME}/DOCS.FILE"
then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)"
CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
system "${CMD}"
fi