POV-Ray : Newsgroups : povray.animations : Windows shell for DOS CMPEG utility : Re: Windows shell for DOS CMPEG utility Server Time
28 Jul 2024 20:22:09 EDT (-0400)
  Re: Windows shell for DOS CMPEG utility  
From: Jon A  Cruz
Date: 10 Jan 2000 01:40:37
Message: <38797FC4.5B285779@geocities.com>
Dick Balaska wrote:

> "Jon A. Cruz" wrote:
>
> >
> > On Windows, there's a define in an include file somewhere you should use.
> > MAX_PATH. It's in stdlib.h and windef.h on my version here. In those it's set
> > to 260.
>
> Although for new work, you should use the ANSIesque _MAX_PATH . (All system thingys
> are prefixed with an underscore to diferentiate from user thingys.)

[SNIP]

> Of course in typical M$ "We interpret the standards" fashion, we end up with
> _strnicmp() yet strncmp().

Stay away from the stuff with the leading '_' that Microsoft decided to go with if
possible. Not many
others use it. _MAX_PATH doesn't exist in any header files anywhere on my entire Linux
setup (and I tend
to install all the developer options also). If it compiles without the '_', go for it.
Use "open()" not
"_open()", "O_RDWR" and not "_O_RDWR", etc. (although MAX_PATH might need it)

For cross-platform code for years I've had to remove that leading '_' to get things to
compile on OS/9,
Unix, Linux ...

For defines, on Linux, we have MAX_PATH_LEN, and VC 5.0 has both "_MAX_PATH" and
"MAX_PATH" hanging
around.

w3c-libwww's wwwsys.h has the following code:
/*

ROUGH ESTIMATE OF MAX PATH LENGTH

 */
#ifndef HT_MAX_PATH
#ifdef MAXPATHLEN
#define HT_MAX_PATH MAXPATHLEN
#else
#ifdef PATH_MAX
#define HT_MAX_PATH PATH_MAX
#else
#define HT_MAX_PATH 1024                        /* Any better ideas? */
#endif
#endif
#endif /* HT_MAX_PATH */

--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.