Classes | Defines | Functions
ccsidcurl.c File Reference
#include <iconv.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <stdarg.h>
#include "curl.h"
#include "mprintf.h"
#include "slist.h"
#include "urldata.h"
#include "url.h"
#include "getinfo.h"
#include "ccsidcurl.h"
#include "os400sys.h"
Include dependency graph for ccsidcurl.c:

Go to the source code of this file.

Classes

struct  cfcdata

Defines

#define ALLOC_GRANULE   8 /* Alloc. granule for curl_formadd_ccsid(). */
#define ASCII_CCSID   819 /* Use ISO-8859-1 as ASCII. */
#define ICONV_ID_SIZE   32 /* Size of iconv_open() code identifier. */
#define ICONV_OPEN_ERROR(t)   ((t).return_value == -1)
#define NOCONV_CCSID   65535 /* No conversion. */
#define SIZE_MAX   ((size_t) ~0) /* Is unsigned on OS/400. */

Functions

static int convert (char *d, size_t dlen, int dccsid, const char *s, int slen, int sccsid)
static int convert_version_info_string (const char **stringp, char **bufp, int *left, unsigned int ccsid)
void curl_certinfo_free_all (struct curl_certinfo *info)
char * curl_easy_escape_ccsid (CURL *handle, const char *string, int length, unsigned int sccsid, unsigned int dccsid)
CURLcode curl_easy_getinfo_ccsid (CURL *curl, CURLINFO info,...)
CURLcode curl_easy_setopt_ccsid (CURL *curl, CURLoption tag,...)
const char * curl_easy_strerror_ccsid (CURLcode error, unsigned int ccsid)
char * curl_easy_unescape_ccsid (CURL *handle, const char *string, int length, int *outlength, unsigned int sccsid, unsigned int dccsid)
char * curl_form_long_value (long value)
CURLFORMcode curl_formadd_ccsid (struct curl_httppost **httppost, struct curl_httppost **last_post,...)
static int Curl_formadd_convert (struct curl_forms *forms, int formx, int lengthx, unsigned int ccsid)
static void Curl_formadd_release_local (struct curl_forms *forms, int nargs, int skip)
static size_t Curl_formget_callback_ccsid (void *arg, const char *buf, size_t len)
int curl_formget_ccsid (struct curl_httppost *form, void *arg, curl_formget_callback append, unsigned int ccsid)
time_t curl_getdate_ccsid (const char *p, const time_t *unused, unsigned int ccsid)
static int Curl_is_formadd_string (CURLformoption option)
const char * curl_multi_strerror_ccsid (CURLMcode error, unsigned int ccsid)
char * curl_pushheader_byname_ccsid (struct curl_pushheaders *h, const char *header, unsigned int ccsidin, unsigned int ccsidout)
char * curl_pushheader_bynum_cssid (struct curl_pushheaders *h, size_t num, unsigned int ccsid)
const char * curl_share_strerror_ccsid (CURLSHcode error, unsigned int ccsid)
struct curl_slistcurl_slist_append_ccsid (struct curl_slist *list, const char *data, unsigned int ccsid)
char * curl_version_ccsid (unsigned int ccsid)
curl_version_info_datacurl_version_info_ccsid (CURLversion stamp, unsigned int ccsid)
static char * dynconvert (int dccsid, const char *s, int slen, int sccsid)
static iconv_t iconv_open_CCSID (unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr)
static void makeOS400IconvCode (char buf[ICONV_ID_SIZE], unsigned int ccsid)
static struct curl_slistslist_convert (int dccsid, struct curl_slist *from, int sccsid)

Define Documentation

#define ALLOC_GRANULE   8 /* Alloc. granule for curl_formadd_ccsid(). */

Definition at line 54 of file ccsidcurl.c.

#define ASCII_CCSID   819 /* Use ISO-8859-1 as ASCII. */

Definition at line 49 of file ccsidcurl.c.

#define ICONV_ID_SIZE   32 /* Size of iconv_open() code identifier. */

Definition at line 51 of file ccsidcurl.c.

#define ICONV_OPEN_ERROR (   t)    ((t).return_value == -1)

Definition at line 52 of file ccsidcurl.c.

#define NOCONV_CCSID   65535 /* No conversion. */

Definition at line 50 of file ccsidcurl.c.

#define SIZE_MAX   ((size_t) ~0) /* Is unsigned on OS/400. */

Definition at line 45 of file ccsidcurl.c.


Function Documentation

static int convert ( char *  d,
size_t  dlen,
int  dccsid,
const char *  s,
int  slen,
int  sccsid 
) [static]

Convert `sccsid'-coded `slen'-data bytes at `s' into `dccsid'-coded data stored in the `dlen'-byte buffer at `d'. If `slen' < 0, source string is null-terminated. CCSID 65535 (no conversion) is replaced by the ASCII CCSID. Return the converted destination byte count, or -1 if error.

Definition at line 106 of file ccsidcurl.c.

static int convert_version_info_string ( const char **  stringp,
char **  bufp,
int *  left,
unsigned int  ccsid 
) [static]

Definition at line 369 of file ccsidcurl.c.

void curl_certinfo_free_all ( struct curl_certinfo info)

Definition at line 587 of file ccsidcurl.c.

char* curl_easy_escape_ccsid ( CURL handle,
const char *  string,
int  length,
unsigned int  sccsid,
unsigned int  dccsid 
)

Definition at line 260 of file ccsidcurl.c.

CURLcode curl_easy_getinfo_ccsid ( CURL curl,
CURLINFO  info,
  ... 
)

Definition at line 605 of file ccsidcurl.c.

CURLcode curl_easy_setopt_ccsid ( CURL curl,
CURLoption  tag,
  ... 
)

Definition at line 1106 of file ccsidcurl.c.

const char* curl_easy_strerror_ccsid ( CURLcode  error,
unsigned int  ccsid 
)

Definition at line 512 of file ccsidcurl.c.

char* curl_easy_unescape_ccsid ( CURL handle,
const char *  string,
int  length,
int *  outlength,
unsigned int  sccsid,
unsigned int  dccsid 
)

Definition at line 290 of file ccsidcurl.c.

char* curl_form_long_value ( long  value)

Definition at line 1299 of file ccsidcurl.c.

CURLFORMcode curl_formadd_ccsid ( struct curl_httppost **  httppost,
struct curl_httppost **  last_post,
  ... 
)

Definition at line 779 of file ccsidcurl.c.

static int Curl_formadd_convert ( struct curl_forms forms,
int  formx,
int  lengthx,
unsigned int  ccsid 
) [static]

Definition at line 735 of file ccsidcurl.c.

static void Curl_formadd_release_local ( struct curl_forms forms,
int  nargs,
int  skip 
) [static]

Definition at line 721 of file ccsidcurl.c.

static size_t Curl_formget_callback_ccsid ( void *  arg,
const char *  buf,
size_t  len 
) [static]

Definition at line 1060 of file ccsidcurl.c.

int curl_formget_ccsid ( struct curl_httppost form,
void *  arg,
curl_formget_callback  append,
unsigned int  ccsid 
)

Definition at line 1092 of file ccsidcurl.c.

time_t curl_getdate_ccsid ( const char *  p,
const time_t *  unused,
unsigned int  ccsid 
)

Definition at line 348 of file ccsidcurl.c.

static int Curl_is_formadd_string ( CURLformoption  option) [static]

Definition at line 701 of file ccsidcurl.c.

const char* curl_multi_strerror_ccsid ( CURLMcode  error,
unsigned int  ccsid 
)

Definition at line 562 of file ccsidcurl.c.

char* curl_pushheader_byname_ccsid ( struct curl_pushheaders *  h,
const char *  header,
unsigned int  ccsidin,
unsigned int  ccsidout 
)

Definition at line 1324 of file ccsidcurl.c.

char* curl_pushheader_bynum_cssid ( struct curl_pushheaders *  h,
size_t  num,
unsigned int  ccsid 
)

Definition at line 1309 of file ccsidcurl.c.

const char* curl_share_strerror_ccsid ( CURLSHcode  error,
unsigned int  ccsid 
)

Definition at line 537 of file ccsidcurl.c.

struct curl_slist* curl_slist_append_ccsid ( struct curl_slist list,
const char *  data,
unsigned int  ccsid 
) [read]

Definition at line 325 of file ccsidcurl.c.

char* curl_version_ccsid ( unsigned int  ccsid)

Definition at line 234 of file ccsidcurl.c.

curl_version_info_data* curl_version_info_ccsid ( CURLversion  stamp,
unsigned int  ccsid 
)

Definition at line 394 of file ccsidcurl.c.

static char* dynconvert ( int  dccsid,
const char *  s,
int  slen,
int  sccsid 
) [static]

Definition at line 163 of file ccsidcurl.c.

static iconv_t iconv_open_CCSID ( unsigned int  ccsidout,
unsigned int  ccsidin,
unsigned int  cstr 
) [static]

Like iconv_open(), but character codes are given as CCSIDs. If `cstr' is non-zero, conversion is set up to stop whenever a null character is encountered. See iconv_open() IBM description in "National Language Support API".

Definition at line 80 of file ccsidcurl.c.

static void makeOS400IconvCode ( char  buf[ICONV_ID_SIZE],
unsigned int  ccsid 
) [static]

Convert a CCSID to the corresponding IBM iconv_open() character code identifier. This code is specific to the OS400 implementation of the iconv library. CCSID 65535 (no conversion) is replaced by the ASCII CCSID. CCSID 0 is interpreted by the OS400 as the job's CCSID.

Definition at line 58 of file ccsidcurl.c.

static struct curl_slist* slist_convert ( int  dccsid,
struct curl_slist from,
int  sccsid 
) [static, read]

Definition at line 215 of file ccsidcurl.c.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:07