Changeset 1206


Ignore:
Timestamp:
Aug 14, 2003, 10:50:36 AM (17 years ago)
Author:
pooh
Message:
  • Further Read!() fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/library/StdIO/read.cc

    r1182 r1206  
    8787    buf[i++] = wc;
    8888  }
     89  unget_char(_fp, wc);
    8990  buf[i] = 0;
    9091  Expr e = Integer::create_expr(buf);
     
    113114  } else if (is_refal_upper(wc)) {
    114115    while (true) {
    115       if (wc == L'\\') wc = read_escaped_char(_fp);
    116116      if (i >= sz - 1) {
    117117        sz <<= 1;
     
    169169      WString s(buf, 1, const_data);
    170170      Expr res = Char::create_expr(s);
    171       unget_char(_fp, L'\'');
     171      wc = get_char(_fp);
     172      if (wc != L'\'') {
     173        if (wc != WEOF) unget_char(_fp, wc);
     174        unget_char(_fp, L'\'');
     175      }
    172176      return res;
    173177    }
Note: See TracChangeset for help on using the changeset viewer.