X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.cpp;h=ccc0b9e9d917a0378c91339f8feb49b820b360aa;hb=d56e1a1d586d61cfee2cdb8f6e8ecd71428385d8;hp=0b738d538a1bde7e3e63f52ef5a3b74c32e6ea52;hpb=d27af79ee06388dc6d1ab31d95348a38cdfbeb91;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index 0b738d538..ccc0b9e9d 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -91,71 +91,6 @@ int inet_pton(int af, const char *src, void *dst) return rv; } -char * strtok_r(char *_String, const char *_Control, char **_Context) -{ - unsigned char *str; - const unsigned char *ctl = (const unsigned char*)_Control; - unsigned char map[32]; - - if (_Context == 0 || !_Control) - return 0; - - if (!(_String != NULL || *_Context != NULL)) - return 0; - - memset(map, 0, 32); - - do { - map[*ctl >> 3] |= (1 << (*ctl & 7)); - } while (*ctl++); - - /* If string is NULL, set str to the saved - * pointer (i.e., continue breaking tokens out of the string - * from the last strtok call) */ - if (_String != NULL) - { - str = (unsigned char*)_String; - } - else - { - str = (unsigned char*)*_Context; - } - - /* Find beginning of token (skip over leading delimiters). Note that - * there is no token iff this loop sets str to point to the terminal - * null (*str == 0) */ - while ((map[*str >> 3] & (1 << (*str & 7))) && *str != 0) - { - str++; - } - - _String = (char*)str; - - /* Find the end of the token. If it is not the end of the string, - * put a null there. */ - for ( ; *str != 0 ; str++ ) - { - if (map[*str >> 3] & (1 << (*str & 7))) - { - *str++ = 0; - break; - } - } - - /* Update context */ - *_Context = (char*)str; - - /* Determine if a token has been found. */ - if (_String == (char*)str) - { - return NULL; - } - else - { - return _String; - } -} - void setcolor(int color_code) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color_code);