diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2024-04-08 15:48:32 +0200 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2024-04-08 15:48:32 +0200 |
commit | 84818782594265f98d693e233da01168005120ed (patch) | |
tree | 630a7ac2a2093240337828d19623f406ca418bc4 | |
parent | 68c22de0f69f261a51d967ea762ffabdfed1a7dd (diff) | |
download | libmicrohttpd-84818782594265f98d693e233da01168005120ed.tar.gz libmicrohttpd-84818782594265f98d693e233da01168005120ed.zip |
microhttpd2.h: workaround for uncrustify bug
Also worked around Emasecns autoindent and makes the code more readable
-rw-r--r-- | src/include/microhttpd2.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h index 18027efc..7e324f88 100644 --- a/src/include/microhttpd2.h +++ b/src/include/microhttpd2.h | |||
@@ -142,14 +142,18 @@ | |||
142 | #ifndef MICROHTTPD2_H | 142 | #ifndef MICROHTTPD2_H |
143 | #define MICROHTTPD2_H | 143 | #define MICROHTTPD2_H |
144 | 144 | ||
145 | #ifndef __cplusplus | ||
146 | # define MHD_C_DECLRATIONS_START_HERE_ /* Empty */ | ||
147 | # define MHD_C_DECLRATIONS_FINISH_HERE_ /* Empty */ | ||
148 | #else /* __cplusplus */ | ||
149 | /* *INDENT-OFF* */ | ||
150 | # define MHD_C_DECLRATIONS_START_HERE_ extern "C" { | ||
151 | # define MHD_C_DECLRATIONS_FINISH_HERE_ } | ||
152 | /* *INDENT-ON* */ | ||
153 | #endif /* __cplusplus */ | ||
145 | 154 | ||
146 | #ifdef __cplusplus | 155 | |
147 | extern "C" | 156 | MHD_C_DECLRATIONS_START_HERE_ |
148 | { | ||
149 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
150 | } | ||
151 | #endif | ||
152 | #endif | ||
153 | 157 | ||
154 | /* While we generally would like users to use a configure-driven | 158 | /* While we generally would like users to use a configure-driven |
155 | build process which detects which headers are present and | 159 | build process which detects which headers are present and |
@@ -6542,10 +6546,9 @@ MHD_NOWARN_VARIADIC_MACROS_ | |||
6542 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ | 6546 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ |
6543 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ | 6547 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ |
6544 | # elif defined(MHD_USE_CPP_INIT_LIST) | 6548 | # elif defined(MHD_USE_CPP_INIT_LIST) |
6545 | } /* extern "C" */ | 6549 | MHD_C_DECLRATIONS_FINISH_HERE_ |
6546 | # include <vector> | 6550 | # include <vector> |
6547 | extern "C" | 6551 | MHD_C_DECLRATIONS_START_HERE_ |
6548 | { | ||
6549 | /** | 6552 | /** |
6550 | * Set the requested options for the daemon. | 6553 | * Set the requested options for the daemon. |
6551 | * | 6554 | * |
@@ -6885,10 +6888,9 @@ MHD_NOWARN_VARIADIC_MACROS_ | |||
6885 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ | 6888 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ |
6886 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ | 6889 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ |
6887 | # elif defined(MHD_USE_CPP_INIT_LIST) | 6890 | # elif defined(MHD_USE_CPP_INIT_LIST) |
6888 | } /* extern "C" */ | 6891 | MHD_C_DECLRATIONS_FINISH_HERE_ |
6889 | # include <vector> | 6892 | # include <vector> |
6890 | extern "C" | 6893 | MHD_C_DECLRATIONS_START_HERE_ |
6891 | { | ||
6892 | /** | 6894 | /** |
6893 | * Set the requested options for the connection. | 6895 | * Set the requested options for the connection. |
6894 | * | 6896 | * |
@@ -8161,10 +8163,9 @@ MHD_NOWARN_VARIADIC_MACROS_ | |||
8161 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ | 8163 | MHD_OPTIONS_ARRAY_MAX_SIZE) \ |
8162 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ | 8164 | MHD_RESTORE_WARN_COMPOUND_LITERALS_ |
8163 | # elif defined(MHD_USE_CPP_INIT_LIST) | 8165 | # elif defined(MHD_USE_CPP_INIT_LIST) |
8164 | } /* extern "C" */ | 8166 | MHD_C_DECLRATIONS_FINISH_HERE_ |
8165 | # include <vector> | 8167 | # include <vector> |
8166 | extern "C" | 8168 | MHD_C_DECLRATIONS_START_HERE_ |
8167 | { | ||
8168 | /** | 8169 | /** |
8169 | * Set the requested options for the daemon. | 8170 | * Set the requested options for the daemon. |
8170 | * | 8171 | * |
@@ -11674,5 +11675,6 @@ MHD_lib_set_panic_func (MHD_PanicCallback cb, | |||
11674 | #define MHD_lib_set_panic_func_default() \ | 11675 | #define MHD_lib_set_panic_func_default() \ |
11675 | MHD_lib_set_panic_func (MHD_STATIC_CAST_ (MHD_PanicCallback,NULL),NULL) | 11676 | MHD_lib_set_panic_func (MHD_STATIC_CAST_ (MHD_PanicCallback,NULL),NULL) |
11676 | 11677 | ||
11678 | MHD_C_DECLRATIONS_FINISH_HERE_ | ||
11677 | 11679 | ||
11678 | #endif | 11680 | #endif /* ! MICROHTTPD2_H */ |