aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-23 07:53:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-24 23:58:22 +0100
commitdbadaebfc4e9d453232795f54d4fe5618cf8e84d (patch)
tree5899d1f99ce0d767d28d753e6e6552896d47d01f /docs/examples
parentbc7e08471c1884a5100b6e0513a006c263ec3c6b (diff)
checksrc: code style: use 'char *name' style
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/cacertinmem.c12
-rw-r--r--docs/examples/curlx.c42
-rw-r--r--docs/examples/fopen.c2
-rw-r--r--docs/examples/ftpuploadresume.c6
-rw-r--r--docs/examples/opensslthreadlock.c2
5 files changed, 32 insertions, 32 deletions
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index bba8c722e..ace58e48e 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -34,12 +34,12 @@ size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
return (nmemb*size);
}
-static CURLcode sslctx_function(CURL * curl, void * sslctx, void * parm)
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
{
- X509_STORE * store;
- X509 * cert=NULL;
- BIO * bio;
- char * mypem = /* www.cacert.org */
+ X509_STORE *store;
+ X509 *cert=NULL;
+ BIO *bio;
+ char *mypem = /* www.cacert.org */
"-----BEGIN CERTIFICATE-----\n"\
"MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\
"IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\
@@ -107,7 +107,7 @@ static CURLcode sslctx_function(CURL * curl, void * sslctx, void * parm)
int main(void)
{
- CURL * ch;
+ CURL *ch;
CURLcode rv;
rv=curl_global_init(CURL_GLOBAL_ALL);
diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c
index 155da2371..e0d709999 100644
--- a/docs/examples/curlx.c
+++ b/docs/examples/curlx.c
@@ -133,14 +133,14 @@ static const char *curlx_usage[]={
/* This is a context that we pass to all callbacks */
typedef struct sslctxparm_st {
- unsigned char * p12file;
- const char * pst;
- PKCS12 * p12;
- EVP_PKEY * pkey;
- X509 * usercert;
+ unsigned char *p12file;
+ const char *pst;
+ PKCS12 *p12;
+ EVP_PKEY *pkey;
+ X509 *usercert;
STACK_OF(X509) * ca;
- CURL * curl;
- BIO * errorbio;
+ CURL *curl;
+ BIO *errorbio;
int accesstype;
int verbose;
@@ -196,7 +196,7 @@ static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg)
BIO_printf(p->errorbio, "entering ssl_app_verify_callback\n");
if((ok= X509_verify_cert(ctx)) && ctx->cert) {
- unsigned char * accessinfo;
+ unsigned char *accessinfo;
if(p->verbose > 1)
X509_print_ex(p->errorbio, ctx->cert, 0, 0);
@@ -228,10 +228,10 @@ static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg)
- an application verification callback (the function above)
*/
-static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm)
+static CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm)
{
- sslctxparm * p = (sslctxparm *) parm;
- SSL_CTX * ctx = (SSL_CTX *) sslctx;
+ sslctxparm *p = (sslctxparm *) parm;
+ SSL_CTX *ctx = (SSL_CTX *) sslctx;
if(!SSL_CTX_use_certificate(ctx, p->usercert)) {
BIO_printf(p->errorbio, "SSL_CTX_use_certificate problem\n");
@@ -270,24 +270,24 @@ int main(int argc, char **argv)
BIO* in=NULL;
BIO* out=NULL;
- char * outfile = NULL;
- char * infile = NULL;
+ char *outfile = NULL;
+ char *infile = NULL;
int tabLength=100;
char *binaryptr;
- char* mimetype;
- char* mimetypeaccept=NULL;
- char* contenttype;
- const char** pp;
- unsigned char* hostporturl = NULL;
- BIO * p12bio;
+ char *mimetype;
+ char *mimetypeaccept=NULL;
+ char *contenttype;
+ const char **pp;
+ unsigned char *hostporturl = NULL;
+ BIO *p12bio;
char **args = argv + 1;
- unsigned char * serverurl;
+ unsigned char *serverurl;
sslctxparm p;
char *response;
CURLcode res;
- struct curl_slist * headers=NULL;
+ struct curl_slist *headers=NULL;
int badarg=0;
binaryptr = malloc(tabLength);
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index 71be178ef..7435264a7 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -84,7 +84,7 @@ URL_FILE *url_fopen(const char *url, const char *operation);
int url_fclose(URL_FILE *file);
int url_feof(URL_FILE *file);
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
-char * url_fgets(char *ptr, size_t size, URL_FILE *file);
+char *url_fgets(char *ptr, size_t size, URL_FILE *file);
void url_rewind(URL_FILE *file);
/* we use a global one for convenience */
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index 641563404..8f7f45dae 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -36,8 +36,8 @@
/* The MinGW headers are missing a few Win32 function definitions,
you shouldn't need this if you use VC++ */
#if defined(__MINGW32__) && !defined(__MINGW64__)
-int __cdecl _snscanf(const char * input, size_t length,
- const char * format, ...);
+int __cdecl _snscanf(const char *input, size_t length,
+ const char *format, ...);
#endif
@@ -77,7 +77,7 @@ size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream)
}
-int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
+int upload(CURL *curlhandle, const char *remotepath, const char *localpath,
long timeout, long tries)
{
FILE *f;
diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c
index eebc42ee2..6f86c7f70 100644
--- a/docs/examples/opensslthreadlock.c
+++ b/docs/examples/opensslthreadlock.c
@@ -52,7 +52,7 @@ void handle_error(const char *file, int lineno, const char *msg)
/* This array will store all of the mutexes available to OpenSSL. */
static MUTEX_TYPE *mutex_buf= NULL;
-static void locking_function(int mode, int n, const char * file, int line)
+static void locking_function(int mode, int n, const char *file, int line)
{
if(mode & CRYPTO_LOCK)
MUTEX_LOCK(mutex_buf[n]);