- Timestamp:
- Oct 17, 2023, 12:12:00 PM (18 months ago)
- Branches:
- master
- Children:
- 5e0bba5
- Parents:
- 1b41219
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/collections/string_res.cfa ¶
r1b41219 r37ceccb 236 236 // get bytes 237 237 try { 238 *(temp.Handle.ulink->EndVbyte) = '\0'; // pre-assign empty cstring 238 239 in | wdi( lenReadable, temp.Handle.ulink->EndVbyte ); 239 240 } catch (cstring_length*) { … … 247 248 } 248 249 249 250 if ( temp.Handle.lnth > 0 ) s = temp; 250 251 return in; 251 252 } … … 268 269 cstr[wd] = '\0'; // guard null terminate string 269 270 try { 271 cstr[0] = '\0'; // pre-assign as empty cstring 270 272 is | cf; 271 273 } catch( cstring_length * ) { 272 274 cont = true; 273 275 } finally { 274 if ( ! cf.flags.ignore ) *(f.s) = cstr; // ok to initialize string 276 if ( ! cf.flags.ignore && // ok to initialize string 277 cstr[0] != '\0' ) { // something was read 278 *(f.s) = cstr; 279 } 275 280 } // try 276 281 for ( ; cont; ) { // overflow read ? 277 282 cont = false; 278 283 try { 284 cstr[0] = '\0'; // pre-assign as empty cstring 279 285 is | cf; 280 286 } catch( cstring_length * ) { 281 287 cont = true; // continue not allowed 282 288 } finally { 283 if ( ! cf.flags.ignore ) *(f.s) += cstr; // build string chunk at a time 289 if ( ! cf.flags.ignore && 290 cstr[0] != '\0' ) { // something was read 291 *(f.s) += cstr; // build string chunk at a time 292 } 284 293 } // try 285 294 } // for -
TabularUnified libcfa/src/iostream.cfa ¶
r1b41219 r37ceccb 1021 1021 int check = f.wd - 2; 1022 1022 if (! f.flags.ignore ) { 1023 f.s[0] = '\0';1024 1023 if ( ! f.flags.rwd ) f.s[check] = '\0'; // insert sentinel 1025 1024 }
Note: See TracChangeset
for help on using the changeset viewer.