Author: fireball
Date: Sat Aug 2 05:55:56 2008
New Revision: 35030
URL:
http://svn.reactos.org/svn/reactos?rev=35030&view=rev
Log:
- Remove unneeded code, which would have its 10 years anniversary in ~20 days (committed
originally by Rex back in August, 1998, revision number 8(!), and coded by David Welch,
never touched since then).
Removed:
trunk/reactos/ntoskrnl/rtl/strtok.c
Modified:
trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Sat Aug 2 05:55:56 2008
@@ -443,7 +443,6 @@
</if>
<file>libsupp.c</file>
<file>misc.c</file>
- <file>strtok.c</file>
</directory>
<directory name="se">
<file>access.c</file>
Removed: trunk/reactos/ntoskrnl/rtl/strtok.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/strtok.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/rtl/strtok.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/rtl/strtok.c (removed)
@@ -1,109 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/rtl/strtok.c
- * PURPOSE: Unicode and thread safe implementation of strtok
- *
- * PROGRAMMERS: David Welch (welch(a)mcmail.com)
- */
-
-/* INCLUDES *****************************************************************/
-
-#include <ntoskrnl.h>
-#include <internal/debug.h>
-
-
-/* FUNCTIONS *****************************************************************/
-
-char* __cdecl strtok(char *s, const char *delim)
-{
- const char *spanp;
- int c, sc;
- char *tok;
- static char *last;
-
- if (s == NULL && (s = last) == NULL)
- return (NULL);
-
- /*
- * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
- */
- cont:
- c = *s++;
- for (spanp = delim; (sc = *spanp++) != 0;) {
- if (c == sc)
- goto cont;
- }
-
- if (c == 0) { /* no non-delimiter characters */
- last = NULL;
- return (NULL);
- }
- tok = s - 1;
-
- /*
- * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
- * Note that delim must have one NUL; we stop if we see that, too.
- */
- for (;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- last = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
-
-PWSTR RtlStrtok(PUNICODE_STRING _string, PWSTR _sep,
- PWSTR* temp)
-/*
- * FUNCTION: Splits a string into tokens
- * ARGUMENTS:
- * string = string to operate on
- * if NULL then continue with previous string
- * sep = Token deliminators
- * temp = Tempory storage provided by the caller
- * ARGUMENTS: Returns the beginning of the next token
- */
-{
- PWSTR string;
- PWSTR sep;
- PWSTR start;
-
- if (_string!=NULL)
- {
- string = _string->Buffer;
- }
- else
- {
- string = *temp;
- }
-
- start = string;
-
- while ((*string)!=0)
- {
- sep = _sep;
- while ((*sep)!=0)
- {
- if ((*string)==(*sep))
- {
- *string=0;
- *temp=string+1;
- return(start);
- }
- sep++;
- }
- string++;
- }
- *temp=NULL;
- return(start);
-}