Mail Archives: djgpp/1996/08/12/16:45:10
Xref: | news2.mv.net comp.os.msdos.djgpp:7129
|
From: | chiron AT worldnet DOT fr (Olivier Bouton)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Problems with findfirst/findnext under DOS/Win95 and DJGPP 2.0
|
Date: | 11 Aug 1996 21:08:41 GMT
|
Organization: | University Bordeaux I
|
Lines: | 39
|
Message-ID: | <4uli4p$bmi@news.sct.fr>
|
NNTP-Posting-Host: | bordeaux0-002.sct.fr
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
I've just installed DJGPP 2.0 (DOS) (gcc,gpp,c and c++ libs, etc... i'm quite
sure that nothing is missing).
I wanted to translate one of my C++ DOS (real mode) program to DJGPP that use
findfirst/findnext; it compiled OK, but when it calls findfirst/findnext, names
of files it find (pointed by ffblk.ff_name) don't have their first two chars !
So I've made a little program that only make a 'dir *.*' with those functions :
Compiled as a C source file (.c), the exe works (correct filenames);
Compiled as a C++ source file (.cc), the first 2 characters of each filename
are missing !
In dir.h (C and C++ compatible), ffblk structure size is 290 (manually
counted).
A sizeof(ffblk) gives me 290 under C, and 292 under C++ (here are my 2 bytes :)
Here is what I think : if C and C++ libraries (.a) that implement
findfirst/findnext are different, i suppose that the C++ one have been compiled
with a different header (dir.h) than the one i have.
But if there is only one library implementing ff/fn...i don't know !
Then, what must i do ? Please don't answer that i should use _dos_findfirst
(maybe it won't work better, and i want to have an "easily portable" source),
or command line gobbling (works only at starting time !), or that ff_name-2 is
where i will find my correct filenames under C++ (true but...)
P.S.: (Maybe here is the problem, see '==>')
Installed packages are (binaries) djdev200, bnu252, gcc272, gpp272,==> lgp271
(C++ libraries ! 272 available ?), mak373, and a few other ones (info, dpmi,
misc)...
My configuration is P120 with Windows 95 and Dos 6.2.
--
Olivier Bouton
University Bordeaux I
chiron AT worldnet DOT fr
- Raw text -