FLTK logo

Re: [fltk/fltk] scandir_posix.c readentry should check for ENOENT (#238)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] scandir_posix.c readentry should check for ENOENT (#238) erco77 Jun 16, 2021  
 

While DOS isn't supported by FLTK, I know someone got it working (maybe the OP).

FWIW, I can confirm with DOS (Win95) + TurboC that when readdir() reaches the last entry, it returns NULL + errno=ENOENT. Here's (most of) the code used for my test, and a test run:

dosrun

The docs built into the compiler don't seem to document this detail. Perhaps in DOS, when you reach the end of directory, the "stream" becomes invalid, causing this extra bit of detail in errno? In which case perhaps this is a DOS thing, perhaps to do with the behavior of the low level directory functions provided by the DOS 21h interrupt, around which the libc stuff is likely just a wrapper.

I could try testing with the Microsoft C V1.00 compiler too, as those are the only two DOS compilers I have available. I suppose the same behavior with that would perhaps show it not to be compiler specific.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.