Changeset 085370c in git for factory/ftest/ftest_io.cc
- Timestamp:
- Mar 11, 1998, 5:11:28 PM (26 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0e083a79e79fdba1836c125232887812195dd9b8
- Parents:
- d636adca8e47219c329f1d05ef6a4b1712a88b48
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/ftest/ftest_io.cc
rd636ad r085370c 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: ftest_io.cc,v 1.1 0 1997-11-21 13:59:07schmidt Exp $ */2 /* $Id: ftest_io.cc,v 1.11 1998-03-11 16:10:54 schmidt Exp $ */ 3 3 4 4 //{{{ docu … … 141 141 //}}} 142 142 143 //{{{ bool ftestGetbool ( const char * stringBool ) 144 //{{{ docu 145 // 146 // ftestGetbool() - read an boolean from stringBool, 147 // return it. 148 // 149 //}}} 150 bool 151 ftestGetbool ( const char * stringBool ) 152 { 153 const char * tokenCursor; 154 155 bool b; 156 // skip blancs 157 stringBool = ftestSkipBlancs( stringBool ); 158 159 // look for "true" or "false" 160 tokenCursor = ftestSubStr( "true", stringBool ); 161 if ( stringBool != tokenCursor ) 162 b = true; 163 else { 164 tokenCursor = ftestSubStr( "false", stringBool ); 165 b = false; 166 } 167 168 // do error checks 169 if ( stringBool == tokenCursor ) 170 ftestError( CommandlineError, 171 "bool expected at `%s'\n", stringBool ); 172 173 // check for extra characters 174 stringBool = ftestSkipBlancs( tokenCursor ); 175 if ( *stringBool ) 176 ftestError( CommandlineError, 177 "extra characters after bool spec `%s'\n", stringBool ); 178 179 return b; 180 } 181 //}}} 182 143 183 //{{{ void ftestPrintResult ( const char * resultName, const CanonicalForm & result ) 144 184 //{{{ docu
Note: See TracChangeset
for help on using the changeset viewer.