Fix bug in ls for esp32.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
( Migrate various words to separate vocabularies, and constants )
|
||||
|
||||
forth definitions internals
|
||||
: read-dir ( dh -- a n ) dup if errno else 0 then ;
|
||||
: read-dir ( dh -- a n ) readdir dup if z>s else 0 then ;
|
||||
forth definitions
|
||||
|
||||
vocabulary ESP ESP definitions
|
||||
|
||||
@ -146,7 +146,8 @@ static cell_t ResizeFile(cell_t fd, cell_t size);
|
||||
X("OPEN-DIR", OPEN_DIR, memcpy(filename, a1, n0); filename[n0] = 0; \
|
||||
n1 = (cell_t) opendir(filename); n0 = n1 ? 0 : errno) \
|
||||
X("CLOSE-DIR", CLOSE_DIR, n0 = closedir((DIR *) n0); n0 = n0 ? errno : 0) \
|
||||
YV(internals, READDIR, SET readdir((DIR *) n0)->d_name)
|
||||
YV(internals, READDIR, \
|
||||
struct dirent *ent = readdir((DIR *) n0); SET (ent ? ent->d_name: 0))
|
||||
|
||||
#ifndef ENABLE_LEDC_SUPPORT
|
||||
# define OPTIONAL_LEDC_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user