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 -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707