Sync src with amalgamated versions

Now src contains exactly what's embedded in mongoose.c and .h, nothing more.

Added `tools/amalgam.sh` to aamlgamate both files at once.

There are no functional changes to mongoose.c, .h in this PR, only slight filename changes.
This commit is contained in:
Deomid Ryabkov committed 2020-07-08 02:08:49 +01:00
1 parent 73a2b92278
commit b0a1cd7b0d
198 files changed
+2870 -23966

No files matched your search

+47 -47
View File
@@ -18,7 +18,7 @@
*/
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_common.h"
#line 1 "src/mg_common.h"
#endif
#ifndef CS_MONGOOSE_SRC_COMMON_H_
#define CS_MONGOOSE_SRC_COMMON_H_
@@ -32,7 +32,7 @@
#endif /* CS_MONGOOSE_SRC_COMMON_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platform.h"
#line 1 "src/common/platform.h"
#endif
#ifndef CS_COMMON_PLATFORM_H_
#define CS_COMMON_PLATFORM_H_
@@ -174,7 +174,7 @@
#endif /* CS_COMMON_PLATFORM_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_windows.h"
#line 1 "src/common/platforms/platform_windows.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
#define CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
@@ -360,7 +360,7 @@ unsigned int sleep(unsigned int seconds);
#endif /* CS_PLATFORM == CS_P_WINDOWS */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_unix.h"
#line 1 "src/common/platforms/platform_unix.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
#define CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
@@ -508,7 +508,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_UNIX */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_esp32.h"
#line 1 "src/common/platforms/platform_esp32.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP32_H_
@@ -549,7 +549,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_ESP32 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_ESP32_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_esp8266.h"
#line 1 "src/common/platforms/platform_esp8266.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_
@@ -606,7 +606,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_ESP8266 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_cc3100.h"
#line 1 "src/common/platforms/platform_cc3100.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3100_H_
@@ -651,7 +651,7 @@ int inet_pton(int af, const char *src, void *dst);
#endif /* CS_PLATFORM == CS_P_CC3100 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_CC3100_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_cc3200.h"
#line 1 "src/common/platforms/platform_cc3200.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_
@@ -772,7 +772,7 @@ int stat(const char *pathname, struct stat *st);
#endif /* CS_PLATFORM == CS_P_CC3200 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_cc3220.h"
#line 1 "src/common/platforms/platform_cc3220.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3220_H_
@@ -880,7 +880,7 @@ int stat(const char *pathname, struct stat *st);
#endif /* CS_PLATFORM == CS_P_CC3220 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_msp432.h"
#line 1 "src/common/platforms/platform_msp432.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_MSP432_H_
@@ -984,7 +984,7 @@ int _stat(const char *pathname, struct stat *st);
#endif /* CS_PLATFORM == CS_P_MSP432 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_MSP432_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_tm4c129.h"
#line 1 "src/common/platforms/platform_tm4c129.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_TM4C129_H_
@@ -1040,7 +1040,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_TM4C129 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_TM4C129_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_mbed.h"
#line 1 "src/common/platforms/platform_mbed.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_MBED_H_
@@ -1120,7 +1120,7 @@ in_addr_t inet_addr(const char *cp);
#endif /* CS_PLATFORM == CS_P_MBED */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_MBED_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_nrf51.h"
#line 1 "src/common/platforms/platform_nrf51.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
#define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
@@ -1161,7 +1161,7 @@ int gettimeofday(struct timeval *tp, void *tzp);
#endif /* CS_PLATFORM == CS_P_NRF51 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_nrf52.h"
#line 1 "src/common/platforms/platform_nrf52.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
#define CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
@@ -1205,7 +1205,7 @@ int gettimeofday(struct timeval *tp, void *tzp);
#endif /* CS_PLATFORM == CS_P_NRF52 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/simplelink/cs_simplelink.h"
#line 1 "src/common/platforms/simplelink/cs_simplelink.h"
#endif
#ifndef CS_COMMON_PLATFORMS_SIMPLELINK_CS_SIMPLELINK_H_
@@ -1368,7 +1368,7 @@ int slfs_open(const unsigned char *fname, uint32_t flags, uint32_t *token);
#endif /* CS_COMMON_PLATFORMS_SIMPLELINK_CS_SIMPLELINK_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_wince.h"
#line 1 "src/common/platforms/platform_wince.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_
#define CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_
@@ -1572,7 +1572,7 @@ const char *strerror();
#endif /* CS_PLATFORM == CS_P_WINCE */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_nxp_lpc.h"
#line 1 "src/common/platforms/platform_nxp_lpc.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_LPC_H_
@@ -1624,7 +1624,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_NXP_LPC */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_NXP_LPC_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_nxp_kinetis.h"
#line 1 "src/common/platforms/platform_nxp_kinetis.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_KINETIS_H_
@@ -1654,7 +1654,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_NXP_KINETIS */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_NXP_KINETIS_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_pic32.h"
#line 1 "src/common/platforms/platform_pic32.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_
@@ -1690,7 +1690,7 @@ char *inet_ntoa(struct in_addr in);
#endif /* CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_rs14100.h"
#line 1 "src/common/platforms/platform_rs14100.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
@@ -1738,7 +1738,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_RS14100 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_stm32.h"
#line 1 "src/common/platforms/platform_stm32.h"
#endif
#ifndef CS_COMMON_PLATFORMS_PLATFORM_STM32_H_
@@ -1776,7 +1776,7 @@ typedef struct stat cs_stat_t;
#endif /* CS_PLATFORM == CS_P_STM32 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_STM32_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/lwip/mg_lwip.h"
#line 1 "src/common/platforms/lwip/mg_lwip.h"
#endif
#ifndef CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_
@@ -1843,7 +1843,7 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
#endif /* CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/cs_md5.h"
#line 1 "src/common/cs_md5.h"
#endif
#ifndef CS_COMMON_MD5_H_
@@ -1875,7 +1875,7 @@ void cs_md5_final(unsigned char *md, cs_md5_ctx *c);
#endif /* CS_COMMON_MD5_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/cs_sha1.h"
#line 1 "src/common/cs_sha1.h"
#endif
#ifndef CS_COMMON_SHA1_H_
@@ -1913,7 +1913,7 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len,
#endif /* CS_COMMON_SHA1_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/cs_time.h"
#line 1 "src/common/cs_time.h"
#endif
#ifndef CS_COMMON_CS_TIME_H_
@@ -1942,7 +1942,7 @@ double cs_timegm(const struct tm *tm);
#endif /* CS_COMMON_CS_TIME_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/mg_str.h"
#line 1 "src/common/mg_str.h"
#endif
#ifndef CS_COMMON_MG_STR_H_
@@ -2042,7 +2042,7 @@ int mg_str_starts_with(struct mg_str s, struct mg_str prefix);
#endif /* CS_COMMON_MG_STR_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/mbuf.h"
#line 1 "src/common/mbuf.h"
#endif
/*
@@ -2140,7 +2140,7 @@ void mbuf_trim(struct mbuf *);
#endif /* CS_COMMON_MBUF_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/cs_base64.h"
#line 1 "src/common/cs_base64.h"
#endif
#ifndef CS_COMMON_CS_BASE64_H_
@@ -2193,7 +2193,7 @@ int cs_base64_decode(const unsigned char *s, int len, char *dst, int *dec_len);
#endif /* CS_COMMON_CS_BASE64_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/str_util.h"
#line 1 "src/common/str_util.h"
#endif
#ifndef CS_COMMON_STR_UTIL_H_
@@ -2378,7 +2378,7 @@ size_t mg_match_prefix_n(const struct mg_str pattern, const struct mg_str str);
#endif /* CS_COMMON_STR_UTIL_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/queue.h"
#line 1 "src/common/queue.h"
#endif
/* clang-format off */
/*-
@@ -3133,7 +3133,7 @@ struct { \
#endif /* !_SYS_QUEUE_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_features.h"
#line 1 "src/mg_features.h"
#endif
#ifndef CS_MONGOOSE_SRC_FEATURES_H_
@@ -3308,7 +3308,7 @@ struct { \
#endif /* CS_MONGOOSE_SRC_FEATURES_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_net_if.h"
#line 1 "src/mg_net_if.h"
#endif
#ifndef CS_MONGOOSE_SRC_NET_IF_H_
@@ -3438,7 +3438,7 @@ double mg_mgr_min_timer(const struct mg_mgr *mgr);
#endif /* CS_MONGOOSE_SRC_NET_IF_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_ssl_if.h"
#line 1 "src/mg_ssl_if.h"
#endif
#ifndef CS_MONGOOSE_SRC_SSL_IF_H_
@@ -3492,7 +3492,7 @@ int mg_ssl_if_write(struct mg_connection *nc, const void *data, size_t len);
#endif /* CS_MONGOOSE_SRC_SSL_IF_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_net.h"
#line 1 "src/mg_net.h"
#endif
/*
@@ -4078,7 +4078,7 @@ double mg_time(void);
#endif /* CS_MONGOOSE_SRC_NET_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_uri.h"
#line 1 "src/mg_uri.h"
#endif
/*
@@ -4144,7 +4144,7 @@ int mg_normalize_uri_path(const struct mg_str *in, struct mg_str *out);
#endif /* __cplusplus */
#endif /* CS_MONGOOSE_SRC_URI_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_util.h"
#line 1 "src/mg_util.h"
#endif
/*
@@ -4358,7 +4358,7 @@ struct mg_str mg_url_encode(const struct mg_str src);
#endif /* __cplusplus */
#endif /* CS_MONGOOSE_SRC_UTIL_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_http.h"
#line 1 "src/mg_http.h"
#endif
/*
@@ -4742,7 +4742,7 @@ void mg_http_send_digest_auth_request(struct mg_connection *c,
#endif /* CS_MONGOOSE_SRC_HTTP_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_http_server.h"
#line 1 "src/mg_http_server.h"
#endif
/*
* === Server API reference
@@ -5306,7 +5306,7 @@ void mg_http_reverse_proxy(struct mg_connection *nc,
#endif /* CS_MONGOOSE_SRC_HTTP_SERVER_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_http_client.h"
#line 1 "src/mg_http_client.h"
#endif
/*
* === Client API reference
@@ -5371,7 +5371,7 @@ int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
#endif /* __cplusplus */
#endif /* CS_MONGOOSE_SRC_HTTP_CLIENT_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_mqtt.h"
#line 1 "src/mg_mqtt.h"
#endif
/*
@@ -5586,7 +5586,7 @@ int mg_mqtt_vmatch_topic_expression(const char *exp, struct mg_str topic);
#endif /* CS_MONGOOSE_SRC_MQTT_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_mqtt_server.h"
#line 1 "src/mg_mqtt_server.h"
#endif
/*
@@ -5677,7 +5677,7 @@ struct mg_mqtt_session *mg_mqtt_next(struct mg_mqtt_broker *brk,
#endif /* MG_ENABLE_MQTT_BROKER */
#endif /* CS_MONGOOSE_SRC_MQTT_BROKER_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_dns.h"
#line 1 "src/mg_dns.h"
#endif
/*
@@ -5841,7 +5841,7 @@ void mg_set_protocol_dns(struct mg_connection *nc);
#endif /* __cplusplus */
#endif /* CS_MONGOOSE_SRC_DNS_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_dns_server.h"
#line 1 "src/mg_dns_server.h"
#endif
/*
@@ -5934,7 +5934,7 @@ void mg_dns_send_reply(struct mg_connection *nc, struct mg_dns_reply *r);
#endif /* MG_ENABLE_DNS_SERVER */
#endif /* CS_MONGOOSE_SRC_DNS_SERVER_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_resolv.h"
#line 1 "src/mg_resolv.h"
#endif
/*
@@ -6014,7 +6014,7 @@ int mg_resolve_from_hosts_file(const char *host, union socket_address *usa);
#endif /* __cplusplus */
#endif /* CS_MONGOOSE_SRC_RESOLV_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_coap.h"
#line 1 "src/mg_coap.h"
#endif
/*
@@ -6166,7 +6166,7 @@ uint32_t mg_coap_compose(struct mg_coap_message *cm, struct mbuf *io);
#endif /* CS_MONGOOSE_SRC_COAP_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_sntp.h"
#line 1 "src/mg_sntp.h"
#endif
#ifndef CS_MONGOOSE_SRC_SNTP_H_
@@ -6219,7 +6219,7 @@ struct mg_connection *mg_sntp_get_time(struct mg_mgr *mgr,
#endif /* CS_MONGOOSE_SRC_SNTP_H_ */
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_socks.h"
#line 1 "src/mg_socks.h"
#endif
#ifndef CS_MONGOOSE_SRC_SOCKS_H_