mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 17:58:11 +08:00
Fix docs, nits to freertos includes
This commit is contained in:
parent
6b69bef2ef
commit
6ad7af54dc
@ -2682,7 +2682,7 @@ char *msg = mg_mprintf("Double quoted string: %Q!", "hi");
|
|||||||
free(msg);
|
free(msg);
|
||||||
```
|
```
|
||||||
|
|
||||||
### mg\_rprintf(), mg\_vrprintf()
|
### mg\_xprintf(), mg\_vxprintf()
|
||||||
|
|
||||||
```c
|
```c
|
||||||
size_t mg_xprintf(void (*out)(char, void *), void *param, const char *fmt, ...);
|
size_t mg_xprintf(void (*out)(char, void *), void *param, const char *fmt, ...);
|
||||||
|
10
mongoose.h
10
mongoose.h
@ -168,6 +168,7 @@ extern "C" {
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -201,17 +202,12 @@ static inline void *mg_calloc(int cnt, size_t size) {
|
|||||||
#define calloc(a, b) mg_calloc((a), (b))
|
#define calloc(a, b) mg_calloc((a), (b))
|
||||||
#define free(a) vPortFree(a)
|
#define free(a) vPortFree(a)
|
||||||
#define malloc(a) pvPortMalloc(a)
|
#define malloc(a) pvPortMalloc(a)
|
||||||
|
|
||||||
#define mkdir(a, b) (-1)
|
#define mkdir(a, b) (-1)
|
||||||
|
|
||||||
#ifndef MG_IO_SIZE
|
#ifndef MG_IO_SIZE
|
||||||
#define MG_IO_SIZE 512
|
#define MG_IO_SIZE 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MG_PATH_MAX
|
|
||||||
#define MG_PATH_MAX 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP
|
#endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP
|
||||||
|
|
||||||
|
|
||||||
@ -230,9 +226,11 @@ static inline void *mg_calloc(int cnt, size_t size) {
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
|
#include <list.h>
|
||||||
|
#include <task.h>
|
||||||
|
|
||||||
#include <FreeRTOS_IP.h>
|
#include <FreeRTOS_IP.h>
|
||||||
#include <FreeRTOS_Sockets.h>
|
#include <FreeRTOS_Sockets.h>
|
||||||
#include <task.h>
|
|
||||||
|
|
||||||
// Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing
|
// Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing
|
||||||
// with FreeRTOS_ prefix, is beyond me
|
// with FreeRTOS_ prefix, is beyond me
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -38,15 +39,10 @@ static inline void *mg_calloc(int cnt, size_t size) {
|
|||||||
#define calloc(a, b) mg_calloc((a), (b))
|
#define calloc(a, b) mg_calloc((a), (b))
|
||||||
#define free(a) vPortFree(a)
|
#define free(a) vPortFree(a)
|
||||||
#define malloc(a) pvPortMalloc(a)
|
#define malloc(a) pvPortMalloc(a)
|
||||||
|
|
||||||
#define mkdir(a, b) (-1)
|
#define mkdir(a, b) (-1)
|
||||||
|
|
||||||
#ifndef MG_IO_SIZE
|
#ifndef MG_IO_SIZE
|
||||||
#define MG_IO_SIZE 512
|
#define MG_IO_SIZE 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MG_PATH_MAX
|
|
||||||
#define MG_PATH_MAX 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP
|
#endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
|
#include <list.h>
|
||||||
|
#include <task.h>
|
||||||
|
|
||||||
#include <FreeRTOS_IP.h>
|
#include <FreeRTOS_IP.h>
|
||||||
#include <FreeRTOS_Sockets.h>
|
#include <FreeRTOS_Sockets.h>
|
||||||
#include <task.h>
|
|
||||||
|
|
||||||
// Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing
|
// Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing
|
||||||
// with FreeRTOS_ prefix, is beyond me
|
// with FreeRTOS_ prefix, is beyond me
|
||||||
|
Loading…
x
Reference in New Issue
Block a user