Joshua Isom wrote: > I'm trying to use libc to be able to do a directory listing, and and if > I used the DATATYPE_CSTR I get a segfault, and if I use > DATATYPE_STRING, I get a "returning unhandled string type in struct"
I tried this a while back, and got it working (as a kind of "proof-of-concept") by reading the directory name character-by-character (using multiple occurrences of DATATYPE_CHAR, instead of DATATYPE_STRING or DATATYPE_CSTR). Clearly that's not the right way to do it, so I didn't bother to keep my code. Then I looked at all the #IFDEFs in dirent.h and decided that a NCI approach was unlikely to work on other platforms, so I wrote a PMC instead. Regards, Roger Browne