build: drop more forward function declarations

Most by moving functions around. Also delete unused ones.
Reducing their number from 83 to 33.

Remaining ones due to:
- circular dependencies.
- H3 code, that I did not attempt to update and likely the above applies.
- static declarations with attributes (`CURL_PRINTF`, `WARN_UNUSED_RESULT`).
- OS400 code.

Closes #20321
This commit is contained in:
Viktor Szakats 2026-01-14 17:11:55 +01:00
parent 6437bd79ae
commit 82e0d387a2
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
15 changed files with 1095 additions and 1250 deletions

View file

@ -101,22 +101,6 @@ struct cw_out_ctx {
BIT(errored);
};
static CURLcode cw_out_write(struct Curl_easy *data,
struct Curl_cwriter *writer, int type,
const char *buf, size_t nbytes);
static void cw_out_close(struct Curl_easy *data, struct Curl_cwriter *writer);
static CURLcode cw_out_init(struct Curl_easy *data,
struct Curl_cwriter *writer);
const struct Curl_cwtype Curl_cwt_out = {
"cw-out",
NULL,
cw_out_init,
cw_out_write,
cw_out_close,
sizeof(struct cw_out_ctx)
};
static CURLcode cw_out_init(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
@ -455,6 +439,15 @@ static CURLcode cw_out_write(struct Curl_easy *data,
return CURLE_OK;
}
const struct Curl_cwtype Curl_cwt_out = {
"cw-out",
NULL,
cw_out_init,
cw_out_write,
cw_out_close,
sizeof(struct cw_out_ctx)
};
bool Curl_cw_out_is_paused(struct Curl_easy *data)
{
struct Curl_cwriter *cw_out;