Mail Archives: djgpp/2003/12/20/10:30:08
> Date: Fri, 19 Dec 2003 13:07:47 +0100
> From: Manuel Collado <m DOT collado AT aaron DOT ls DOT fi DOT upm DOT es>
> Newsgroups: comp.os.msdos.djgpp
>
> Return Value
> ------------
>
> If LFN APIs are supported and should be used, it returns 1, else 0.
>
> Note that if the `_CRT0_FLAG_NO_LFN' bit is set, or `LFN' is set to `N'
> or `n' in the environment, both `_use_lfn' and `_USE_LFN' will always
> return 0 without querying the filesystem. You can reset the
> `_CRT0_FLAG_NO_LFN' bit at runtime to force filesystem to be queried.
> ===
>
> So to detect the true LFN system capability one should:
>
> - reset CRT0_FLAG_NO_LFN
> - call _use_lfn
> - restore CRT0_FLAG_NO_LFN to its previous value
You dion't ned anything except a simple call to `_use_lfn'. The
_CRT0_FLAG_NO_LFN bit is set to zero by default, and this is your
program, so if you don't set it, it will stay unset.
As for the LFN environment variable, it is usually uinset as well,
but if you want to protect yourself against a user who sets it, you
can use the library function `setenv' prior to calling `_use_lfn'.
- Raw text -