Skip to content

Fix for compilation errors with esp32-arduino 3.x.x #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static int ESP32Open(
//p->fd = open(zName, oflags, 0600);
//p->fd = open(zName, oflags, S_IRUSR | S_IWUSR);
p->fp = fopen(zName, mode);
if( p->fp<=0){
if( p->fp == (void *)NULL ) {
if (aBuf)
sqlite3_free(aBuf);
//Serial.println("Can't open");
Expand Down Expand Up @@ -489,7 +489,7 @@ static int ESP32Delete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){

/* Open a file-descriptor on the directory. Sync. Close. */
dfd = fopen(zDir, "r");
if( dfd<=0 ){
if( dfd == (void *)NULL ){
rc = -1;
}else{
rc = fflush(dfd);
Expand Down
6 changes: 3 additions & 3 deletions src/shox96_0_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

typedef unsigned char byte;

unsigned int c_95[95] = {16384, 16256, 15744, 16192, 15328, 15344, 15360, 16064, 15264, 15296, 15712, 15200, 14976, 15040, 14848, 15104, 14528, 14592, 14656, 14688, 14720, 14752, 14784, 14816, 14832, 14464, 15552, 15488, 15616, 15168, 15680, 16000, 15872, 10752, 8576, 8192, 8320, 9728, 8672, 8608, 8384, 11264, 9024, 8992, 12160, 8544, 11520, 11008, 8512, 9008, 12032, 11776, 10240, 8448, 8960, 8640, 9040, 8688, 9048, 15840, 16288, 15856, 16128, 16224, 16368, 40960, 6144, 0, 2048, 24576, 7680, 6656, 3072, 49152, 13312, 12800, 63488, 5632, 53248, 45056, 5120, 13056, 61440, 57344, 32768, 4096, 12288, 7168, 13568, 7936, 13696, 15776, 16320, 15808, 16352};
unsigned char l_95[95] = { 3, 11, 11, 11, 12, 12, 9, 10, 11, 11, 11, 11, 10, 10, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 10, 10, 10, 10, 11, 11, 10, 9, 8, 11, 9, 10, 7, 12, 11, 10, 8, 12, 12, 9, 11, 8, 8, 11, 12, 9, 8, 7, 10, 11, 11, 13, 12, 13, 12, 11, 12, 10, 11, 12, 4, 7, 5, 6, 3, 8, 7, 6, 4, 8, 8, 5, 7, 4, 4, 7, 8, 5, 4, 3, 6, 7, 7, 9, 8, 9, 11, 11, 11, 12};
static unsigned int c_95[95] = {16384, 16256, 15744, 16192, 15328, 15344, 15360, 16064, 15264, 15296, 15712, 15200, 14976, 15040, 14848, 15104, 14528, 14592, 14656, 14688, 14720, 14752, 14784, 14816, 14832, 14464, 15552, 15488, 15616, 15168, 15680, 16000, 15872, 10752, 8576, 8192, 8320, 9728, 8672, 8608, 8384, 11264, 9024, 8992, 12160, 8544, 11520, 11008, 8512, 9008, 12032, 11776, 10240, 8448, 8960, 8640, 9040, 8688, 9048, 15840, 16288, 15856, 16128, 16224, 16368, 40960, 6144, 0, 2048, 24576, 7680, 6656, 3072, 49152, 13312, 12800, 63488, 5632, 53248, 45056, 5120, 13056, 61440, 57344, 32768, 4096, 12288, 7168, 13568, 7936, 13696, 15776, 16320, 15808, 16352};
static unsigned char l_95[95] = { 3, 11, 11, 11, 12, 12, 9, 10, 11, 11, 11, 11, 10, 10, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 10, 10, 10, 10, 11, 11, 10, 9, 8, 11, 9, 10, 7, 12, 11, 10, 8, 12, 12, 9, 11, 8, 8, 11, 12, 9, 8, 7, 10, 11, 11, 13, 12, 13, 12, 11, 12, 10, 11, 12, 4, 7, 5, 6, 3, 8, 7, 6, 4, 8, 8, 5, 7, 4, 4, 7, 8, 5, 4, 3, 6, 7, 7, 9, 8, 9, 11, 11, 11, 12};
//unsigned char c[] = { ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~'};
char SET2_STR[] = {'9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '.', ',', '-', '/', '=', '+', ' ', '(', ')', '$', '%', '&', ';', ':', '<', '>', '*', '"', '{', '}', '[', ']', '@', '?', '\'', '^', '#', '_', '!', '\\', '|', '~', '`', '\0'};
static char SET2_STR[] = {'9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '.', ',', '-', '/', '=', '+', ' ', '(', ')', '$', '%', '&', ';', ':', '<', '>', '*', '"', '{', '}', '[', ']', '@', '?', '\'', '^', '#', '_', '!', '\\', '|', '~', '`', '\0'};

enum {SHX_STATE_1 = 1, SHX_STATE_2};

Expand Down