diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2014-11-01 22:56:06 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2014-11-01 22:56:06 +0000 |
commit | ed3e95ac20efda84399489e203fbd3ee355016e9 (patch) | |
tree | 7645efab7c6eb3a470e51ade1c88f62b00569eb9 /print.c | |
parent | 4758d07621676502ca3b137bc66b66ee3d24347b (diff) | |
download | flashrom-ed3e95ac20efda84399489e203fbd3ee355016e9.zip flashrom-ed3e95ac20efda84399489e203fbd3ee355016e9.tar.gz |
Move strtok_r implementation verbatim to helpers.c
Corresponding to flashrom svn r1853.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -26,27 +26,6 @@ #include "flash.h" #include "programmer.h" -/* FIXME: Find a better solution for MinGW. Maybe wrap strtok_s (C11) below if it becomes available */ -#ifdef __MINGW32__ -static char* strtok_r(char *str, const char *delim, char **nextp) -{ - if (str == NULL) - str = *nextp; - - str += strspn(str, delim); /* Skip leading delimiters */ - if (*str == '\0') - return NULL; - - char *ret = str; - str += strcspn(str, delim); /* Find end of token */ - if (*str != '\0') - *str++ = '\0'; - - *nextp = str; - return ret; -} -#endif - static const char *test_state_to_text(enum test_state test_state) { switch (test_state) { |