Sign in to follow this  
sadrius

Looking for a Cross-Platform File I/O Library...

Recommended Posts

I'm currently working on a small cross-platform RPG in C using SDL and OpenGL. As I'm developing the project on a Mac and seeking to release it for Mac, Windows, and Linux, I'm going to have to deal with endianness when it comes to accessing binary files. I'm looking for a cross-platform library that handles endianness transparently, and something that I can use to read and write arbitrarily sized chunks of data with. Something that deals with the newline problem (\n vs \n\r, etc.) would be great as well. The library should be LGPL or something similar. Thanks. [Edited by - sadrius on June 23, 2005 6:14:39 PM]

Share this post


Link to post
Share on other sites
I'm in the process of writing a lightweight, platform-independant library of platform-dependant features such as threading and thread synchronization, files (synchronous and asynchronous), atomic functions, endian conversion functions, heaps, etc.

Share this post


Link to post
Share on other sites
sadrius, i can only assume 2 things, a) you missed it b) it doesn't suit your needs, but just to let you know, SDL has endian conversion functions.

Share this post


Link to post
Share on other sites
Quote:
Original post by sadrius
Something that deals with the newline problem (\n vs \n\r, etc.) would be great as well.

If you're reading and writing in binary, then this problem ceases to exist.

Share this post


Link to post
Share on other sites
Quote:
Original post by BorisTSR
sadrius, i can only assume 2 things, a) you missed it b) it doesn't suit your needs, but just to let you know, SDL has endian conversion functions.


I'm aware that SDL has a macro to determine the endianness of a system, but I had no idea that it had endian conversion functions. Thanks, I'll take a look!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this