Prof A Olowofoyeku (The African Chief) wrote:
On 20 Feb 2004 at 10:50, Peter Norton wrote:
Hi,
I use FSplit, FindFirst, FindNext procedures from the Dos unit in program I'm trying to port for Linux. This procedures cut off the long filenames to 8 characters (DOS standard)
This is news to me. Does the Dos unit really do this?
It may do if you set `__BP_TYPE_SIZES__'. I'm not sure (though I wrote the routines ;-) since I've never really used them.
What is possible solutions? What alternative to the Dos unit?
I think we first need to investigate why you think that the Dos unit truncates the filenames.
Some routines (including FSplit) are provided in the GPC unit.
For FindFirst/FindNext I really suggest using OpenDir etc. instead (also GPC unit, see there). FindFirst/FindNext do many things to emulate Dos (more or less) which is extra work in most cases, and not needed even in many Dos programs. (See readdirdemo.pas in demos for a rather simple example on how to use them. Of course OpenDir/ReadDir also work on GPC under Dos (DJGPP).)
Frank