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
427B

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