www.pudn.com > CMDL.zip > STRING.CPP


/*************************************************************** 
File: STRING.CPP              Copyright 1992 by Dlugosz Software 
part of the CMDL package for command-line parsing 
cmdl_string class 
This version may be used freely, with attribution. 
***************************************************************/ 
 
#include "usual.h" 
#include "cmdl.h" 
 
/* /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ */ 
/*     string                               */ 
/* /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ */ 
 
void cmdl_string::report_error() 
{ 
switch (error) { 
   case NoValue: 
      foutput ("use:\n@= or @ \nMay use quotes around a string that contains spaces\n"); 
      break; 
   default: 
      cmdl::report_error(); 
   } 
} 
 
/* /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ */ 
 
bool cmdl_string::scan (cmdlscan& s) 
{ 
if (!prelude()) return FALSE; 
char* newval= getvalue (s); 
delete value;   //out with the old 
value= newval;  //in with the new 
if (!value) return FALSE; 
}