[physfs] PATH_MAX

Ryan C. Gordon icculus at icculus.org
Tue May 15 17:47:15 EDT 2007


> Does PhysFS provide something like POSIX' PATH_MAX or Windows' MAX_PATH?
> I support a game which was originaly ported from Windows and stores copies of 
> directory names in several locations. Therefore it needs to know the maximum 
> length of paths that PhysFS accepts or returns.
> Or would it be safe to use the systems definition of PATH_MAX/MAX_PATH or an 
> own value, for that matter?

Hmm...Let me think about that. There isn't a formal way to get this from 
PhysicsFS at the moment, and a given system may have different limits 
for different things. For example, a DOS system may have strict filename 
limits, but the .zip archiver can still have long filenames. This is why 
  many PlayStation games have one big archive on their disc, for what 
it's worth. I'm not sure the best way to handle this yet.

> While walking the headers, I found a minor naming inconsistency:
> int __PHYSFS_utf8strcasecmp(const char *s1, const char *s2);
> int __PHYSFS_utf8strnicmp(const char *s1, const char *s2, PHYSFS_uint32 l);
> 
> str(n)casecmp is the UNIX variant, while str(n)icmp is the Windows variant.
> Maybe you want to change that for consistency, as it is only an internal 
> symbol and thus should not affect the external binary interface. I can send a 
> patch if you so desire.

Whoops; that was a cut-and-paste mistake...the UTF-8 code originally 
came from another project I'm writing. I'll fix that.

--ryan.




More information about the physfs mailing list