Ignore:
Timestamp:
Dec 2, 2021, 5:11:22 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
8e658241
Parents:
1894e03
Message:

Added range_iterator, it now compiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/algorithms/range_iterator.cfa

    r1894e03 r58b2638  
    1414//
    1515
     16#include "range_iterator.hfa"
    1617
     18#include <stdio.h>
    1719
    18 void main(RangeParser & this) {
     20#include <fstream.hfa>
     21
     22void main(RangeIter & this) {
    1923        for() {
    2024                this._start = -1;
    2125                this._stop = -1;
    2226                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);
    2428                switch(ret) {
    2529                case 0:
     
    4448                        }
    4549                        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++) {
    4751                                suspend;
    4852                        }
Note: See TracChangeset for help on using the changeset viewer.