>Though one could probably exclude the check at line 1981 of
rtl/inc/ustrings.inc as well as the two existing branches will result in
the same
Yes, it was my point B.
@/José Mejuto, can you pls simplify this place, ie remove "if /IBYTE =
10" + then/else.
--
Regards,
Alexey
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
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fp
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 'A'
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
https://lists.freepascal.org/cgi-
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 maillis
>> 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 re
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 an
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;
Qu
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://lists.freepascal.org/cgi-b
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 use
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:
Py_B
17 matches
Mail list logo