~vdupras/duskos

f7c3ef6cfa9d36c5b80a434981d1082757a80e20 — Virgil Dupras a month ago ad06624
Rename fread to fgetc
3 files changed, 3 insertions(+), 3 deletions(-)

M fs/lib/file.fs
M fs/xcomp/boothi.fs
M fs/xcomp/glue2.fs
M fs/lib/file.fs => fs/lib/file.fs +1 -1
@@ 3,7 3,7 @@
\ This creates a "f<" reader with the file descriptor embedded in it. This
\ allows for a straightforward override of input/output words.
: [f<] ( curfd -- word )
  scratch[ litn compile fread exit, ]scratch ;
  scratch[ litn compile fgetc exit, ]scratch ;

\ Autoloading


M fs/xcomp/boothi.fs => fs/xcomp/boothi.fs +1 -1
@@ 1,7 1,7 @@
0 value curfd \ file descriptor of the file currently being read
0 value floaded \ address of the current "loaded file" structure
0 value fecho
: f< ( -- c ) curfd fread fecho if dup emit then ;
: f< ( -- c ) curfd fgetc fecho if dup emit then ;
: fload ( fname -- )
  floaded here to floaded , ( fname )
  dup c@ 1+ move, ( )

M fs/xcomp/glue2.fs => fs/xcomp/glue2.fs +1 -1
@@ 1,5 1,5 @@
\ Glue code that goes between the filesystem part and boothi
readFAT
alias fat16open fopen
alias fat16getc fread
alias fat16getc fgetc
alias fat16close fclose