Changeset ecfa760 for libcfa/src/parseconfig.cfa
- Timestamp:
- Aug 31, 2021, 1:49:10 AM (19 months ago)
- Branches:
- enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 8e0f2db
- Parents:
- 09fda91
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (08/03/21 00:31:43)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r09fda91 recfa760 86 86 87 87 88 bool comments( ifstream & in, char * name ) { 89 StringBuilder sb; 90 91 char c; 88 bool comments( ifstream & in, char name[] ) { 92 89 while () { 93 in | c; 94 add_char( sb, c ); 95 96 if ( fail( in ) ) { 97 name = alloc( sb.size ); 98 strcpy( name, sb.string ); 99 100 return true; 101 } 102 if ( c != '#' ) break; 103 in | nl; // ignore remainder of line 104 } // for 105 106 name = alloc( sb.size ); 107 strcpy( name, sb.string ); 108 109 return false; 90 in | name; 91 if ( eof( in ) ) return true; 92 if ( name[0] != '#' ) return false; 93 in | nl; // ignore remainder of line 94 } // while 110 95 } // comments 111 96
Note: See TracChangeset
for help on using the changeset viewer.