mongoose/examples
Deomid Ryabkov bafc30bec6 Change from using #ifdef to #if for features tests
"#if FOO" still works with simple -DFOO, but gives more flexibility.
Specifically, if user expressed no preference (FOO is not defined),
we can apply reasonable defaults (this is the legitimate use of ifdef).

In short, from now on, please use

 #if MG_ENABLE_FOO

instead of

 #ifdef MG_ENABLE_FOO

Since we are all used to #ifdef, this change also adds a precommit check
to police this. Specifically, in *.h and *.c files that are Copyright Cesanta,
"ifdef" and "if defined()" are not allowed to be used with macros that contain
ENABLE or DISABLE, unless the like also contains "ifdef-ok".

Hence, if you are sure you want to use ifdef, use this:

 #ifdef MG_ENABLE_FOO /* ifdef-ok */

PUBLISHED_FROM=9be829448f53cff575d6cae8b9945fb12531c15a
2016-10-13 18:07:25 +00:00
..
api_server Replace strnlen with c_strnlen 2016-03-21 13:29:35 +01:00
arduino_restful_client s/dmg/dns/g 2015-10-21 15:17:11 +02:00
arduino_restful_server s/dmg/dns/g 2015-10-21 15:17:11 +02:00
big_upload clang-format *ALL* the things! 2016-06-09 11:19:57 +00:00
captive_dns_server Remove cs_dbg.h from amalgamated headers 2016-08-18 14:06:18 +00:00
CC3200 Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
coap_client Fix mongoose/examples compilation with mingw 2016-03-10 13:11:22 +01:00
coap_server Use void arguments list consistently in C code 2016-09-05 15:51:19 +00:00
connected_device_1 Add examples for mongoose blog article 2015-10-02 13:10:47 +01:00
connected_device_2 Add mg_http_send_redirect and make examples use it 2016-09-30 11:22:00 +00:00
connected_device_3 Add mg_http_send_redirect and make examples use it 2016-09-30 11:22:00 +00:00
connected_device_4 Add mg_http_send_redirect and make examples use it 2016-09-30 11:22:00 +00:00
cookie_auth Add mg_http_send_redirect and make examples use it 2016-09-30 11:22:00 +00:00
dll Add DLL building example 2016-08-26 09:21:09 +00:00
ESP8266_RTOS Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
http_client clang-format *ALL* the things! 2016-06-09 11:19:57 +00:00
load_balancer Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
mcast_udp_server Simple mDNS + DNS-SD impl 2016-09-28 08:51:47 +00:00
mqtt_broker Add STM32F4/CC3100 example & Co 2016-09-05 15:06:21 +00:00
mqtt_client Implement MQTT connect username/password 2016-05-18 12:07:20 +03:00
MSP432/ccs Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
multithreaded_restful_server clang-format *ALL* the things! 2016-06-09 11:19:57 +00:00
netcat Report errors in the netcat example 2016-09-29 12:05:53 +00:00
PIC32/mqtt_client/firmware Add PIC32MX/CC3100 mqtt_client example 2016-09-30 12:39:35 +00:00
publish_subscribe Compile examples with -Werror 2016-08-08 10:36:19 +00:00
restful_client Fix mongoose/examples compilation with mingw 2016-03-10 13:11:22 +01:00
restful_server Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
restful_server_s3 Fix mg examples 2016-04-06 08:25:50 +01:00
settings_panel_for_a_device Add a radio button to teh settins_panel example 2016-06-28 09:27:44 +00:00
simple_crawler Use void arguments list consistently in C code 2016-09-05 15:51:19 +00:00
simplest_web_server Add simplest_web_server_ssl example 2016-08-22 22:20:45 +00:00
simplest_web_server_ssl Change from using #ifdef to #if for features tests 2016-10-13 18:07:25 +00:00
STM32F4_CC3100 Add STM32F4/CC3100 example & Co 2016-09-05 15:06:21 +00:00
tcp_echo_server clang-format *ALL* the things! 2016-06-09 11:19:57 +00:00
timers Add timers example to mongoose 2016-07-06 13:56:47 +00:00
udp_echo_server clang-format *ALL* the things! 2016-06-09 11:19:57 +00:00
websocket_chat Update websocket_chat, add websocket_chat_client 2016-04-27 17:48:40 +01:00
websocket_chat_client Update websocket_chat, add websocket_chat_client 2016-04-27 17:48:40 +01:00
.gitignore Enable building of example/Makefile on Win32 2015-01-10 16:41:58 +08:00
examples.mk Compile examples with -Werror 2016-08-08 10:36:19 +00:00
Makefile Add PIC32MX/CC3100 mqtt_client example 2016-09-30 12:39:35 +00:00