mirror of
https://github.com/curl/curl.git
synced 2026-07-27 00:47:17 +03:00
tidy-up: more whitespace/indent, comments
Also a couple of minor formatting updates in the root `CMakeLists.txt`. One swap to `#ifdef`. Closes #17929
This commit is contained in:
parent
63a8167f3e
commit
4d977fe552
82 changed files with 351 additions and 378 deletions
|
|
@ -640,7 +640,7 @@ static void gen_cb_setopts(struct OperationConfig *config,
|
|||
CURL *curl)
|
||||
{
|
||||
struct GlobalConfig *global = config->global;
|
||||
(void) config;
|
||||
(void)config;
|
||||
/* where to store */
|
||||
my_setopt(curl, CURLOPT_WRITEDATA, per);
|
||||
my_setopt(curl, CURLOPT_INTERLEAVEDATA, per);
|
||||
|
|
|
|||
|
|
@ -244,8 +244,8 @@ int main(int argc, char **argv)
|
|||
{
|
||||
int i;
|
||||
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
for(i = 0; disabled[i]; i++)
|
||||
printf("%s\n", disabled[i]);
|
||||
|
|
|
|||
|
|
@ -98,13 +98,13 @@ HEAD
|
|||
#define BUF_SIZE 0x10000
|
||||
static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
|
||||
{
|
||||
(void) opaque;
|
||||
(void)opaque;
|
||||
/* not a typo, keep it calloc() */
|
||||
return (voidpf) calloc(items, size);
|
||||
}
|
||||
static void zfree_func(voidpf opaque, voidpf ptr)
|
||||
{
|
||||
(void) opaque;
|
||||
(void)opaque;
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static char *parse_filename(const char *ptr, size_t len);
|
|||
|
||||
#ifdef LINK
|
||||
static void write_linked_location(CURL *curl, const char *location,
|
||||
size_t loclen, FILE *stream);
|
||||
size_t loclen, FILE *stream);
|
||||
#endif
|
||||
|
||||
int tool_write_headers(struct HdrCbData *hdrcbdata, FILE *stream)
|
||||
|
|
@ -81,7 +81,6 @@ fail:
|
|||
/*
|
||||
** callback for CURLOPT_HEADERFUNCTION
|
||||
*/
|
||||
|
||||
size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
|
||||
{
|
||||
struct per_transfer *per = userdata;
|
||||
|
|
@ -402,9 +401,9 @@ static char *parse_filename(const char *ptr, size_t len)
|
|||
* should not be needed but the real world returns plenty of relative
|
||||
* URLs here.
|
||||
*/
|
||||
static
|
||||
void write_linked_location(CURL *curl, const char *location, size_t loclen,
|
||||
FILE *stream) {
|
||||
static void write_linked_location(CURL *curl, const char *location,
|
||||
size_t loclen, FILE *stream)
|
||||
{
|
||||
/* This would so simple if CURLINFO_REDIRECT_URL were available here */
|
||||
CURLU *u = NULL;
|
||||
char *copyloc = NULL, *locurl = NULL, *scheme = NULL, *finalurl = NULL;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#if defined(_WIN32) || (defined(MSDOS) && !defined(__DJGPP__))
|
||||
# define mkdir(x,y) (mkdir)((x))
|
||||
# ifndef F_OK
|
||||
# define F_OK 0
|
||||
# define F_OK 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -151,5 +151,4 @@ void setfiletime(curl_off_t filetime, const char *filename,
|
|||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \
|
||||
defined(_WIN32) */
|
||||
#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || defined(_WIN32) */
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ size_t tool_mime_stdin_read(char *buffer,
|
|||
{
|
||||
struct tool_mime *sip = (struct tool_mime *) arg;
|
||||
curl_off_t bytesleft;
|
||||
(void) size; /* Always 1: ignored. */
|
||||
(void)size; /* Always 1: ignored. */
|
||||
|
||||
if(sip->size >= 0) {
|
||||
if(sip->curpos >= sip->size)
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ static char *c_escape(const char *str, curl_off_t len)
|
|||
result = curlx_dyn_addn(&escaped, str, s - str);
|
||||
|
||||
if(!result)
|
||||
(void) !curlx_dyn_addn(&escaped, "...", cutoff);
|
||||
(void)!curlx_dyn_addn(&escaped, "...", cutoff);
|
||||
|
||||
return curlx_dyn_ptr(&escaped);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ CURLcode tool_setopt(CURL *curl, bool str,
|
|||
#define my_setopt_offt(x,y,z) \
|
||||
curl_easy_setopt(x, y, (curl_off_t)(z))
|
||||
|
||||
#define my_setopt_str(x,y,z) \
|
||||
#define my_setopt_str(x,y,z) \
|
||||
curl_easy_setopt(x, y, z)
|
||||
|
||||
#define my_setopt_enum(x,y,z) \
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#ifdef __VMS
|
||||
|
||||
#if defined(__DECC) && !defined(__VAX) && \
|
||||
defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
|
||||
defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
|
||||
#include <unixlib.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ void vms_special_exit(int code, int vms_show)
|
|||
}
|
||||
|
||||
#if defined(__DECC) && !defined(__VAX) && \
|
||||
defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
|
||||
defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
|
||||
|
||||
/*
|
||||
* 2004-09-19 SMS.
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ void vms_special_exit(int code, int vms_show);
|
|||
#undef exit
|
||||
#define exit(__code) vms_special_exit((__code), (0))
|
||||
|
||||
#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
|
||||
#define VMSSTS_HIDE VMS_STS(1,0,0,0)
|
||||
#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
|
||||
#define VMSSTS_HIDE VMS_STS(1,0,0,0)
|
||||
|
||||
#endif /* __VMS */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue