dirent.h
Etienne SOBOLE (3572) 28 posts |
Hi. While there is no dirent.h in standard ansi C. - how can I list the content of a folder in C with acorn C compiler Thank’s. PS: A specific forum for C developper (and another for basic developper) could be cool into this forum, because I do not know in which forum I should post this message ! |
Rick Murray (539) 13840 posts |
OS_GBPB – https://www.riscosopen.org/wiki/documentation/show/OS_GBPB%2012
When? When scanning the directory? If so, GBPB will tell you (buffer offset +16), otherwise try OS_File – https://www.riscosopen.org/wiki/documentation/show/OS_File%2023
Same as the above, though filetype is offset +20. Watch out for files that have no type, but instead the load/exec addresses. The *SAVE command makes files like these..
Traffic is low enough here that I don’t think we need extra forums by language. That said, I’m not entirely sure there is much technical difference between “General” and “Community support”. Logically your message probably should have gone into Community support as you’re asking for help, but then what’s General for? It’s cold, it’s Saturday, there are more important things to worry about… ;-) |
Etienne SOBOLE (3572) 28 posts |
Whaoooo Thank’s Rick. First of all! How could I had found this SWI page without asking the question here ? The second question is. Can I start new pages in order to translate all OS-SWI in French ? I could be great to find sample when your are looking for “riscos opendir” into google ! |
Rick Murray (539) 13840 posts |
Reading the PRMs? Looking at source code? Asking on a forum? :-) This is a good intro: http://www.stevefryatt.org.uk/docs/wimp/index.html
It might be best to send an email to ROOL if you’re serious about French translations, because it may be tidier to have a namespace for French, something like /wiki/documentation/show/fr/etcetc (can the wiki do this?) |
Etienne SOBOLE (3572) 28 posts |
Too late :) https://www.riscosopen.org/wiki/documentation/show/OS_GBPB%20(fran%C3%A7ais) Need approximatively a quarter of hour to translate a page. I learn a lot of thinks doing this :) |
Etienne SOBOLE (3572) 28 posts |
https://www.riscosopen.org/wiki/documentation/show/OS_GBPB%20(français) |
Etienne SOBOLE (3572) 28 posts |
hum it seem’s the link doesn’t works in the forum! |
nemo (145) 2546 posts |
Yes, space is a non-starter. Whereas this works better: https://www.riscosopen.org/wiki/documentation/show/fr/OS_GBPB I note Etienne has translated a couple of other pages. It might be an idea to wait until there is a consensus as to the syntax of the filename. The link above uses an fr/ prefix, which works, even though the wiki unnecessarily encodes the slash. |
Jeff Doggett (257) 234 posts |
The doom source code requires opendir() etc so for my port I had to write some veneers to allow it to work. See file “acorn.c” in the source at https://sites.google.com/site/jeffreyadoggett/ |
Etienne SOBOLE (3572) 28 posts |
Thank’s Jeff. nemo. the problem is not due to the space. I show your proposition for the naming. The problem in that you could think the name of the SWI is fr/OS_GBPB I’ll try to finish OS_GBPB translation today. |
nemo (145) 2546 posts |
Yes, it’s not ideal is it. Anyway, I’m not in charge. Perhaps our generous hosts could make an official judgement. |
Rick Murray (539) 13840 posts |
Indeed. That’s why I think the wiki admin may need to sort out a namespace for French (so the fr/ becomes invisible). The problem is that brackets are not really a valid part of a URL according to most things. Textile doesn’t consider it to be a part of a URL, neither does my Android phone – that email I posted to the RISC OS Fr mailing list last night? When it came back to me, following the link presented took me to the “edit new page” screen as the brackets were not counted in the URL… |
Etienne SOBOLE (3572) 28 posts |
Rick. If we do that, will it still be possible to link a french page to is english version. |