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

@ -70,23 +70,6 @@ struct cw_pause_ctx {
size_t buf_total;
};
static CURLcode cw_pause_write(struct Curl_easy *data,
struct Curl_cwriter *writer, int type,
const char *buf, size_t nbytes);
static void cw_pause_close(struct Curl_easy *data,
struct Curl_cwriter *writer);
static CURLcode cw_pause_init(struct Curl_easy *data,
struct Curl_cwriter *writer);
const struct Curl_cwtype Curl_cwt_pause = {
"cw-pause",
NULL,
cw_pause_init,
cw_pause_write,
cw_pause_close,
sizeof(struct cw_pause_ctx)
};
static CURLcode cw_pause_init(struct Curl_easy *data,
struct Curl_cwriter *writer)
{
@ -220,6 +203,15 @@ static CURLcode cw_pause_write(struct Curl_easy *data,
return result;
}
const struct Curl_cwtype Curl_cwt_pause = {
"cw-pause",
NULL,
cw_pause_init,
cw_pause_write,
cw_pause_close,
sizeof(struct cw_pause_ctx)
};
CURLcode Curl_cw_pause_flush(struct Curl_easy *data)
{
struct Curl_cwriter *cw_pause;