So can you COMMENT that dead part with "and FALSE" and dead part II
with "if ... =#10"? It will make things faster for people!
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
rtl/inc/ustrings.inc
function UTF8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt;
Source: PChar; SourceBytes: SizeUInt): SizeUInt;
a) it has "If (PreChar<>13) and FALSE then" and later some big block.
with a comment which tells that "and FALSE" is on purpose and block is
ignored.
FPC 3.0.4 Linux x64, test from Lazarus 2.0 trunk, ie with widestringmanager.
UnicodeCompareStr('aaa', 'AA')=1 - ?
UnicodeCompareText('aaa', 'AA')=1 - ok
UnicodeCompareStr('AAA', 'aa')=1 - ?
UnicodeCompareText('AAA', 'aa')=1 - ok
I expected that *Str gives different results, because 'a' vs
Linux x64 gtk2, crash in regnext() in "offset:=",
https://github.com/Alexey-T/ATSynEdit/blob/master/atsynedit/atsynedit_regexpr.pas#L3664
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
My app does mass replace with regex. in big text, user enters regex "\b"
and replaces it to eg "__". app calls Substitute() with each found
match, match is zero length so your code will NOT replace it to "__".
but it's needed to replace it to "__".
--
Regards,
Alexey
1) typo in new Id: iMput.
2) wrong fix for 2nd "Error" call in Substitute(): you disabled Error
call but didn't disable Exit, you need to skip Exit there too, so
Substitute will return non empty result when user replaces regex "\b" to
e.g. "__".
--
Regards,
Alexey
Can you add TIniFile.WriteBom property? it's not quite enough, I need to
disable it globally in entire app (I have ~10 ini objects), so
additional global default is needed (like Lazarus has global variables).
--
Regards,
Alexey
___
fpc-pascal
>> 2) if BOM is there, allow ReadString to find section at the file begin:
I can read/write IniFiles with BOM with fpc r43847, with and withoud
DefautSystemCodePage := CP_UTF8.
Sorry, my mistake-- TIniFile can read this BOM file, but my software cannot:
a) I've fixed one place where my app
ini_lexmap:= TIniFile.Create(fn_lexmap_final);
try
ini_lexmap.WriteString('ref', IntToStr(i_sub), s_lexer);
finally
FreeAndNil(ini_lexmap);
end;
with FPC trunk it converts .ini file to UTF8 BOM! Bad, because then my
code reads this .ini file
https://github.com/jnr/jnr-posix/issues/126
these guys had found the reason of broken Java code on freebsd 12: they
now detect ABI version and use different struct on freebsd 12. link
shows Github patch to Java "stat" struct.
--
Regards,
Alexey
freebsd src is https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h
it has 2 defines for "stat": usual
struct stat {
dev_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
nlink_t st_nlink; /* number of hard links */
*mode_t
It's obvious this needs to use SetDelimetedText with other params (2nd 3rd)
Procedure TStrings.SetCommaText(const Value: string);
begin
CheckSpecialChars;
C1:=Delimiter;
C2:=QuoteChar;
Delimiter:=',';
QuoteChar:='"';
Try
SetDelimitedText(Value);
Finally
Delimiter:=C1;
Procedure TStrings.SetDelimitedText(const AValue: string); has about 16
calls to Length(AValue), so make a variable NLen to speed up it.
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://www.freepascal.org/docs-html/current/fcl/syncobjs/teventobject.manualreset.html
text is poor, even the text in .Create (about ManualReset) is more
detailed, so copy text from .Create to this page.
--
Regards,
Alexey
___
fpc-pascal maillist
https://www.freepascal.org/docs-html/current/fcl/syncobjs/teventobject.create.html
Create creates a new event object with unique name AName. The object
will be created security attributes EventAttributes (windows only).
- "created security" - "with" missed
- "windows only"-> "parameter is
FPC 3.3.1-r43022 [2019/09/16] for Linux x64. This code crashes, because
fpc sees 'x', 'y' wrong:
Py_BuildValue('{sLsisisisisisisOsOsOsisisisisisO}',
'tag',
Mark.Tag,
'x',
Mark.PosX,
'y',
Mark.PosY,
'len',
Mark.LenX,
I must change it to this, it works ok:
First field is below the "OS" and "Product build" on the top; 2nd is
below "Attach tags". Remove 1 of them.
https://bugs.freepascal.org/view.php?id=35400
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Win10 x32, Free Pascal Compiler version 3.3.1-r43163 [2019/10/11] for i386
After installing FPC trunk (via fpcupdeluxe), I cannot run CudaText from
IDE.
Also dont run from console:
The application has failed to start because its side-by-side
configuration is incorrect. Please see the
So it was the issue of missing of fpcupdeluxe helper files (libs are not
uploaded to fpcupdeluxe site)
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Thanks for fixing, after FPC update binary compiled okay. You maybe can
test final binary:
https://www.fosshub.com/CudaText.html (see "netbsd" link).
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html
1) add to the list of attribs the value faAnyFile.
2) correct the example: call FindClose only inside block "if
FindFirst(..)=0"
--
Regards,
Alexey
___
fpc-pascal maillist -
Added 2 defines: OpenBSD, DragonFlyBSD. Pls add others too.
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> FPC generally uses system library functions for the conversion, so it
does not depend on the FPC version.
But FPC has such files. Are they used in SetCodePage code?
user@PC:~/fpcupdeluxe/fpcsrc/packages/rtl-unicode/src/inc$ ls cp*
cp895.pas cp932.pas cp936.pas cp949.pas cp950.pas
https://bugs.freepascal.org/view.php?id=35578
Here I suggested to merge 3rd party unit into FPC, into Windows unit.
Why to Windows? Because it's user32.dll imports.
Maybe add APIs to JEDI component? I see FPC has /packages/winunits-jedi/src
with many Win APIs, so maybe add unit there?
Both ways
https://github.com/graemeg/freepascal/commit/2a1c95c8488dec617cefa65f4803bb17c7e57552
Seems 200 and 208 swapped (error) in some places of that patch.
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
hi. I see the last FPC fixes has fix for missing WinAPI funcs. So I
opened one of such func doc GetGuiResources, and got list of all related
funcs. Pls check them:
Process and Thread Functions
ICONINFO structure
ICONINFOEXA structure
ICONINFOEXW structure
https://github.com/Alexey-T/CudaText/commit/354858b19754d2d5fa2980b5f45fc76d1a266763#diff-c3361b43575e71110f1cea4cf54d8d13R325
this is fixed to avoid %subj% compile error. why error?
--
Regards,
Alexey
___
fpc-pascal maillist -
Hello. Can you pls, add Sorted property to TFPSList / TFPGList (Add()
method must sort newly added item), and also Find method (which must use
binary search in Sorted case, and use plain loop if not sorted)?
--
Regards,
Alexey
___
fpc-pascal
According to one of new issues, StrUtils misses many funcs for
UnicodeString: RPos, RPosEx Maybe someone here can help to write.
(In CudaText project I had a bug, when i used RPos on Russian text and
got too big result).
--
Regards,
Alexey
___
For those who wants to replicated gdeque crash. I avoided using of
gdeque unit now, so to replicate, pls get an older version of
atsynedit_adapter_cache.pas: before 2019.01.30
https://github.com/Alexey-T/ATSynEdit/commits/master/atsynedit/atsynedit_adapter_cache.pas
--
Regards,
Alexey
I see stange crash in gdeque unit if I use unit from FPC trunk
https://github.com/graemeg/freepascal/blob/master/packages/fcl-stl/src/gdeque.pp
crash in TDeque.PushFront, i cannot understand it and i don't know the code.
pls, reproduce it like me:
- Linux gtk2 x64 (Ubuntu 18.4), fpc 3.0.4,
Details:
Ubuntu 17.4 x64; Lazarus 1.9 trunk, fpc 3.0.2.
I see IDE call stack like this when i pause app (during loop forever)
SYSTEM_$$_FPSYSCALL$INT64$INT64$$INT64
0041E7E0 55 push %rbp
0041E7E1 4889e5 mov %rsp,%rbp
0041E7E4
In Lazarus component EControl I call Sleep(30) to wait when timer tick
work is done.
while FBusy do Sleep(30);
and app loops forever now in sleep().
procedure Sleep(milliseconds: Cardinal);
Var
timeout,timeoutresult : TTimespec;
res: cint;
begin
timeout.tv_sec:=milliseconds div 1000;
Pls, call Deref for all items (1 by 1), by REALLOC all items [e.g. 800K]
as block. Today I call Delete 800K times and do realloc 800K times :(
--
Regards,
Alexey
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Hello
I have 1M lines file. CudaText (Lazarus app) cannot delete lines fast
[selected 800K lines]. Reason: TFPSList has only Delete for one item.
Need DeleteRange for many items.
--
Regards,
Alexey
___
fpc-pascal maillist -
35 matches
Mail list logo