mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
examples/sampleconv.c: indent changes, made callbacks static
This commit is contained in:
parent
55fcb84859
commit
501b9ebe92
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -42,49 +42,49 @@
|
||||
#include <stdio.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode my_conv_from_ascii_to_ebcdic(char *buffer, size_t length)
|
||||
static CURLcode my_conv_from_ascii_to_ebcdic(char *buffer, size_t length)
|
||||
{
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_a2e(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_a2e(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length)
|
||||
static CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length)
|
||||
{
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_e2a(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_e2a(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length)
|
||||
static CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length)
|
||||
{
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
char *tempptrin, *tempptrout;
|
||||
size_t bytes = length;
|
||||
int rc;
|
||||
tempptrin = tempptrout = buffer;
|
||||
rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes);
|
||||
if(rc == PLATFORM_CONV_OK) {
|
||||
return CURLE_OK;
|
||||
}
|
||||
else {
|
||||
return CURLE_CONV_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
|
Loading…
Reference in New Issue
Block a user