Re: [fpc-devel] Full_Version_String in an application

2010-02-18 Thread JoshyFun
;ve searched through sources and googled, but still can't get it. I'm using: CreatedUsing:='Created using Lazarus '+LCLVersion+' and free pascal '+{ $I %FPCVERSION%}+' ('+{$I %DATE%}+' '+{$I %TIME%}+')'; -- Best regards, JoshyFun

Re[2]: [fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

2010-02-17 Thread JoshyFun
and the most accurate would be to only downscale - but I GG> can't find color name definitions in 48-bit color. As 24 bit versions of cl colors are compatible with Delphi any 48 bit definition is valid from my point of view. -- Best regards, JoshyFun

Re[2]: [fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

2010-02-17 Thread JoshyFun
pscaling a values instead downscaling it. That's why things like Pantone exists as they provide a clear definition of each color. In example, pantone define a (one of them) 24 bit maroon as $844A5A in 24 bits space, to me it is a bit of pink, but for Pantone it is maroon

Re[2]: [fpc-devel] MemSize argument validity

2010-02-17 Thread JoshyFun
ould be slower FMdC> in this case, but also safer. heaptrc has some settings for that. I think they are between defines so a recompile is needed but it performs that checks with a serious speed penalty and a very big penalty in memory needed. -- Best r

Re[2]: [fpc-devel] FCL Thread-safety

2010-01-27 Thread JoshyFun
t in two threads or same object instance in two threads ? For the second one, most objects are NOT thread safe, but for the first one most objects are thread safe as far as I know. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-

Re[2]: [fpc-devel] compile time memory leak detection

2010-01-19 Thread JoshyFun
Hello Nikolai, Tuesday, January 19, 2010, 8:10:49 PM, you wrote: NZ> 19.01.2010 17:49, JoshyFun ?: >> var >>p: pchar; >> begin >>GetMem(p,10); >>inc(p,random(30)); NZ> Yes, this is among things which should probably be immediately NZ> dis

Re[2]: [fpc-devel] compile time memory leak detection

2010-01-19 Thread JoshyFun
llocated mem will not be accessed beyond NZ> the respective allocation size. That's impossible to the compiler, it is a runtime task (heaptrc): procedure weird(); var p: pchar; begin GetMem(p,10); inc(p,random(30)); p^:='A'; end

Re[2]: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread JoshyFun
e possible to do something like: interface [...] {$I InterfaceOnly C:\.pas} [...] Implementation {$I ImplementationOnly C:\.pas} [...] I think it will not include a big penalty in the parser, or maybe I'm completly wrong ? -- Best regards, JoshyFun __

Re[2]: [fpc-devel] profiling under windows

2009-11-20 Thread JoshyFun
d get more benefit from any optimization. Also look for functions (specially the basic ones) that spend too much time. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] profiling under windows

2009-11-20 Thread JoshyFun
search path for that project, maybe it helps: C:\cygwin\bin\;C:\cygwin\lib\;C:\Mingw\lib\;C:\Mingw\lib\gcc\mingw32\3.4.5\ Obviously one of them is not needed ;) -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] heaptrc

2009-11-19 Thread JoshyFun
- gdb.exe file C:/windows/system32/cmd.exe r Program exited with code 01. Or maybe I missunderstood the "file" command means ? -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] heaptrc

2009-11-19 Thread JoshyFun
s not report right runs, only bad runs, and also you must open it on each run. Anyway this "bug" must be Lazarus related. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] heaptrc

2009-11-19 Thread JoshyFun
ancel button to the window that show leaks ? With 1000 leaks is not funny to press the OK button around 300 times. I know I can cancel the program, but a cancel button seems to be more clean. If this message is more a Lazarus related problem, please let me know. Thank you. -- Best reg

Re[2]: [fpc-devel] FPC 64bit and gdb on Linux

2009-10-24 Thread JoshyFun
2345678 = 5 -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] class constants

2009-10-19 Thread JoshyFun
one, specialy for types. Just adding my 2 cents fo noise to the thread :) -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] class abstract, class sealed implementation. please review.

2009-10-16 Thread JoshyFun
f GG> the classes I created. So why would I want to limit the usefulness of GG> a class - it goes totally against the OOP principles. I think it has been designed to avoid derived classes from commercial packages. -- Best regards, JoshyFun ___ fpc

Re: [fpc-devel] gdb shows wrong type info

2009-10-09 Thread JoshyFun
namedtype, LONGINT, LONGINT); __ct(POINTER, PSTRING, LONGINT); __ct(POINTER, PSTRING, unnamedtype, LONGINT, LONGINT); } The exception parameters are well, but there are missing "__ct" resolves which I think it is expected at that point. Maybe this can help som

Re[2]: [fpc-devel] TField.AsString and Databases with UTF-8 charset

2009-07-24 Thread JoshyFun
S. I can not perform uppercase and like selects but at least works in a predictable way. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicode conversion routines

2008-11-23 Thread JoshyFun
OSs. Maybe a small subset should be available for platforms that do not provide native support like DOS and a WideString or UnicodeString is available, maybe as a separate unit to be linked in only if needed. -- Best regards, JoshyFun ___ fpc-dev

Re[4]: [fpc-devel] Unicode conversion routines

2008-11-23 Thread JoshyFun
tailorings, not for the upper/lower but for other operations like word breaking. Libraries that cover a lot of language particularities are around 30-40 (or more) megabytes in runtime data and I think this kind of dependencies are a no, no, for FPC. -- Best regards, JoshyFun __

Re[3]: [fpc-devel] Memory consumed by strings

2008-11-23 Thread JoshyFun
data as it has not sense to use decomposed data in a source editor (unless I'm wrong of course). -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicode conversion routines

2008-11-23 Thread JoshyFun
32; $010400..$010427: Result:=UC+40; // In offsets calculated 406 items of 1023 else begin Result:=UnicodeCaseBS(UnicodeLowerCaseArraySource,UC,0,High(UnicodeLowerCaseArraySource)); if Result=-1 Then Result:=UC else Result:=UnicodeLowerC

Re[2]: [fpc-devel] Memory consumed by strings

2008-11-23 Thread JoshyFun
some things can not be done over one of the formats. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[4]: [fpc-devel] Unicode conversion routines

2008-11-23 Thread JoshyFun
code functions will be supported by FPC, only upper/lower, or maybe some more like decompose, normalize, char-word-line-paragraph iterators... I have some of them written if the FPC team wants them. -- Best regards, JoshyFun ___ fpc-devel maillist -

Re[2]: [fpc-devel] Unicode conversion routines

2008-11-22 Thread JoshyFun
getting out GG> NULL. I'm testing perfectly valid UTF-8 sequence and still getting GG> NULL result. Not checked right now, but as no valid sequences, no surrogates support. -- Best regards, JoshyFun ___ fpc-devel maillist

Re[2]: [fpc-devel] assign constant text to widestring

2008-10-24 Thread JoshyFun
w exceptions are available. Sort engine is much more complicated and much more language tied (To be conforman with each language) but default case always do a reasonable result for most cases. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-dev

Re[2]: [fpc-devel] assign constant text to widestring

2008-10-23 Thread JoshyFun
ones (including precise spelling, wordbreak, etc.). -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[3]: [fpc-devel] assign constant text to widestring

2008-10-23 Thread JoshyFun
tten it for my needs, but it is a bit incomplete for a good donation), I'm only answering a precise question. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] assign constant text to widestring

2008-10-23 Thread JoshyFun
uage(group) ? UpperCase, LowerCase, CapitalCase, WordBreak, ParagraphBreak, ... almost all have some language exceptions. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] assign constant text to widestring

2008-10-22 Thread JoshyFun
TF8String" is just an alias for "ansistring" so they are exactly the same thing, but with different name which in my case I'm using to be clear in code where things are utf-8 encoded. -- Best regards, JoshyFun ___ fpc-dev

Re[2]: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-26 Thread JoshyFun
used and processed. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-25 Thread JoshyFun
st any amount of time. Of course in other OS the things changes. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-12 Thread JoshyFun
#255 (English letters with some special characters like the above A> example). Check lconvencoding.pas in the LCL folder of Lazarus. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-11 Thread JoshyFun
s to A> get the additional bytes for it which ain't there. http://bugs.freepascal.org/view.php?id=11791 A> Not sure how can this be circumvented (using some conversion function?) A> or if it is a bug. Check Lazarus list, there is a quite recent thread about that &q

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-10 Thread JoshyFun
you seems to think that I'm trying to be offensive this is my end discussion point. Thank you for your POV about Unicode support and please, excuse my english. Have a nice day. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-09-10 Thread JoshyFun
e left out when the function that uses that array is never been called in the main program ? -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicodestring branch, please test and help fixing

2008-08-30 Thread JoshyFun
the other computer to test the functions. Thank you. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Unicodestring branch, please test and help fixing

2008-08-30 Thread JoshyFun
n the current WideString format. Is there any important technical difference which could prevent the current code to work as the WideString one ? -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
l at 2.2.2 eating the " simbol after the character, but it could be a render error due the carrier error at 2.1.1 rendering NULL character. Even I do not know it is should be considered OK the 2 chars render of 2.1.4 and 2.3.4, but again seens to be a render problem, not a decode

Re[2]: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
Hello Graeme, Tuesday, August 26, 2008, 3:48:39 PM, you wrote: GG> That doesn't say much... :-) It's the usual status :) most ones are focused in speed instead given a bit of security, special against overlong sequences which can bypass security barriers... check the attached file and decode it

Re[4]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
ng currently in the general implementation. Locales should be added as some kind of plugin for the functions, maybe passing a runtime array. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/m

Re: [fpc-devel] UTF8Encode widestring encoding

2008-08-26 Thread JoshyFun
TF16 intentionally as the proposed replace function can not make grow the widestring which comes allocated, but... hmmm... oh! it comes at 2*bytes in UTF8, so there must be space always to fit any character even the doubles ones. :) It's time to add the UTF16 to my code. -

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
Hello Daniƫl, Tuesday, August 26, 2008, 11:05:58 AM, you wrote: DM> For uppercasing/lowercasing it is correct to define a Unicode char as 2 DM> bytes. If surrogates are handled ;) (my code does not handle them currently). -- Best regards, Jo

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
mple :) -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re[2]: [fpc-devel] Unicode functions

2008-08-26 Thread JoshyFun
rCase() function could become quite complex. Uppercase and lowercase is quite simple compared with "SameText" ;) -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] Unicode functions

2008-08-25 Thread JoshyFun
the team is interested and can point me to the most important functions it will prevent me for looking for unsupported functions throught the code flow. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.f

Re[2]: [fpc-devel] (RTL) Utf8ToUnicode

2008-08-16 Thread JoshyFun
k you, that's more than enought. I'll take a look over the report from time to time about possible "more information requested". -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] (RTL) Utf8ToUnicode

2008-08-16 Thread JoshyFun
has checked it, ... ? As I said, it is simply curiosity. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] Utf8ToUnicode

2008-07-25 Thread JoshyFun
h take care of wrong sequences and non usable mapping spaces. As my pascal indentention is not the usual one in FPC you can change it or request for a change. There are some comments about what happends on each step. -- Best regards, JoshyFun UTF8ToUnicode.pas Desc

Re: [fpc-devel] move(xx, ansistring[1] versus ansistring, len)

2008-05-12 Thread JoshyFun
a pointer to ansi_str_dest[1], and if length(ansi_str_dest)=0 then the pointer should be $0001 :-? which should not raise any kind of range check. -- Best regards, JoshyFun ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel