We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I edit a file out side of uVision(Microsoft Visual Studio),such as:
...... first line second line ......
...... first line secon line ......
I don't have this problem. Maybe there's a setting somewhere in one ide or the other about how to deal with lineends? Note that the ANSI spec. relates to the C language, it doesn't specify how text editors should treat lineends. Stefan
"I don't have this problem." Me neither. I use several editors. Maybe you have some funny setting in your MSVC? What happens in Notepad? Are you transferring the code over a network - especially one involving UNIX?
Using UltraEdit(from Microsoft),if I edit the following code:
1 2 3
0x31 0x0D 0x0A 0x32 0x0D 0x0A 0x33
0x31 0x0A 0x32 0x0D 0x0A 0x33
In Notepad, I created a file
000000: 31 0D 0A 32 0D 0A 33 00 00 00 00 00 00 00 00 00 1..2..3.........
If you delete the first char 0D(after 31),you will find the above problem.My OS is Windows XP,no Network is used in editing the file.
Looks like Keil decides how to treat lineends based on the first one in the file, ie if the first is a linefeed only treat all subsequent carriage returns and linefeeds as individual lineends. You seem to be using an editor which terminates some lines with LF and some with CRLF. I'd suggest not using that editor, or using some utility to sort out the lineend sequences. Stefan