Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
f7a545b9
Unverified
Commit
f7a545b9
authored
Jul 23, 2019
by
Johny Mattsson
Committed by
GitHub
Jul 23, 2019
Browse files
Evict c_types.h, tidy up a other c_prefixes. (#2841)
parent
526d21da
Changes
81
Hide whitespace changes
Inline
Side-by-side
app/modules/wifi_eventmon.c
View file @
f7a545b9
...
...
@@ -5,9 +5,9 @@
#include "platform.h"
#include <string.h>
#include <std
lib
.h>
#include <std
def
.h>
#include
"c_types
.h
"
#include
<stdint
.h
>
#include "user_interface.h"
#include "smart.h"
#include "smartconfig.h"
...
...
app/modules/wifi_monitor.c
View file @
f7a545b9
...
...
@@ -6,10 +6,10 @@
#include "platform.h"
#include <string.h>
#include <std
lib
.h>
#include <std
def
.h>
#include "ctype.h"
#include
"c_types
.h
"
#include
<stdint
.h
>
#include "user_interface.h"
#include "wifi_common.h"
#include "sys/network_80211.h"
...
...
app/mqtt/mqtt_msg.h
View file @
f7a545b9
...
...
@@ -7,7 +7,7 @@
#ifndef MQTT_MSG_H
#define MQTT_MSG_H
#include
"c_types
.h
"
#include
<stdint
.h
>
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
app/platform/cpu_esp8266.h
View file @
f7a545b9
...
...
@@ -2,6 +2,9 @@
#define __CPU_ESP8266_H__
#ifndef NO_CPU_ESP8266_INCLUDE
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "os_type.h"
#include "spi_flash.h"
#include "pin_map.h"
...
...
app/platform/pin_map.h
View file @
f7a545b9
...
...
@@ -2,7 +2,7 @@
#ifndef __PIN_MAP_H__
#define __PIN_MAP_H__
#include
"c_types
.h
"
#include
<stdint
.h
>
#include "user_config.h"
#include "gpio.h"
...
...
app/platform/platform.h
View file @
f7a545b9
...
...
@@ -3,9 +3,9 @@
#ifndef __PLATFORM_H__
#define __PLATFORM_H__
#include <stdint.h>
#include "cpu_esp8266.h"
#include "c_types.h"
#include "driver/pwm.h"
#include "driver/uart.h"
#include "task/task.h"
...
...
app/platform/sdcard.c
View file @
f7a545b9
#include "platform.h"
#include "driver/spi.h"
#include
"c_types
.h
"
#include
<stdint
.h
>
#include "sdcard.h"
...
...
app/platform/sdcard.h
View file @
f7a545b9
#ifndef _SDCARD_H
#define _SDCARD_H
#include "c_types.h"
#include <stdint.h>
#include <stddef.h>
int
platform_sdcard_init
(
uint8_t
spi_no
,
uint8_t
ss_pin
);
int
platform_sdcard_status
(
void
);
...
...
app/pm/swtimer.c
View file @
f7a545b9
...
...
@@ -48,8 +48,8 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include
"c_types
.h
"
#include <stdint.h>
#include
<stddef
.h
>
//#define SWTMR_DEBUG
#if !defined(SWTMR_DBG) && defined(LUA_USE_MODULES_SWTMR_DBG)
...
...
app/sjson/memcompat.h
View file @
f7a545b9
#ifndef __MEMCOMPAT_H__
#define __MEMCOMPAT_H__
#include
"c_types
.h
"
#include
<stdint
.h
>
#include "mem.h"
#endif
app/sqlite3/esp8266.c
View file @
f7a545b9
...
...
@@ -8,9 +8,9 @@
**/
#include <stdio.h>
#include <std
lib
.h>
#include <std
def
.h>
#include <string.h>
#include
"c_types
.h
"
#include
<stdint
.h
>
#include <osapi.h>
#include <vfs.h>
#include <time.h>
...
...
app/sqlite3/sqlite3.c
View file @
f7a545b9
...
...
@@ -2795,7 +2795,7 @@ SQLITE_API void sqlite3_free_table(char **result);
** table and column names into a constructed SQL statement.
**
** ^(The "%z" formatting option works like "%s" but with the
** addition that after the
c_
string has been read and copied into
** addition that after the string has been read and copied into
** the result, [sqlite3_free()] is called on the input string.)^
*/
SQLITE_API char *sqlite3_mprintf(const char*,...);
...
...
@@ -29771,7 +29771,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
/*
** standard include files.
*/
#include <sys/
c_
types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
...
...
@@ -78053,7 +78053,7 @@ static int findNextHostParameter(const char *zSql, int *pnToken){
** obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the
** string contains a copy of zRawSql but with host parameters expanded to
** their current bindings. Or, if sqlite3.nVdbeExec is greater than 1,
** then the returned
c_
string holds a copy of zRawSql with "-- " prepended
** then the returned string holds a copy of zRawSql with "-- " prepended
** to each line of text.
**
** If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then
...
...
@@ -89198,8 +89198,8 @@ SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *pVfs){
** an SQL statement.
*/
/* #include "sqliteInt.h" */
/* #include <
c_
stdlib.h> */
/* #include <
c_
string.h> */
/* #include <stdlib.h> */
/* #include <string.h> */
/*
...
...
@@ -105553,7 +105553,7 @@ SQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse *pParse, int iLabel){
** time functions, are implemented separately.)
*/
/* #include "sqliteInt.h" */
/* #include <
c_
stdlib.h> */
/* #include <stdlib.h> */
/* #include <assert.h> */
/* #include "vdbeInt.h" */
...
...
@@ -108885,7 +108885,7 @@ SQLITE_PRIVATE void sqlite3OpenTable(
/*
** Return a pointer to the column affinity string associated with index
** pIdx. A column affinity
c_
string has one character for each column in
** pIdx. A column affinity string has one character for each column in
** the table, according to the affinity of the column:
**
** Character Column affinity
...
...
@@ -108951,7 +108951,7 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
** then just set the P4 operand of the previous opcode (which should be
** an OP_MakeRecord) to the affinity string.
**
** A column affinity
c_
string has one character per column:
** A column affinity string has one character per column:
**
** Character Column affinity
** ------------------------------
...
...
@@ -135437,7 +135437,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
/************ Begin %include sections from the grammar ************************/
/* #include "sqliteInt.h" */
...
...
@@ -136309,7 +136309,7 @@ struct yyParser {
typedef struct yyParser yyParser;
#ifndef NDEBUG
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */
...
...
@@ -138629,7 +138629,7 @@ SQLITE_PRIVATE void sqlite3Parser(
** parser for analysis.
*/
/* #include "sqliteInt.h" */
/* #include <
c_
stdlib.h> */
/* #include <stdlib.h> */
/* Character classes for tokenizing
**
...
...
@@ -145471,10 +145471,10 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeIsdiacritic(int);
#endif
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <stdlib.h> */
/* #include <stddef.h> */
/* #include <
c_
stdio.h> */
/* #include <
c_
string.h> */
/* #include <stdio.h> */
/* #include <string.h> */
/* #include <stdarg.h> */
/* #include "fts3.h" */
...
...
@@ -151141,7 +151141,7 @@ SQLITE_API int sqlite3_fts3_init(
/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
typedef struct Fts3auxTable Fts3auxTable;
...
...
@@ -151758,7 +151758,7 @@ SQLITE_API int sqlite3_fts3_enable_parentheses = 0;
*/
#define SQLITE_FTS3_DEFAULT_NEAR_PARAM 10
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
/*
...
...
@@ -152786,7 +152786,7 @@ SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *pDel){
#ifdef SQLITE_TEST
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
/*
** Function to query the hash-table of tokenizers (see README.tokenizers).
...
...
@@ -153019,8 +153019,8 @@ SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <
c_
string.h> */
/* #include <stdlib.h> */
/* #include <string.h> */
/* #include "fts3_hash.h" */
...
...
@@ -153404,9 +153404,9 @@ SQLITE_PRIVATE void *sqlite3Fts3HashInsert(
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <
c_
stdio.h> */
/* #include <
c_
string.h> */
/* #include <stdlib.h> */
/* #include <stdio.h> */
/* #include <string.h> */
/* #include "fts3_tokenizer.h" */
...
...
@@ -154070,7 +154070,7 @@ SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <
c_
string.h> */
/* #include <string.h> */
/*
** Return true if the two-argument version of fts3_tokenizer()
...
...
@@ -154272,7 +154272,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitTokenizer(
#else
# include "tcl.h"
#endif
/* #include <
c_
string.h> */
/* #include <string.h> */
/*
** Implementation of a special SQL scalar function for testing tokenizers
...
...
@@ -154588,9 +154588,9 @@ SQLITE_PRIVATE int sqlite3Fts3InitHashTable(
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <
c_
stdio.h> */
/* #include <
c_
string.h> */
/* #include <stdlib.h> */
/* #include <stdio.h> */
/* #include <string.h> */
/* #include "fts3_tokenizer.h" */
...
...
@@ -154840,7 +154840,7 @@ SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
typedef struct Fts3tokTable Fts3tokTable;
...
...
@@ -155276,9 +155276,9 @@ SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash){
/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <stdlib.h> */
#define FTS_MAX_APPENDABLE_HEIGHT 16
...
...
@@ -160954,7 +160954,7 @@ SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){
/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
/*
...
...
@@ -162124,7 +162124,7 @@ static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){
** be returned by the matchinfo() function. Argument zArg contains the
** format string passed as the second argument to matchinfo (or the
** default value "pcx" if no second argument was specified). The format
**
c_
string has already been validated and the pInfo->aMatchinfo[] array
** string has already been validated and the pInfo->aMatchinfo[] array
** is guaranteed to be large enough for the output.
**
** If bGlobal is true, then populate all fields of the matchinfo() output.
...
...
@@ -162668,9 +162668,9 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <
c_
stdlib.h> */
/* #include <
c_
stdio.h> */
/* #include <
c_
string.h> */
/* #include <stdlib.h> */
/* #include <stdio.h> */
/* #include <string.h> */
/* #include "fts3_tokenizer.h" */
...
...
@@ -163473,9 +163473,9 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeFold(int c, int bRemoveDiacritic){
/* #include "sqlite3.h" */
#endif
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
#ifndef SQLITE_AMALGAMATION
#include "sqlite3rtree.h"
...
...
@@ -168105,8 +168105,8 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
*/
/* #include <assert.h> */
/* #include <
c_
string.h> */
/* #include <
c_
stdio.h> */
/* #include <string.h> */
/* #include <stdio.h> */
/* #include "sqlite3.h" */
...
...
@@ -174118,7 +174118,7 @@ SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
#if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)
/* #include "sqlite3session.h" */
/* #include <assert.h> */
/* #include <
c_
string.h> */
/* #include <string.h> */
#ifndef SQLITE_AMALGAMATION
/* # include "sqliteInt.h" */
...
...
@@ -178800,8 +178800,8 @@ SQLITE_API int sqlite3changeset_concat_strm(
#endif
SQLITE_EXTENSION_INIT1
/* #include <assert.h> */
/* #include <
c_
string.h> */
/* #include <
c_
stdlib.h> */
/* #include <string.h> */
/* #include <stdlib.h> */
/* #include <stdarg.h> */
/* Mark a function parameter as unused, to suppress nuisance compiler
...
...
@@ -181812,7 +181812,7 @@ struct fts5_api {
/* #include "sqlite3ext.h" */
SQLITE_EXTENSION_INIT1
/* #include <
c_
string.h> */
/* #include <string.h> */
/* #include <assert.h> */
#ifndef SQLITE_AMALGAMATION
...
...
@@ -182624,7 +182624,7 @@ static int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
/************ Begin %include sections from the grammar ************************/
/* #include "fts5Int.h" */
...
...
@@ -182929,7 +182929,7 @@ struct fts5yyParser {
typedef struct fts5yyParser fts5yyParser;
#ifndef NDEBUG
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
static FILE *fts5yyTraceFILE = 0;
static char *fts5yyTracePrompt = 0;
#endif /* NDEBUG */
...
...
@@ -185988,7 +185988,7 @@ static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64));
static void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*));
static void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*);
#ifndef NDEBUG
/* #include <
c_
stdio.h> */
/* #include <stdio.h> */
static void sqlite3Fts5ParserTrace(FILE*, char*);
#endif
app/tsl2561/tsl2561.h
View file @
f7a545b9
...
...
@@ -33,7 +33,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**************************************************************************/
#include
"c_types
.h
"
#include
<stdint
.h
>
#ifndef _TSL2561_H_
#define _TSL2561_H_
...
...
app/websocket/websocketclient.c
View file @
f7a545b9
...
...
@@ -27,9 +27,8 @@
#include "espconn.h"
#include "mem.h"
#include "limits.h"
#include "stdlib.h"
#include "c_types.h"
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
...
...
sdk-overrides/include/c_types.h
0 → 100644
View file @
f7a545b9
#ifndef _SDKOVERRIDES_C_TYPES_H_
#define _SDKOVERRIDES_C_TYPES_H_
#error "Please do not use c_types.h, use <stdint.h> instead"
#endif
sdk-overrides/include/ets_sys.h
View file @
f7a545b9
#ifndef SDK_OVERRIDES_INCLUDE_ETS_SYS_H_
#define SDK_OVERRIDES_INCLUDE_ETS_SYS_H_
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include_next "ets_sys.h"
#include <stdarg.h>
...
...
sdk-overrides/include/osapi.h
View file @
f7a545b9
#ifndef _SDK_OVERRIDE_OSAPI_H_
#define _SDK_OVERRIDE_OSAPI_H_
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include_next "osapi.h"
#include <stddef.h>
#include "rom.h"
unsigned
int
uart_baudrate_detect
(
unsigned
int
uart_no
,
unsigned
int
async
);
...
...
sdk-overrides/include/stdbool.h
View file @
f7a545b9
...
...
@@ -2,6 +2,11 @@
#define __stdbool_h__
// For compatibility with SDK. Boo.
#include_next "c_types.h"
typedef
unsigned
char
bool
;
#define BOOL bool
#define true (1)
#define false (0)
#define TRUE true
#define FALSE false
#endif
sdk-overrides/include/stdint.h
0 → 100644
View file @
f7a545b9
#ifndef _SDKOVERRIDES_STDINT_H_
#define _SDKOVERRIDES_STDINT_H_
#include_next "stdint.h"
// Compatibility cruft from c_types.h, ideally we should get rid of this!
typedef
signed
char
sint8_t
;
typedef
signed
short
sint16_t
;
typedef
signed
int
sint32_t
;
typedef
signed
long
long
sint64_t
;
typedef
unsigned
long
long
u_int64_t
;
typedef
float
real32_t
;
typedef
double
real64_t
;
typedef
unsigned
char
uint8
;
typedef
unsigned
char
u8
;
typedef
signed
char
sint8
;
typedef
signed
char
int8
;
typedef
signed
char
s8
;
typedef
unsigned
short
uint16
;
typedef
unsigned
short
u16
;
typedef
signed
short
sint16
;
typedef
signed
short
s16
;
typedef
unsigned
int
uint32
;
typedef
unsigned
int
u_int
;
typedef
unsigned
int
u32
;
typedef
signed
int
sint32
;
typedef
signed
int
s32
;
typedef
int
int32
;
typedef
signed
long
long
sint64
;
typedef
unsigned
long
long
uint64
;
typedef
unsigned
long
long
u64
;
typedef
float
real32
;
typedef
double
real64
;
#define __le16 u16
// And this stuff really doesn't belong in a types file in the first place...
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#define LOCAL static
typedef
enum
{
OK
=
0
,
FAIL
,
PENDING
,
BUSY
,
CANCEL
,
}
STATUS
;
#define BIT(nr) (1UL << (nr))
#define REG_SET_BIT(_r, _b) (*(volatile uint32_t*)(_r) |= (_b))
#define REG_CLR_BIT(_r, _b) (*(volatile uint32_t*)(_r) &= ~(_b))
#define DMEM_ATTR __attribute__((section(".bss")))
#define SHMEM_ATTR
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#define STORE_ATTR __attribute__((aligned(4)))
#endif
sdk-overrides/include/stdlib.h
View file @
f7a545b9
...
...
@@ -2,7 +2,7 @@
#define _OVERRIDE_STDLIB_H_
#include_next "stdlib.h"
#include <stdbool.h>
#include "mem.h"
#define free os_free
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment