Vinzent Höfler wrote:
> Alexander Klenin :
>
>> C-like operators reduce the number of required punctuation --
>> I always think that the extra punctuation is bad for readability.
>
> Rght. Shrt sntncs r mch sr t rd.
>
This is more about
SomeReallyLongVariableNameX += 10;
being nicer to read
Hi,
This applies to GLUT_EXCLUSIVE_FPUMODE mode inside
packages/opengl/src/glut.pp source code. Reading history, I see it was
caused by this bug and patch:
http://bugs.freepascal.org/view.php?id=7570 . However, it's not needed
anymore, IMHO. It seems submitter of #7570 hacked glut unit, suspecting
Ups, looks like I messed up bug numbers in my previous email.
This time correctly:
- The bugreport that caused the creation of GLUT_EXCLUSIVE_FPUMODE is
here: http://bugs.freepascal.org/view.php?id=8995 . I basically propose
to revert the changes caused by it to the GLUT unit (the whole {$ifdef
G
For anyone interested: I submitted my proposal to remove
GLUT_EXCLUSIVE_FPUMODE as
http://bugs.freepascal.org/view.php?id=18107
and a patch with freeglut-extensions as
http://bugs.freepascal.org/view.php?id=18108
Michalis
___
fpc-devel maillist - f
Hi,
In my tests, FPC 2.4.4 has much slower CompareMem than FPC 2.4.2, at
least for some cases:
# with fpc 2.4.4
$ time ./compare_mem_test 1
real0m7.795s
user0m7.764s
sys 0m0.008s
# with fpc 2.4.2
$ time ./compare_mem_test 1
real0m1.218s
user0m1.216s
sys 0m0
Florian Klämpfl wrote:
> Am 01.06.2011 22:07, schrieb Michalis Kamburelis:
>> Hi,
>>
>> In my tests, FPC 2.4.4 has much slower CompareMem than FPC 2.4.2, at
>> least for some cases:
>
> I've commited an improved version in r17642
That's great :) I jus
Florian Klämpfl wrote:
>
> I improved CompareDWord as well, for your application it should be even
> better.
>
Ha, I hesitated earlier to mention that CompareWord and CompareDWord are
~4 times slower than equivalent (on the same number of bytes)
CompareMem/CompareByte calls :) Cool, times with l
2011/7/17 Sven Barth :
> On 17.07.2011 08:08, Felipe Monteiro de Carvalho wrote:
>>
>> Since we are talking about help stuff, (in another thread)
>>
>> Do we have any tool to convert documentation written in javadoc style
>> (those comments in the source code) to fpdoc xml? I like to write my
>> do
Felipe Monteiro de Carvalho wrote:
On Sun, Jan 1, 2012 at 2:12 PM, Jeff Duntemann wrote:
Bravo! My only question is: Are there any particular issues with respect to
using 2.6.0 with Lazarus?
For desktop platforms I don't know any issues. It works just as good as 2.4
I just found one small
Graeme Geldenhuys wrote:
Hi,
I'm using a Win2000, and have a released FPC 2.6.0 installed. I updated
my FPC 2.6.1 to r23533 (latest revision to date). I run by usual
build.bat script (shown below). FPC, RTL and FCL seems to compile fine,
but the 'make install ...' seems to fail. I've never had s
Sergio Flores wrote:
> I'm trying to use threads in Android, but it seems they are not working
> yet in FPC?
I'm using threads on Android successfully with FPC 2.7.1 (various SVN
revisions, since a couple of months) in Castle Game Engine
http://castle-engine.sourceforge.net/ (see unit
castle_game_
2016-03-22 8:18 GMT+01:00 Ondrej Pokorny :
>
> On 22.03.2016 8:01, Michael Van Canneyt wrote:
>>
>> 1. I change the code to raise an exception instead (as was my original plan)
>
>
> This is the way to go. False should be returned if nothing was found.
> In case there are problems with starting par
2017-05-21 22:38 GMT+02:00 Mathias :
> Is there an option with Lazarus own board means to activate the OpenGL 3.3
> core mode. Or is it enough for me to do the following?
>
> OpenGLControl.OpenGLMajorVersion := 3;
> OpenGLControl.OpenGLMinorVersion := 3;
>
These TOpenGLControl properties are p
2017-05-26 18:48 GMT+02:00 Kostas Michalopoulos :
> I'd use an enum with values like (glcDefaultProfile, glcCoreProfile,
> glcCompatibilityProfile). Default would leave things as-is (when versioning
> is introduced to backends that currently do not support it, it will either
> use a backend-specif
Hi
See this bug report:
[http://bugs.freepascal.org/bug_view_page.php?bug_id=5942], with
resolution "no change required". The result is the same still in FPC
2.3.1. I understand that the behavior should be kept as is, for
compatibility with TP and/or Delphi and filesystems with 8.3 filenames.
But
Joost van der Sluis wrote:
> With this release we also want to test our new packaging-system. After
> installing the package manager (fppkg) can be called from the
> command-line. For now only the 'lnet' package is available for
> installation through the package system. When all goes well it could
Hi,
Since revision 9898 the LongBool type behaves differently. This was done
for Delphi compatibility (see log message here
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=9898). In
short, if B is LongBool, then "B := true;" sets now B to $
(while previously it set B to 1).
Jonas Maebe wrote:
>
> On 10 Apr 2009, at 03:47, Michalis Kamburelis wrote:
>
>> and similar to convert GBoolean to boolean. The uncomfortable thing
>> about this is that all GTK/Glib/GtkGLExt/etc. code will have to be
>> corrected and "infested" with these
Mimu Bunnylin wrote:
>
> But suppose I want a program that will continue running in a console if
> run from a console, but will not automatically create a new one if run
> from outside a console.
You can declare a program as $apptype GUI, and then try using standard
file handles. If this succeed
Marco van de Voort wrote:
> In our previous episode, Jonas Maebe said:
>>> Or do we have to allocate more bytes for blocks that are a multiple of 8?
>> FPC's default memory manager even guarantees 16 byte alignment (for vectors).
>
> So a possible solution is to allocate 16-sizeof(ptruint) bytes m
ot. Besides, if you want to
make Format() fully Delphi-compatible, there is no other way to fix
this, you have to change it's present behaviour.
BTW, I would also advice adding some notes about that to the FPC
SysUtils.Format documentation.
Regards,
Michalis Kamburelis <[EMAIL PROTEC
Pedro Lopez-Cabanillas wrote:
Hi,
Does the example program threads.pp (doc/examples/fcl/threads.pp) work for
anybody under Linux?
It aborts for me as soon as the first thread is created, printing "Killed".
Regards,
Pedro
When I compile it with 1.9.1 I get the same effect - program is
immediate
ces always false or EAccessViolation.
There are many ways to fix this - most elegant for me is to add a line
if Length = 0 then Exit(true);
at the beginning of this function.
Thanks,
Michalis Kamburelis
___
fpc-devel maillist - [EMAIL PROTE
OK, I just figured out what was the cause of this problem.
In SysUtils.ExecuteProcess you were wrapping ppcbin compiler filename
(like '/usr/local/ppc386') inside quotes (to make it something like
'"/usr/local/ppc386"') but you were not stripping those quotes anywhere
before passing this to exe
Hi.
This question is related to bugs 2854, 2885 and 2971 that I submitted.
To state this shortly: how should I change code
{$mode DELPHI}
procedure p(const b:Single); overload;
begin end;
procedure p(const b:Double); overload;
begin end;
begin p(1.0) end.
to make it compile with la
I see (via viewcvs) that new directory rtl/morphos (with system.pp) was
created just yesterday. But cvs client doesn't allow me to update it,
fails at rtl/morphos with
cvs server: failed to create lock directory for
`/FPC/CVS/fpc/rtl/morphos' (/FPC/CVS/fpc/rtl/morphos/#cvs.lock):
Permission
Jonas Maebe wrote:
On 13 feb 2004, at 22:17, Michalis Kamburelis wrote:
but sometimes it's a pain trying to write code in ObjFpc mode that
should compile under Delphi too
In that case, why do you want to use that single(1.0) construct? That
won't compile in Delphi either... I'
Peter Vreman wrote:
Conversion is now done for float constants. Hope that solves the problem
Just updated from CVS, I see it's in defcmp.pas. Now Single(1.0) is
allowed. That's what I wanted. Great! Thanks.
Michalis
___
fpc-devel maillist - [EMAIL P
Here are a few fixes for Libc unit:
1. In stimeh.inc
__timezone_ptr_t = timezone;
should be changed to
__timezone_ptr_t = ptimezone;
2. In pwdh.inc
function getpwuid_r(..., var __resultbuf:Ppasswd; ...
should be changed to
function getpwuid_r(..., var __resultbuf:passwd; ...
3. In bstath.i
Hi
Kylix adds field "Mode" to TSearchRec type under Linux. This field comes
directly from UNIX stat structure (st_mode field). It is useful when you
already have TSearchRec describing some file and you want to check the
exact type of that file, e.g. "is it a symbolic link ? is it a device
?".
Hi
I found some bugs in UnixUtil.FNMatch function. In short, patterns like
'*~' matched anything (instead of matching only filenames ending with
'~'). I'm attaching patch "unixutil.patch" that fixes these issues. I'm
also attaching a test program, "fnmatch_test.pas", so you can see that
these
Hi again,
Previous patch still missed to correct some bugs (those we're still bugs
in original FNMatch code, not new bugs introduced by my fixes, in case
you might ask...).
'*o' should not match 'blah.ow' and
'*o' should not match 'fox'
Anyway, I'm attaching new version of the patch (unixut
Hi.
I'm just playing with unit Video and I found some strange thing. It
looks like a bug in my opinion, but it's so obviously implemented in
Video unit that I fear that it's some "feature" :
Under UNIXes CursorX / CursorY are 1-based. While SetCursorPos takes
0-based parameters on all OSes, and
Hi,
I tested your code and found that indeed version in ucopylist is
slightly faster (by about 9.5 / 7 =~ 1.357). Two things:
1. Speedup is only 1.357x, not 3x, like you said. Are you sure that
you're getting 3x speedup ? On what OS and with what FPC version are you
testing this ? I was doing t
Michael Van Canneyt wrote:
On Fri, 24 Dec 2004, Michalis Kamburelis wrote:
Hi,
I tested your code and found that indeed version in ucopylist is
slightly faster (by about 9.5 / 7 =~ 1.357). Two things:
1. Speedup is only 1.357x, not 3x, like you said. Are you sure that
you're getting 3x sp
Peter Vreman wrote:
This is because there is an extra (implicit) Try/Finally block.
Thank you and Peter for answers. This way I was able to see how
try...finally section looks in assembler :) Anyway, I understand that
the answer is "can't be speed up". OK, I can live with that.
That is not correct
I felt that results of this discussion are so important that I created a
page in FPC wiki about it:
http://www.freepascal.org/wiki/index.php/Avoiding_implicit_try_finally_section
There's an URL to mail archives of this discussion, and a small demo
program that shows trick proposed by Mattias how
Vincent Snijders wrote:
Michalis Kamburelis wrote:
I felt that results of this discussion are so important that I created
a page in FPC wiki about it:
http://www.freepascal.org/wiki/index.php/Avoiding_implicit_try_finally_section
There's an URL to mail archives of this discussion, and a
Vincent Snijders wrote:
Michalis Kamburelis wrote:
Are there any other cases where this issue may be significant ? If no,
I'll mark this wiki page clearly as "only for FPC earlier than
2004-12-28" (to-be-removed when 2.0 comes in), else I will update it.
(Note: we can continue th
Hi
I have a couple of corrections to gtk 2 bindings, gtk2forpascal. I also
made gtkglext bindings that could be incorporated into gtk 2 bindings,
if it feels appropriate (since, as far as I know, initial goal of
gtk2forpascal was to include gtkglext bindings, but they were not
implemented becau
Hi
So here they are. Initially I was making my changes versus gtk2forpascal
from sourceforge, but now I made them versus FPC sources, since I can't
connect to gtk2forpascal cvs on sourceforge. I also noticed that version
from FPC tree already contains some of the fixes I was going to send...
ex
Hi
Looking at Interbase unit (fcl/db/interbase/interbase.pp), I see that
TIBTransaction was probably meant to publish properties AccessMode,
IsolationLevel, LockResolution and TableReservation. This would be
definitely useful to users of this class. I'm attaching simple patch
that does this.
M
Hi
I managed to implement correct TField.IsNull behaviour for fields inside
TIBQuery dataset. I'm attaching:
-- patch to packages/base/ibase/ibase60types.inc, this fixes a small bug
in ibase60 unit that defined Short as Integer (= 32 bits, since ibase60
unit is compiled in objfpc mode), while i
Joost van der Sluis wrote:
I managed to implement correct TField.IsNull behaviour for fields inside
TIBQuery dataset. I'm attaching:
Good work.
But I want to mention that the sqldb-TSQLQuery firebird component is a
simple copy of TIBQuery, but in that one the .IsNull was already
implemented. I co
Hi
I played with Sqldb and IBConnection units, and now I see the real
benefit of them: there's only one dataset and one transaction class for
all Firebird, PostgreSQL and MySQL bindings. Each specific database
"binding" must only introduce new TSQLConnection descendant. It's great
since it give
Hi
(This is completely unrelated to my previous patches to sqldb and
ibconnection.)
A simple correction that fixes a problem in IBConnection with field
names: in TIBConnection.LoadField you look for field names using
SQLDA^.SQLVar[x].AliasName, but in TIBConnection.AddFieldDefs you create
fields wi
Oh, and here's one additional patch to sqldb.pp that improves (ok, ok:
*corrects*) my previous patch. This way FTrans is not freed each time
transaction ends, so properties of FTrans like IsolationLevel are
preserved, e.g. code like
(Transaction.SQLHandle as TIBTrans).IsolationLevel := ilReadC
Michael Van Canneyt wrote:
...
I would propose to introduce a enumerated
TSQLTransactionStyle =(tsConcurrent,tsReadCommit, etc.);
Then add a TransactionStyle to TSQLTransaction;
This must be mapped by the TSQLConnection when creating the handle.
...
Indeed, this would be more elegant than my soluti
I wrote:
Michael Van Canneyt wrote:
...
I would propose to introduce a enumerated
TSQLTransactionStyle =(tsConcurrent,tsReadCommit, etc.);
Then add a TransactionStyle to TSQLTransaction;
This must be mapped by the TSQLConnection when creating the handle.
...
Indeed, this would be more elegant than
Michael Van Canneyt wrote:
On Wed, 4 May 2005, Jonas Maebe wrote:
On 4 mei 2005, at 12:04, Michael Van Canneyt wrote:
It contains a fixed version of the Utf8ToUnicode function. Since it
is part of
the rtl, I close this lazarus issue and send you this message. I did
not test
the fixed version.
The
Hi
Compilation of fpimgcmn.pp is broken starting from revision 33 (some
part of code that was $ifdefed earlier by VER1_0 stayed), I'm attaching
a trivial patch.
Index: fpimgcmn.pp
===
--- fpimgcmn.pp (wersja 36)
+++ fpimgcmn.pp (ko
Hi
I'm attaching a trivial patch for OpenGL bindings that
1. Fixes declarations of glGetMapiv, glGetMaterialiv and glLightiv to
take pointer as the last parameter.
2. Changes glGetString, gluErrorString and gluGetString to return PChar
instead of PGLubyte. After all, GLubyte and Char are the
Michael Van Canneyt wrote:
On Sun, 22 May 2005, Michalis Kamburelis wrote:
Hi
Compilation of fpimgcmn.pp is broken starting from revision 33 (some part of
code that was $ifdefed earlier by VER1_0 stayed), I'm attaching a trivial
patch.
You must have missed my fix then, because
Tony Maro wrote:
Jonas Maebe wrote:
On 21 jul 2005, at 00:40, Tony Maro wrote:
Can someone confirm the date issue for me?
I can't confirm it, but I do want to mention that I fixed all
datetime-related routines for *nix platforms in sysutils a while ago.
They operated based on the sup
Hi
I just tested SysUtils.GetAppConfigDir under Linux and I see that it
returns
GetHomeDir + ApplicationName
(when Global = false). Shouldn't it rather return
GetHomeDir + '.' + ApplicationName
? Config directories in user's home dir traditionally start with '.' to
be somewhat "hidden". I
Hi
I had some time today and I decided to write a simple patch that fixes
GetAppConfigDir, adhering to basedir-spec.
The arguments after adhering to basedir-spec are:
- The idea to place things within .config/ seems sensible.
- On my system (Debian testing) I see two things that adhere to it
(xf
Ales Katona wrote:
I think the simplest and perhaps most important change to get better PR
for both Lazarus and FPC is the web page. It needs to be more "wow"
style. News have to be a bit propagandistic. A FAQ is IMHO required with
first questions like:
1. Is Free Pascal/Lazarus really free?
Ales Katona wrote:
Michalis Kamburelis wrote:
Ales Katona wrote:
[...]
2. Can I use Free Pascal/Lazarus for commercial development?
This is the 4th question of current FAQ. And I assume that you
actually wanted to say "closed source", this is not the same thing as
&
Ales Katona wrote:
So what answer would you propose for the FAQ question "Are there any
real world applications made with Free Pascal/Lazarus" ? A huge list
of every program that was ever compiled with FPC ? A short list of
"chosen projects" ? Who will decide and maintain the list of "most
b
Mark de Wever wrote:
Hi all,
I like to put a lot of comment in the source and I would like fpdoc to
output this comment into the output files. I wrote a small patch to do
this with types, it puts all the comment in front of a type declaration
into the output html as section "Comment text".
Are we talking here about making a class that can read any TStream
descendant line-by-line (i.e. by simple a'la Readln method) ?
Then I believe this was already discussed on fpc-pascal, I remember that
I sent there my TTextReader class implementation that does just that.
TTextReader class is a
Felipe Monteiro de Carvalho wrote:
Hello,
I recently tryed to use those two functions, so I created a test app
with 4 functions:
WriteLn(GetAppConfigDir(True));
WriteLn(GetAppConfigDir(False));
WriteLn(GetAppConfigFile(True));
WriteLn(GetAppConfigFile(False));
The output on a GNU/Linux
Hi
In revision 1944 in trunk (log is "+ Add PTCpas package"), among many
changes to packages/extra/, fcl/Makefile.fpc was changed, line
dirs=xml image db shedit passrc net fpcunit
was changed to
dirs=xml image shedit passrc net fpcunit
Was there any reason to remove db dir from the build p
Daniël Mantione wrote:
[...]
- Pascal Game Programming - Big news on front page:
http://www.pascalgameprogramming.com
I guess you wanted to say [http://www.pascalgamedevelopment.com/] ?
Michalis
___
fpc-devel maillist - fpc-devel@lists.freepasca
(Second send, it seems that mails from my old email address do not reach
fpc lists)
Den Jean wrote:
Hi,
I have a strange problem. My Qt4 demo program worked
fine with FPC 2.0.0, but crashes (div by zero) with FPC 2.0.2.
Debugging shows that indeed a div by zero is done within
the Qt4 lib. Ho
Den Jean wrote:
Hi,
I have a strange problem. My Qt4 demo program worked
fine with FPC 2.0.0, but crashes (div by zero) with FPC 2.0.2.
Debugging shows that indeed a div by zero is done within
the Qt4 lib. However with FPC 2.0.0 or using C++ code the library
isn't bothered with the div by zero
Hi
I'm just migrating a lot of code from delphi to objfpc mode, and I
noticed that in objfpc mode I can't do
MyFunc := @TMyClass.Func;
where TMyClass.Func is a class procedure that matches the type of
MyFunc. I'm attaching the complete source code. With
fpc -S2 test_1.pas
the attached c
Hi
I'm concerned with using DivMod in cases when Dividend is < 0. DivMod
declaration is
procedure DivMod(Dividend: Integer; Divisor: Word; var Result,
Remainder: Word);
which means that it doesn't allow for Result and Remainder to be < 0.
But when Dividend is < 0, Result and/or Remainde
J. Peter Mugaas wrote:
[...]
> On Win32, that may not be desirable since there seems to be several versions
> of the ZLIB .DLL
Unfortunately, it's true that there are several (sometimes incompatible
-- various zlib versions, various calling conventions) zlib.dll versions
floating around.
Fortuna
J. Peter Mugaas wrote:
[...]
>
> And I noticed that the zlib1.dll filename is the same between the official
> ZLib .DLL and the the one you mentioned. The zlib version you mentioned has
> a file size of 73.5 KB (75,264 bytes) while the official one has a file size
> of 58.5 KB (59,904 bytes).
peter green wrote:
> yeah that technique requires far less stubs but it means that the coder has
> to manually call an init function.
>
Not necessarily, because you can load all addresses in initialization
section of the unit. That's what I do in my various wrappers.
> also how does your code re
Micah Milissent wrote:
> Hi,
>
> I want to bring up the following scenario: (need fixed font)
>
>B --> G
>| |
>A --> F
>
> All are classes, and usually A 'owns' F. So A has a field 'Field' of
> type F. Now, whenever A creates F, B overrides this (in virtual method
> or clas
Micha Nelissen wrote:
> Michalis Kamburelis wrote:
>> All you want is just to cover in class B identifier "Field" of class A.
>> So you should make "Field" a dummy function in class A (that just
>> returns a field value), and then you can redefine functi
Hi
Attached is a patch for glext unit that adds many new extensions and
features for OpenGL 1.4, 1.5 and 2.0.
This is based on newest sources of glext unit from jedi-sdl, that is in
turn based on Tom Nuydens OpenGL headers from
[http://www.delphi3d.net/dot/]... which is to say, it's not my work,
2018-05-02 18:21 GMT+02:00 Maciej Izak :
> Hello,
>
> I was kicked away today from core team (probably by Michael Van Canneyt).
>
This is unfortunate. I saw how the recent discussion escalated (and it
seems it was fueled with past disagreements). The end result (Maciej
leaving core) sucks, IMHO.
Hi,
Change in
https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=40020
introduced a small typo, line 25 of shellapi.pp has
$endif}
instead of
{$endif}
(missing "{"), thus building a cross-compiler to Windows fails.
shellapi.pp(25,1) Fatal: Syntax error, "UNIT" expected but
Michael Van Canneyt wrote:
> Needless to say, the component remains backwards compatible.
>
> There is now a testsuite for the TProcess command, so everything was tested.
> but nothing beats testing in the wild, so I would appreciate it if people
> could test it and provide feedback.
Great additio
> Delphi also decided to follow the LP64 vs LLP64 rules regarding the Integer
> type (it's 32-bit on 64-bit Windows, but 64-bit on 64-bit macOS and Linux)
> while we decided to keep the size of Integer at 32-bit on 32- and 64-bit
> systems.
Just a clarification to this statement about Delphi: I
> You cannot publish records, and this is not planned.
>
> This is because things like
>
> MyClass.MyRecord.MyField:=12;
>
> do not work as one would naively expect. It does work if you use a TPersistent
> instead of a record (the very reason the TPersistent class was invented)
Do you mean the tra
ecific record types),
- read / write these record properties using the proper getter /
setter (whether it's direct field access or a method).
Regards,
Michalis
sob., 17 sie 2024 o 16:44 Michael Van Canneyt via fpc-devel
napisał(a):
>
>
>
> On Fri, 16 Aug 2024, M
Michael Van Canneyt
napisał(a):
>
>
>
> On Sat, 17 Aug 2024, Michalis Kamburelis wrote:
>
> > Thanks Michael!
> >
> > OK, that's partially good news :)
> >
> > I understand that streaming records by default to LFM would lead to
> > too many q
Hi,
We're experimenting with compiling Castle Game Engine using FPC
WebAssembly target.
A lot of units and classes compiled smoothly, however we hit a weird
bug(s) at compiling our (big, too big!) unit X3DNodes. We get errors
"Wasm32 symbol xxx without index value error" at the code trying to
use
It's going to be my highest-priority thing after upcoming CGE 7.0
release.
Regards,
Michalis
czw., 30 mar 2023 o 21:11 Nikolay Nikolov via fpc-devel
napisał(a):
>
>
> On 3/28/23 02:12, Michalis Kamburelis via fpc-devel wrote:
> > Hi,
> >
> > We're experiment
83 matches
Mail list logo