Closed cnlohr closed 8 years ago
Maybe another parameter, "ERR" or something?
Ok. This is complete.
char * parameters; <<set global variable before using parameter popping
uint8_t paramcount; <<Set this to 0 before doing parameter popping
int MyNum = ParamCaptureAndAdvanceInt();
int MyVar = ParamCaptureAndAdvance();
/tmp/ccnbGE4K.o (symbol from plugin):(.text+0x0): first defined here esp82xx/fwsrc/esp82xxutil.c:281:40: error: 'memchr' has already been defined const ICACHE_FLASH_ATTR unsigned char memchr(const unsigned char s, int c, size_t n) ^ esp82xx/fwsrc/esp82xxutil.c:281:40: note: previously defined here const ICACHE_FLASH_ATTR unsigned char memchr(const unsigned char s, int c, size_t n) ^ esp82xx/fwsrc/esp82xxutil.c:217:26: error: 'strdup' has already been defined char * ICACHE_FLASH_ATTR strdup( const char * src ) ^ esp82xx/fwsrc/esp82xxutil.c:217:26: note: previously defined here char * ICACHE_FLASH_ATTR strdup( const char * src ) ^ lto1: fatal error: errors during merging of translation units compilation terminated.
You seem to have some multiply defined functions. Here is the full error message. Don't have time to look at it right now.
Edit: Nevermind, error went away. No idea why. Will leave this here for future reference if it resurfaces.
Right now, we are using things like:
which is just awful to be used so many places. We should write our own, perhaps where it also re-writes the byte to be a null and advances the pointer by reference?
i.e.
char * CaptureAndAdvance( char ** data );
Called in the following way:
This will produce much smaller code and I think it's easier to read.