sevreporter/src/reportStream.cxx
//
// Put a string onto the stream
//
Put a string onto the stream
Put a string onto the stream
int reportStream::add_string(char const *str)
{
  int retval = -1;
  char *copy = pdstrdup(str);
  if ( copy )
    {
      char temp   = 0;
      char *start = copy;
      char *end   = copy;
      while ( *start )
	{
	  while ( *end && identify_type(*start) == identify_type(*end) )
	    end++;
	  temp = *end;
	  *end = 0;
	  if ( identify_type(*start) == WHITESPACE )
	    handle_whitespace(mode, start);    
	  else
	    handle_text(mode, start);          
	  *end  = temp;
	  start = end;
	}
      retval = 1;
    }
  FREE_MEMORY(copy);
  return retval;
}
int reportStream :: add_string ( char const * str ) { int retval = -1 ; char * copy = pdstrdup ( str ) ; if ( copy ) { char temp = 0 ; char * start = copy ; char * end = copy ; while ( * start ) { while ( * end && identify_type ( * start ) == identify_type ( * end ) ) end ++ ; temp = * end ; * end = 0 ; if ( identify_type ( * start ) == WHITESPACE ) handle_whitespace ( mode , start ) ; else handle_text ( mode , start ) ; * end = temp ; start = end ; } retval = 1 ; } FREE_MEMORY ( copy ) ; return retval ; }
Put a string onto the stream
Put a string onto the stream
// find continuous sequence of like characters // terminate string // report string // pure virt implemented in derived class // pure virt implemented in derived class // move up for next iteration