diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-14 00:05:04 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-15 08:54:42 +0200 |
commit | 8df455479f8801bbebad8839fc96abbffa711603 (patch) | |
tree | ad0fcac278779ef75726f8aec6a061453c043282 /src/tool_formparse.h | |
parent | 5d54b5e6971cf26b35d11980d6953bf436419752 (diff) |
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples
- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.
Closes #5338
Diffstat (limited to 'src/tool_formparse.h')
-rw-r--r-- | src/tool_formparse.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/tool_formparse.h b/src/tool_formparse.h index 750fe451f..16c354404 100644 --- a/src/tool_formparse.h +++ b/src/tool_formparse.h @@ -35,12 +35,11 @@ typedef enum { TOOLMIME_STDINDATA } toolmimekind; -typedef struct tool_mime tool_mime; struct tool_mime { /* Structural fields. */ toolmimekind kind; /* Part kind. */ - tool_mime *parent; /* Parent item. */ - tool_mime *prev; /* Previous sibling (reverse order link). */ + struct tool_mime *parent; /* Parent item. */ + struct tool_mime *prev; /* Previous sibling (reverse order link). */ /* Common fields. */ const char *data; /* Actual data or data filename. */ const char *name; /* Part name. */ @@ -49,7 +48,7 @@ struct tool_mime { const char *encoder; /* Part's requested encoding. */ struct curl_slist *headers; /* User-defined headers. */ /* TOOLMIME_PARTS fields. */ - tool_mime *subparts; /* Part's subparts. */ + struct tool_mime *subparts; /* Part's subparts. */ /* TOOLMIME_STDIN/TOOLMIME_STDINDATA fields. */ curl_off_t origin; /* Stdin read origin offset. */ curl_off_t size; /* Stdin data size. */ @@ -63,10 +62,10 @@ int tool_mime_stdin_seek(void *instream, curl_off_t offset, int whence); int formparse(struct OperationConfig *config, const char *input, - tool_mime **mimeroot, - tool_mime **mimecurrent, + struct tool_mime **mimeroot, + struct tool_mime **mimecurrent, bool literal_value); -CURLcode tool2curlmime(CURL *curl, tool_mime *m, curl_mime **mime); -void tool_mime_free(tool_mime *mime); +CURLcode tool2curlmime(CURL *curl, struct tool_mime *m, curl_mime **mime); +void tool_mime_free(struct tool_mime *mime); #endif /* HEADER_CURL_TOOL_FORMPARSE_H */ |