zen.org Communal Weblog

July 29, 2005

Cool hack so dirent function calls work on Windows

Filed under: — brendan @ 06:35 GMT

I recently discovered a really cool hack by Toni Rönkkö: he’s created a fully-workable implementation of dirent, the set of POSIX-compliant functions to let you cycle through the entries of a directory on a disk. It means you can now write code that calls opendir(), readdir(), and closedir(), among others, and all of it will just work on both Unix and Windows when you include his uce-dirent.h header. You no longer need to manually write separate code to call the Windows FindFirstFile and FindNextFile functions, or the MS-DOS equivalent _dos_findfirst and _dos_findnext.

Toni has collected into a single header all the extra effort you almost had to do yourself, Mr Portable Hacker Dude. 🙂

Big amount of citizens can`t afford health insurance so they have choice to pay for the really expensive prescription meds or look after cheap generic drugs online. Generics are potent and safe as other branded meds. Only reputable pharmacy produces them such as Sunrise remedies. Having this in mind one may buy lotensin uk in generic online pharmacy with free shipping worldwide

Powered by WordPress