Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ( —⥭¨¥ áâப¨ ¨á室­®£® ⥪áâ  ¨§ ¢å®¤­®£® ¯®â®ª : ª®­á®«¨ ¨«¨ ä ©« .
  2.   Copyright [C] 1992-1999 A.Cherezov ac@forth.org
  3.   ¥¢¨§¨ï: ‘¥­âï¡àì 1999
  4. )
  5.  
  6. VECT <PRE>
  7.  
  8. : CONSOLE-HANDLES \ $$$$
  9. ;
  10.  
  11. : QUERY ( --- )
  12. \ Read a line from the terminal into the terminal input buffer.
  13.   TIB 80 ACCEPT #TIB ! 0 >IN ! ;
  14.  
  15. : FREFILL ( h -- flag )
  16.   TIB C/L ROT READ-LINE THROW \ TAKEN-TIB
  17.   SWAP  #TIB !  0 >IN ! CURSTR 1+!
  18.   0 SOURCE + C!
  19. ;
  20.  
  21.  
  22. : REFILL ( --- f)
  23. \ Refill the current input source when it is exhausted. f is
  24. \ true if it was successfully refilled.
  25.  
  26.   SOURCE-ID -1 = IF
  27.    0 \ Not refillable for EVALUATE
  28.   ELSE   SOURCE-ID
  29.    IF    SOURCE-ID FREFILL
  30.    ELSE  QUERY -1 \ Always successful from terminal.
  31.    THEN
  32.   THEN
  33. ;
  34.