Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-10

Are lazarus / fpc sensitive to line endings?

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I need to set up some version control on the files I work on in Lazarus on the Raspberry Pi. But I have been unable to make the Pi connect to the company VPN so it cannot be direcly communicating with the server. I know tha some years ago when I was doing some webserver work in a Linux Mint virtual machine I was able to make the VPN connection, but not from the Pi.

So instead I figured I could make a samba share on the Pi where the dev files reside and then use my Win7 PC which is connected by VPN as the vehicle to check out and commit source files. All I need to do is to connect my PC to the Pi share and then work with CVS from the PC side.

Until it dawned on me that when CVS on Windows operates it assumes line endings as CRLF whereas Linux usually only uses LF.

So is fpc and/or lazarus sensitive to line endings like shell scripts are?

Bo Berglund Developer in Sweden

Reply by email

Mark Morgan Lloyd
to Bo Berglund
Bo Berglund wrote
So is fpc and/or lazarus sensitive to line endings like shell scripts are?

Shouldn't be, but I'd not go so far as to say that finding something that is should automatically be reported as a bug.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Bo Berglund: I need to set up some version control on the files I work on in Lazarus on the Raspberry…
Bo Berglund wrote 18 lines
I need to set up some version control on the files I work on in Lazarus on the Raspberry Pi. But I have been unable to make the Pi connect to the company VPN so it cannot be direcly communicating with the server. I know tha some years ago when I was doing some webserver work in a Linux Mint virtual machine I was able to make the VPN connection, but not from the Pi. So instead I figured I could make a samba share on the Pi where the dev files reside and then use my Win7 PC which is connected by VPN as the vehicle to check out and commit source files. All I need to do is to connect my PC to the Pi share and then work with CVS from the PC side. Until it dawned on me that when CVS on Windows operates it assumes line endings as CRLF whereas Linux usually only uses LF. So is fpc and/or lazarus sensitive to line endings like shell scripts are?

No. At least, I never noticed.

Michael.

Reply by email

Mattias Gaertner
to Bo Berglund: I need to set up some version control on the files I work on in Lazarus on the Raspberry…
Show quoted text 12 lines
[...] So instead I figured I could make a samba share on the Pi where the dev files reside and then use my Win7 PC which is connected by VPN as the vehicle to check out and commit source files. All I need to do is to connect my PC to the Pi share and then work with CVS from the PC side. Until it dawned on me that when CVS on Windows operates it assumes line endings as CRLF whereas Linux usually only uses LF. So is fpc and/or lazarus sensitive to line endings like shell scripts are?

Lazarus and FPC happily read all three line endings. But when you write code on Linux, Linux line
endings will be created.

This means you can share read-only sources, but the sources you edit on Linux and Windows should *not* be shared via a samba share. Checkout cvs/svn/git for each platform and let the version control system do the conversion for you.

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote
This means you can share read-only sources, but the sources you edit on Linux and Windows should *not* be shared via a samba share. Checkout cvs/svn/git for each platform and let the version control system do the conversion for you.

Right, that is also what I set out to do but I got stuck on the networking side since I could not connect a VPN channel from the Pi to our company. They use PPTP VPN (Windows server) and it works just fine with Win7 on my laptop. But when I tried in Raspbian Jessie it did not connect so unless I get a positive answer on my question for VPN on the Raspberry forum I am stuck and have to figure out something else....

Bo Berglund Developer in Sweden

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner: On Fri, 16 Oct 2015 21:45:07 +0200 Lazarus and FPC happily read all three line endings.…
Mattias Gaertner wrote 14 lines
On Fri, 16 Oct 2015 21:45:07 +0200 Bo Berglund wrote: > So is fpc and/or lazarus sensitive to line endings like shell scripts > are? Lazarus and FPC happily read all three line endings. But when you write code on Linux, Linux line endings will be created. This means you can share read-only sources, but the sources you edit on Linux and Windows should *not* be shared via a samba share. Checkout cvs/svn/git for each platform and let the version control system do the conversion for you.

Treading carefully... I don't think I saw a problem, even before I had local svn. However I agree that having a local svn (or whatever, if you really insist :-) is useful if you have more than one development machine.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email