Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
// $XConsortium: CC_Tokenizer.C /main/5 1996/11/21 19:47:27 drk $
#include <string.h>
#include "CC_Tokenizer.h"
//--------------------------------------------------------------
CC_Tokenizer::CC_Tokenizer( const CC_String &s )
{
str_ = new char [s.length()+1];
strcpy(str_, s.data() );
current_ptr = str_;
touched = FALSE;
}
//--------------------------------------------------------------
CC_Boolean
CC_Tokenizer::operator()()
{
if ( !touched ) {
current_ptr = _XStrtok(str_, " \t\n", strtok_buf);
touched = TRUE;
}
else {
current_ptr = _XStrtok(NULL, " \t\n", strtok_buf);
}
return ( current_ptr != NULL );
}