Peter Norton wrote:
(*spliter.pas*) program spliter; uses Dos; var dr : DirStr; fnm : NameStr; ex : ExtStr; begin FSplit(paramstr(1), dr, fnm, ex); writeln(' Path is: '+dr+' File name is :'+fnm+' Extention is: '+ex); end. (*/spliter.pas*)
This program was compiled with GNU Pascal under Linux with -s and -o keys only. Now if I input: #./spliter /mnt/CD/images/MyFavoriteShot.jpg the output is: Path is: /mnt/CD/images/ File name is :MyFavori Extention is: .jpg Please note that MyFavoriteShot was truncated to MyFavori Gues it easy to replicate.
That's because `NameStr' has capacity 8 (BP compatible, of course). Try using a longer string (I generally recommend `TString' (unit GPC) for everything unless there are reasons against it).
Frank