Changeset 58b2638 for libcfa/src/algorithms/range_iterator.cfa
- Timestamp:
- Dec 2, 2021, 5:11:22 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 8e658241
- Parents:
- 1894e03
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/algorithms/range_iterator.cfa
r1894e03 r58b2638 14 14 // 15 15 16 #include "range_iterator.hfa" 16 17 18 #include <stdio.h> 17 19 18 void main(RangeParser & this) { 20 #include <fstream.hfa> 21 22 void main(RangeIter & this) { 19 23 for() { 20 24 this._start = -1; 21 25 this._stop = -1; 22 26 int start_len = -1, stop_len = -1; 23 int ret = sscanf(this.text, "%u%n-%u%n", &this._start, &start_len, & stop, &stop_len);27 int ret = sscanf(this.text, "%u%n-%u%n", &this._start, &start_len, &this._stop, &stop_len); 24 28 switch(ret) { 25 29 case 0: … … 44 48 } 45 49 this.text += stop_len; 46 for(this.com i= this._start; this.com <= this._stop; this.com++) {50 for(this.com = this._start; this.com <= this._stop; this.com++) { 47 51 suspend; 48 52 }
Note: See TracChangeset
for help on using the changeset viewer.