/* * Copyright 1995, 1996 Perforce Software. All rights reserved. * * This file is part of Perforce - the FAST SCM System. */ # include "specchar.h" void SpecChar::Set( const char *p ) { this->p = p - 1; this->line = 1; this->cc = cEOS; this->Advance(); } void SpecChar::Advance( void ) { char c = *++p; if( cc == cNL ) ++line; switch( c ) { case ' ': cc = cSPACE; break; case '\t': cc = cSPACE; break; case '\r': cc = cSPACE; break; case '\n': cc = cNL; break; case ':': cc = cCOLON; break; case '#': cc = cPOUND; break; case '\"': cc = cQUOTE; break; case '\0': cc = cEOS; break; default: cc = cMISC; break; } } const char *const charNames[] = { "sp", "nl", ":", "#", "\"", "*", "EOS" } ; const char * SpecChar::CharName( void ) { return charNames[ this->cc ]; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 14945 | Newtopian |
Merging //guest/perforce_software/p4/... to //guest/Newtopian/p4/... |
||
//guest/perforce_software/p4/2014.1/support/specchar.cc | |||||
#1 | 12188 | Matt Attaway | Move 'main' p4 into a release specific directory in prep for new releases | ||
//guest/perforce_software/p4/support/specchar.cc | |||||
#1 | 9129 | Matt Attaway | Initial commit of the 2014.1 p4/p4api source code |