@marcov
The call to RTrim is a much better solution. If inlined the compiler can do the optimization ...
Ok, ansistrings work in FPC, but how about Unicode?
Any way of handling unicode (be it the delphi way with unicodestring and mode delphiunicode or lazarus-ut8fhack) will be terribly involved.
with Unicodestring sizeof(char) changes which would need code modifications, and with lazarus-ut8fhack is lazarus only (while FV and IDE are in FPC where that is not enabled), and any operation on single s[] needs to be checked.
Also all utility units (like Video) will have to be checked and patched for this. Or rewritten.
One step at a time...
The on unit decision might be a solution for now, but in the long-run the dependency on a specific (in my opinion old) compilemode should be minimized.
The reason to not start over but do it in the existing codebase is to keep a working codebase. Too radical changes undermine this course.
I can still remember the FVnew (the old copyrighted TV code) to FV transition in 1.0.x times. That was not pretty, and may be less involved than what is planned here.
On the other hand delphi and objFPC mode go quite well together ...
I prefer delphi mode over objfpc anyway. The only reason that I used objfpc in the past went away since poiinter math is allowed in Delphi (and delphi mode) too.
BTW. We/I Intend to do just that, (use github to prepare patches and diffs)
And since I am still a one-man-army, and due to the fact that i am used to SVN for quite a while, and my experiments with git and TortoiseGIT resulted in a loss of data, SVN is and will be my weapon-of-choice.
But then possibilities to merge code in and from tags and branches seem to be quite better in git, so i've been told
@marcov
My intention with this thread was to give people who need objFPC in their project the ability to work with FV
I didn't expected someone to change the original FV that's why I called my version FV+/IDE+.
So I appreciate your work on FV/IDE very much, and I am thankful that the codebases don't drift apart so much.
You are in good company, both Florian and I did a similar attempt in the past, and got mired in details. I gave up because ansistrings in objects weren't properly managed. Afaik that is remedied now, which is why I'm interested in how far you'd come, and am a bit knowledgable on the subject.