Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
388B

  1. ( Read one line in input buffer and make IN> point to it )
  2. : (rdln)
  3. (infl) BEGIN (rdlnc) NOT UNTIL
  4. LF IN( IN> ! ;
  5. ( And finally, implement C<* )
  6. : RDLN<
  7. IN> @ C@
  8. DUP IF ( not EOL? good, inc and return )
  9. 1 IN> +!
  10. ELSE ( EOL ? readline. we still return null though )
  11. (rdln)
  12. THEN
  13. ( update C<? flag )
  14. IN> @ C@ 0 > 0x06 RAM+ ! ( 06 == C<? )
  15. ;