Skip to content

Commit

Permalink
Remove "mongoose" prefix from includes
Browse files Browse the repository at this point in the history
In certain files it was necessary to make tests work from public
mongoose repo, so this commit makes things consistent.

PUBLISHED_FROM=694454d0ff007229c65d524a2a2beaf126420f15
  • Loading branch information
dimonomid authored and cesantabot committed Feb 5, 2018
1 parent 7bf5144 commit c3d9d17
Show file tree
Hide file tree
Showing 27 changed files with 92 additions and 92 deletions.
70 changes: 35 additions & 35 deletions mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,10 +2167,10 @@ size_t mg_match_prefix(const char *pattern, int pattern_len, const char *str) {
*/

/* Amalgamated: #include "common/cs_time.h" */
/* Amalgamated: #include "mongoose/src/mg_dns.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_resolv.h" */
/* Amalgamated: #include "mongoose/src/mg_util.h" */
/* Amalgamated: #include "mg_dns.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_resolv.h" */
/* Amalgamated: #include "mg_util.h" */

#define MG_MAX_HOST_LEN 200

Expand Down Expand Up @@ -3167,7 +3167,7 @@ double mg_time(void) {
#ifndef CS_MONGOOSE_SRC_NET_IF_SOCKET_H_
#define CS_MONGOOSE_SRC_NET_IF_SOCKET_H_

/* Amalgamated: #include "mongoose/src/mg_net_if.h" */
/* Amalgamated: #include "mg_net_if.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -3196,7 +3196,7 @@ extern const struct mg_iface_vtable mg_socket_iface_vtable;
#define CS_MONGOOSE_SRC_NET_IF_SOCKS_H_

#if MG_ENABLE_SOCKS
/* Amalgamated: #include "mongoose/src/mg_net_if.h" */
/* Amalgamated: #include "mg_net_if.h" */

#ifdef __cplusplus
extern "C" {
Expand All @@ -3212,9 +3212,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable;
#ifdef MG_MODULE_LINES
#line 1 "mongoose/src/mg_net_if.c"
#endif
/* Amalgamated: #include "mongoose/src/mg_net_if.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_net_if_socket.h" */
/* Amalgamated: #include "mg_net_if.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_net_if_socket.h" */

extern const struct mg_iface_vtable mg_default_iface_vtable;

Expand Down Expand Up @@ -3263,9 +3263,9 @@ struct mg_iface *mg_find_iface(struct mg_mgr *mgr,

#if MG_ENABLE_NET_IF_SOCKET

/* Amalgamated: #include "mongoose/src/mg_net_if_socket.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_util.h" */
/* Amalgamated: #include "mg_net_if_socket.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_util.h" */

#define MG_TCP_RECV_BUFFER_SIZE 1024
#define MG_UDP_RECV_BUFFER_SIZE 1500
Expand Down Expand Up @@ -5103,8 +5103,8 @@ int mg_ssl_if_mbed_random(void *ctx, unsigned char *buf, size_t len) {
* All rights reserved
*/

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_uri.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_uri.h" */

/*
* scan string until encountering one of `seps`, keeping track of component
Expand Down Expand Up @@ -5370,8 +5370,8 @@ int mg_assemble_uri(const struct mg_str *scheme, const struct mg_str *user_info,
#if MG_ENABLE_HTTP

/* Amalgamated: #include "common/cs_md5.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_util.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_util.h" */

static const char *mg_version_header = "Mongoose/" MG_VERSION;

Expand Down Expand Up @@ -9787,8 +9787,8 @@ struct mg_connection *mg_connect_ws(
*/

/* Amalgamated: #include "common/cs_base64.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_util.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_util.h" */

/* For platforms with limited libc */
#ifndef MAX
Expand Down Expand Up @@ -10129,8 +10129,8 @@ struct mg_str mg_url_encode(const struct mg_str src) {

#include <string.h>

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_mqtt.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_mqtt.h" */

static uint16_t getu16(const char *p) {
const uint8_t *up = (const uint8_t *) p;
Expand Down Expand Up @@ -10594,8 +10594,8 @@ void mg_mqtt_disconnect(struct mg_connection *nc) {
* All rights reserved
*/

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_mqtt_server.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_mqtt_server.h" */

#if MG_ENABLE_MQTT_BROKER

Expand Down Expand Up @@ -10793,8 +10793,8 @@ struct mg_mqtt_session *mg_mqtt_next(struct mg_mqtt_broker *brk,

#if MG_ENABLE_DNS

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_dns.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_dns.h" */

static int mg_dns_tid = 0xa0;

Expand Down Expand Up @@ -11173,8 +11173,8 @@ void mg_set_protocol_dns(struct mg_connection *nc) {

#if MG_ENABLE_DNS_SERVER

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/dns-server.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "dns-server.h" */

struct mg_dns_reply mg_dns_create_reply(struct mbuf *io,
struct mg_dns_message *msg) {
Expand Down Expand Up @@ -11247,8 +11247,8 @@ int mg_dns_reply_record(struct mg_dns_reply *reply,

#if MG_ENABLE_ASYNC_RESOLVER

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_resolv.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_resolv.h" */

#ifndef MG_DEFAULT_NAMESERVER
#define MG_DEFAULT_NAMESERVER "8.8.8.8"
Expand Down Expand Up @@ -11552,8 +11552,8 @@ void mg_set_nameserver(struct mg_mgr *mgr, const char *nameserver) {
* license, as set out in <https://www.cesanta.com/license>.
*/

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_coap.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_coap.h" */

#if MG_ENABLE_COAP

Expand Down Expand Up @@ -12140,9 +12140,9 @@ int mg_set_protocol_coap(struct mg_connection *nc) {
* All rights reserved
*/

/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mongoose/src/mg_sntp.h" */
/* Amalgamated: #include "mongoose/src/mg_util.h" */
/* Amalgamated: #include "mg_internal.h" */
/* Amalgamated: #include "mg_sntp.h" */
/* Amalgamated: #include "mg_util.h" */

#if MG_ENABLE_SNTP

Expand Down Expand Up @@ -12433,8 +12433,8 @@ struct mg_connection *mg_sntp_get_time(struct mg_mgr *mgr,

#if MG_ENABLE_SOCKS

/* Amalgamated: #include "mongoose/src/mg_socks.h" */
/* Amalgamated: #include "mongoose/src/mg_internal.h" */
/* Amalgamated: #include "mg_socks.h" */
/* Amalgamated: #include "mg_internal.h" */

/*
* https://www.ietf.org/rfc/rfc1928.txt paragraph 3, handle client handshake
Expand Down
22 changes: 11 additions & 11 deletions mongoose.h
Original file line number Diff line number Diff line change
Expand Up @@ -3402,8 +3402,8 @@ int mg_ssl_if_write(struct mg_connection *nc, const void *data, size_t len);
#ifndef CS_MONGOOSE_SRC_NET_H_
#define CS_MONGOOSE_SRC_NET_H_

/* Amalgamated: #include "mongoose/src/mg_common.h" */
/* Amalgamated: #include "mongoose/src/mg_net_if.h" */
/* Amalgamated: #include "mg_common.h" */
/* Amalgamated: #include "mg_net_if.h" */
/* Amalgamated: #include "common/mbuf.h" */

#ifndef MG_VPRINTF_BUFFER_SIZE
Expand Down Expand Up @@ -3978,7 +3978,7 @@ double mg_time(void);
#ifndef CS_MONGOOSE_SRC_URI_H_
#define CS_MONGOOSE_SRC_URI_H_

/* Amalgamated: #include "mongoose/src/mg_net.h" */
/* Amalgamated: #include "mg_net.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -4050,8 +4050,8 @@ int mg_normalize_uri_path(const struct mg_str *in, struct mg_str *out);

#include <stdio.h>

/* Amalgamated: #include "mongoose/src/mg_common.h" */
/* Amalgamated: #include "mongoose/src/mg_net_if.h" */
/* Amalgamated: #include "mg_common.h" */
/* Amalgamated: #include "mg_net_if.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -4261,7 +4261,7 @@ struct mg_str mg_url_encode(const struct mg_str src);

#if MG_ENABLE_HTTP

/* Amalgamated: #include "mongoose/src/mg_net.h" */
/* Amalgamated: #include "mg_net.h" */
/* Amalgamated: #include "common/mg_str.h" */

#ifdef __cplusplus
Expand Down Expand Up @@ -5246,7 +5246,7 @@ int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
#ifndef CS_MONGOOSE_SRC_MQTT_H_
#define CS_MONGOOSE_SRC_MQTT_H_

/* Amalgamated: #include "mongoose/src/mg_net.h" */
/* Amalgamated: #include "mg_net.h" */

struct mg_mqtt_message {
int cmd;
Expand Down Expand Up @@ -5480,7 +5480,7 @@ int mg_mqtt_vmatch_topic_expression(const char *exp, struct mg_str topic);
#if MG_ENABLE_MQTT_BROKER

/* Amalgamated: #include "common/queue.h" */
/* Amalgamated: #include "mongoose/src/mg_mqtt.h" */
/* Amalgamated: #include "mg_mqtt.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -5572,7 +5572,7 @@ struct mg_mqtt_session *mg_mqtt_next(struct mg_mqtt_broker *brk,
#ifndef CS_MONGOOSE_SRC_DNS_H_
#define CS_MONGOOSE_SRC_DNS_H_

/* Amalgamated: #include "mongoose/src/mg_net.h" */
/* Amalgamated: #include "mg_net.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -5743,7 +5743,7 @@ void mg_set_protocol_dns(struct mg_connection *nc);

#if MG_ENABLE_DNS_SERVER

/* Amalgamated: #include "mongoose/src/mg_dns.h" */
/* Amalgamated: #include "mg_dns.h" */

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -5836,7 +5836,7 @@ void mg_dns_send_reply(struct mg_connection *nc, struct mg_dns_reply *r);
#ifndef CS_MONGOOSE_SRC_RESOLV_H_
#define CS_MONGOOSE_SRC_RESOLV_H_

/* Amalgamated: #include "mongoose/src/mg_dns.h" */
/* Amalgamated: #include "mg_dns.h" */

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/mg_coap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* license, as set out in <https://www.cesanta.com/license>.
*/

#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_coap.h"
#include "mg_internal.h"
#include "mg_coap.h"

#if MG_ENABLE_COAP

Expand Down
4 changes: 2 additions & 2 deletions src/mg_dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#if MG_ENABLE_DNS

#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_dns.h"
#include "mg_internal.h"
#include "mg_dns.h"

static int mg_dns_tid = 0xa0;

Expand Down
2 changes: 1 addition & 1 deletion src/mg_dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef CS_MONGOOSE_SRC_DNS_H_
#define CS_MONGOOSE_SRC_DNS_H_

#include "mongoose/src/mg_net.h"
#include "mg_net.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/mg_dns_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#if MG_ENABLE_DNS_SERVER

#include "mongoose/src/mg_internal.h"
#include "mongoose/src/dns-server.h"
#include "mg_internal.h"
#include "dns-server.h"

struct mg_dns_reply mg_dns_create_reply(struct mbuf *io,
struct mg_dns_message *msg) {
Expand Down
2 changes: 1 addition & 1 deletion src/mg_dns_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#if MG_ENABLE_DNS_SERVER

#include "mongoose/src/mg_dns.h"
#include "mg_dns.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/mg_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#if MG_ENABLE_HTTP

#include "common/cs_md5.h"
#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_util.h"
#include "mg_internal.h"
#include "mg_util.h"

static const char *mg_version_header = "Mongoose/" MG_VERSION;

Expand Down
2 changes: 1 addition & 1 deletion src/mg_http.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#if MG_ENABLE_HTTP

#include "mongoose/src/mg_net.h"
#include "mg_net.h"
#include "common/mg_str.h"

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions src/mg_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <string.h>

#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_mqtt.h"
#include "mg_internal.h"
#include "mg_mqtt.h"

static uint16_t getu16(const char *p) {
const uint8_t *up = (const uint8_t *) p;
Expand Down
2 changes: 1 addition & 1 deletion src/mg_mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef CS_MONGOOSE_SRC_MQTT_H_
#define CS_MONGOOSE_SRC_MQTT_H_

#include "mongoose/src/mg_net.h"
#include "mg_net.h"

struct mg_mqtt_message {
int cmd;
Expand Down
4 changes: 2 additions & 2 deletions src/mg_mqtt_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* All rights reserved
*/

#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_mqtt_server.h"
#include "mg_internal.h"
#include "mg_mqtt_server.h"

#if MG_ENABLE_MQTT_BROKER

Expand Down
2 changes: 1 addition & 1 deletion src/mg_mqtt_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#if MG_ENABLE_MQTT_BROKER

#include "common/queue.h"
#include "mongoose/src/mg_mqtt.h"
#include "mg_mqtt.h"

#ifdef __cplusplus
extern "C" {
Expand Down
8 changes: 4 additions & 4 deletions src/mg_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

#include "common/cs_time.h"
#include "mongoose/src/mg_dns.h"
#include "mongoose/src/mg_internal.h"
#include "mongoose/src/mg_resolv.h"
#include "mongoose/src/mg_util.h"
#include "mg_dns.h"
#include "mg_internal.h"
#include "mg_resolv.h"
#include "mg_util.h"

#define MG_MAX_HOST_LEN 200

Expand Down
Loading

0 comments on commit c3d9d17

Please sign in to comment.