delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/18/12:28:07

From: "A. Darrow" <msnsh AT freewwweb DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie frustration: headers not found *Solution*
Date: Mon, 18 Oct 1999 09:45:36 -0700
Organization: Posted via Supernews, http://www.supernews.com
Lines: 158
Message-ID: <s0mcla7rr0143@corp.supernews.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991017141635 DOT 25053N-100000 AT is> <s0kmp3ukr0176 AT corp DOT supernews DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 991018102034 DOT 3777G-100000 AT is>
X-Complaints-To: newsabuse AT supernews DOT com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote in message
news:Pine DOT SUN DOT 3 DOT 91 DOT 991018102034 DOT 3777G-100000 AT is...
>
> On Sun, 17 Oct 1999, A. Darrow wrote:
>
> >     _USE_LFN reports 0 at startup
> > Flags: 0, MaxFile: 13, MaxPath: 80, FSName:
> > _USE_LFN reports 0 when _CRT0_FLAG_NO_LFN is set
> > _USE_LFN reports 0 when LFN is set to Y
> > _USE_LFN reports 0 when LFN is set to N
> >
> > Perhaps you could also explain what this means.
>
> Quite simply, it clearly says that your version of Windows 95 does not
> support the LFN API, a bunch of special functions of Interrupt 21h
> that lets DOS programs access long file names.  At least DJGPP
> programs don't see the LFN support.
>
> _USE_LFN is a library function (a macro, actually; see the header
> fcntl.h) that returns a non-zero value if long file names are
> supported, zero if they aren't.  As you can see from the source, the
> test program deliberately pushes "LFN=y" into the environment, in case
> somebody disabled the LFN support by setting LFN=n.
>
> The second line, "Flags: 0" etc., is a result of a call to the library
> function that returns the filesystem capabilities.  It also shows that
> only short file names are supported: the max file name length is 13.
>
> What kind of disk is the drive where you installed DJGPP and where you
> ran the test program?  Is it a normal local disk, or something else,
> like a networked drive?  If it's not a local disk, please try the test
> program on a local disk.  As a matter of fact, please try it on all
> the drives you can, including a floppy drive, and see if any of them
> returns different results.
>
> By ``trying on a drive'' I mean that you should change to that drive,
> and then run the test program, like this:
>
> a:
> c:tlfn
> d:
> c:tlfn
> e:
> c:tlfn
>
> The above assumes that tlfn.exe is on your C: drive.
>
> Also, to be sure there are no hidden surprises, please temporarily
> remove the DJGPP variable from the environment when you run these
> tests.  One way of doing this would be to type this from the DOS
> prompt:
>
> set DJGPP=
>
> One additional possibility could be that your disk(s) are controlled
> by some special device driver which disables the LFN support.  You
> should see this driver in your CONFIG.SYS or AUTOEXEC.BAT, or in the
> Control Panel.
>
> > > And, sorry for asking the obvious, but you are running Windows 9X, not
> > > Windows NT or Windows 2000, right?
> >
> >     Win95 OSR2 HP OEM version; see original posting
>
> Sorry, I cannot afford saving all the past messages, and have
> sometimes to ask again.

****************************************************************************
***************
> And another ``obvious'' question: you didn't set up things so that
> Windows is switched to the so-called "DOS Mode" when you run DJGPP
> programs, did you?  In other words, when you run DJGPP programs, the
> Windows GUI is still active, right?  (The LFN API is part of the
> Windows kernel that is not unloaded from memory when your PC switches
> to the DOS Mode.)

Well, I'm just a little embarrassed. I always try to
look for the simplest explanation first, but I often
get mired in detail and simple fixes sometimes elude
me.

As it turns out, I have been exiting to DOS to run
DJGPP by using my MSDOS prompt icon on the Desktop.
I had looked at its properties before and had noticed
that several of the function tabs (.i.e. Font, Memory,
Screen, Misc) were disabled. I did not think anything
of this and since I was able to re-enter Windows by
typing "exit", I assumed I was in a DOS window rather
than in the regular DOS "Command Prompt" mode. Having
read your latest posting, I decided to create a new DOS
prompt icon. Voila! The DOS prompt now comes up in a
window and LFN seems to be available. Output from TLFN:

_USE_LFN reports 1 at startup
Flags: 4006, MaxFile: 255, MaxPath: 260, FSName: FAT32
_USE_LFN reports 0 when _CRT0_FLAG_NO_LFN is set
_USE_LFN reports 1 when LFN is set to Y
_USE_LFN reports 0 when LFN is set to N

and a small dir output listing:

 Volume in drive C is HP_PAVILION
 Volume Serial Number is 063B-10E2
 Directory of C:\djgpp\lang\cxx

.              <DIR>        10-17-99  5:54p .
..             <DIR>        10-17-99  5:54p ..
_G_CON~1 H           2,733  09-24-99 12:17a _G_config.h
_IOSTR~1 H           1,165  09-24-99 12:17a _iostreamP.h
ALGO     H           3,182  09-24-99 12:19a algo.h
ALGOBASE H           2,085  09-24-99 12:19a algobase.h
ALGORI~1             1,367  09-24-99 12:18a algorithm
ALLOC    H           1,310  09-24-99 12:19a alloc.h
BITSET              33,670  09-24-99 12:18a bitset
BUILTI~1 H           2,296  09-24-99 12:17a builtinbuf.h


Eli, there are few people on the internet who exhibit the
patience, dedication and indeed selflessness needed to
ignore the inane and ridiculous and continue to provide
an obvious expertise to an ever widening group of would-
be programmers. The mark of a true professional.

I apologize for my slight ineptitude, thank you endlessly
for your help and hope that this little exercise will be
of help to someone else.

****************************************************************************
************


> If the above questions and the test on different disk drives doesn't
> reveal anything, I'm stumped.  I have never seen a version of Windows
> 9X that disables LFN support for DOS programs.  The only thing I can
> suggest is to install Windows again; perhaps the LFN support got
> disabled by some optional software you installed.  For example, some
> system DLL could be overwritten by an incompatible version that
> disables the LFN API as a side effect.
>
> If that doesn't help, it probably means that the HP OEM version of
> Windows 95 removed the LFN API from Windows.  I find this hard to
> believe, because the LFN API is intimately connected to the Windows
> file-system related code, and Windows itself uses it.  But this is
> software--anything's possible!
>
> Another possibility is that DJGPP has some very subtle bug in its LFN
> support, which is somehow triggered in your case.  If you have access
> to a real-mode compiler, I can help you throw together a short test
> program that will show if the LFN API calls succeed in programs
> compiled with that real-mode compiler.
>
> If the conclusion is that the HP version disables the LFN API, it's
> probably a good idea to ask HP about this.  If they want details about
> how this works in DJGPP, they can ask here.
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019