head 1.2; access; symbols; locks; strict; comment @// @; 1.2 date 2000.12.13.17.37.25; author simons; state dead; branches; next 1.1; 1.1 date 2000.12.13.15.46.39; author simons; state Exp; branches; next ; desc @@ 1.2 log @Removed unused C++ code. @ text @#include "text.hpp" #include /** Example using the Custom Mode of the TokenIterator */ class MyCustomTokenIterator: public TokenIterator{ public: MyCustomTokenIterator(string inputStr, bool b=false) : TokenIterator(inputStr,TokenIterator::Custom, b){ eoltoken= '\n'; separator= ":\n"; whitespace= ""; }; MyCustomTokenIterator(istream &inputStr, bool b=false) : TokenIterator(inputStr,TokenIterator::Custom, b){ eoltoken= '\n'; separator= ":\n"; whitespace= ""; }; }; int main(int argc, char* argv[]){ ifstream infile("/etc/passwd"); MyCustomTokenIterator tokenize(infile); while(!infile.eof()){ string user= tokenize(); string password= tokenize(); string userid = tokenize(); string groupid= tokenize(); string description= tokenize(); string home = tokenize(); string shell= tokenize(); if(password=="x") password="shadowed"; cout << "----"<