Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can BCB recognize Unix Format files?

Status
Not open for further replies.

ljh

Programmer
May 9, 2001
11
US

I received the source code that should be correct, but I cannot compile it with my BCB. At last, I realized the problem is the files I received are in Unix Format. However, my BCB cannot recognize it.

I understand that in DOS, a line is ended by two symbols (something like 0xD and oxE). On the other hand, Unix only uses onle of them. The problems is that we have dozens of files located in different sub-directories. Therefore, it's a hard work to convert them one by one.

They guy who sent the files to me claims that the same files (in Unix format) can work very well with his BCB. Thus, I want to know whether it's possible to configure BCB to let it recognize Unix files.

If you have an easy way to convert lots of files in a big tree, please also let me know.

Thanks in advance.
 
Here is a quick trick to fix the files for access from a DOS/Windows based system.

Load the File with EDIT.
Save File as the original name.
Exit from EDIT.

All better now. Edit can read UNIX EOL'd files, but only saves DOS/WINDOWS EOL'd files. At least EDIT has one good use!
 
What is the name of file? maybe the file system does not recognize some file names? John Fill
1c.bmp


ivfmd@mail.md
 

Pmaia and JohnFill,

Thanks. It's not the problem of the filename. I am sure that it's problem of the format because the error goes to next file after I fixed one file. It has error because BCB cannot recognized the 'end of line'. Normally, it's not a problem for c and c++. but for the lines such as '#define ...' '#pragma ...', it's a big problem.

The best method I know that can convert the files fast is using FTP: FTP the files from DOS to UNIX in binary mode, then FTP them back in ascii mode, all the files in one directory can be fixed at one time. My problem is that there are too many files in too many sub-directories. I don't know how to convert all of them quickly. Unix also has a 'unix2dos' to convert one file at one time. Now Pmaia taught me another way.

However, the guy who sent the files to me claimed that the same files (in Unix format) can be built correctly in his PC (we have the same version of BCB). Thus, I doubt there is something I don't know about BCB if he didn't lie to me.
 
The Functions unixtodos are available in the FTP-Client from Woolongong Software too.

hnd
hasso55@yahoo.com

 
How are you opening the files? You should open them in binary mode. Show us the source code that you are using to open the files. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top