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
This commit is contained in:
Daniel Stenberg 2020-05-14 00:05:04 +02:00
parent 5d54b5e697
commit 8df455479f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
71 changed files with 718 additions and 672 deletions

2
docs/examples/.checksrc Normal file
View file

@ -0,0 +1,2 @@
disable TYPEDEFSTRUCT
disable SNPRINTF

View file

@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@ -67,4 +67,4 @@ CS_1 =
CS_ = $(CS_0)
checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -ASNPRINTF $(srcdir)/*.c)
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c)