Commit Graph

1319 Commits

Author SHA1 Message Date
paul
8af1fa3e57 rtl: fix error message
tests: add test to check utf32<->utf16 conversions

git-svn-id: trunk@19188 -
2011-09-23 02:24:30 +00:00
paul
e774a20c97 rtl:
- fix compilation of character.pas by fpc 2.4
  - check TCharacter method arguments and raise appropriate EArgumentException or EArgumentOutOfRangeException exceptions
  - implement to/from UTF32 conversion based on utf16toutf32 and friends

git-svn-id: trunk@19183 -
2011-09-23 00:28:04 +00:00
paul
1553c8da7d rtl: add EArgumentException, EArgumentOutOfRangeException classes
git-svn-id: trunk@19182 -
2011-09-23 00:07:26 +00:00
paul
59a69eaeba rtl: add TCharacter class implementation by Inoussa. At this moment only BMP(0-$FFFF) UnicodeChar are handled.
tests: add character unit tests
(mantis #0020302)

git-svn-id: trunk@19170 -
2011-09-22 00:52:51 +00:00
marco
91b017a985 * ansi(start/ends)(str/text) MBCS compatible (via widestringmgr), mantis #16153 + tests
Patch by Flavio Etrusco.

git-svn-id: trunk@19043 -
2011-09-10 15:01:46 +00:00
marco
47af891513 * change resourcestream.handle from thandle to TPFResourceHGlobal, since it is
a pointer, and handle is a 32-bit integer on 64-bit *nix.

git-svn-id: trunk@19042 -
2011-09-10 10:00:27 +00:00
sergei
0c3c8a8745 * Cast HashValue to Longint, otherwise empty strings (which have hash=$FFFFFFFF) cause range check error when RTL is compiled with -Cr.
git-svn-id: trunk@19034 -
2011-09-08 19:15:34 +00:00
sergei
689d4b3ecc + Mantis #19651: Generate table of typed string constants which are initialized with resourcestrings, so they are updated when SetResourceStrings or SetUnitResourceStrings is called.
git-svn-id: trunk@18968 -
2011-09-04 16:01:26 +00:00
marco
0cc60e05f2 * IsSamemonth analog to IsSameDay. Mantis #19876
git-svn-id: trunk@18950 -
2011-09-02 19:44:54 +00:00
florian
3e4469937c * fix Types.UnionRect as proposed by Piotr Karasinski, resolves #20006
git-svn-id: trunk@18246 -
2011-08-17 12:01:23 +00:00
florian
4c95e9fce5 * commented pdata type as proposed in #20004 by Michalis Kamburelis, resolves #20004
git-svn-id: trunk@18244 -
2011-08-17 11:47:41 +00:00
florian
ae8c250c3e * fix indention
git-svn-id: trunk@18238 -
2011-08-17 09:20:28 +00:00
florian
9b88297389 * patch by Michalis Kamburelis to keep the ending of TFPSList filled with zeros (space between count and capacity), resolves #20005
git-svn-id: trunk@18237 -
2011-08-17 09:05:58 +00:00
florian
6cb6d9ffaf * patch by Michalis Kamburelis to make FGL lists First and Last properties that are settable, resolves #19874
git-svn-id: trunk@18223 -
2011-08-16 17:11:48 +00:00
florian
3787ed993c * made some fields in fgl.pp private as proposed by Michalis Kamburelis, resolves #19873
git-svn-id: trunk@18210 -
2011-08-14 19:52:01 +00:00
florian
63403e5199 * *Dir(<ansistring>) functions need to check io result as well, resolves #19977
git-svn-id: trunk@18209 -
2011-08-14 19:00:07 +00:00
florian
4a34192510 * fix TFPGList.Extract to return the correct values by a patch by Michalis Kamburelis, resolves #19960
git-svn-id: trunk@18205 -
2011-08-14 13:57:33 +00:00
michael
64514714c2 * Added invalid stream operation string constant
git-svn-id: trunk@18200 -
2011-08-13 21:19:45 +00:00
michael
96e5333dc2 * Added fakeSeekForward for benefit of descendant streams.
* Override GetSize/Position for memory/stringstream for efficiency
* Added InvalidSeek exception throwing. Should be overridden to throw custom exceptions.

git-svn-id: trunk@18190 -
2011-08-13 18:45:48 +00:00
florian
883eab626d * inline Types.Point(...)
git-svn-id: trunk@18174 -
2011-08-11 20:53:59 +00:00
Jonas Maebe
0a88009059 * comment and formatting fixes by Christian Budde (mantis #19919)
git-svn-id: trunk@18134 -
2011-08-07 10:10:51 +00:00
marco
b59c42f2c7 * removed exporting a non standard strtotime, which was a workaround for missing
formatsettings/locale versions. Patch by Lacak2, Mantis #19870 (3rd)

git-svn-id: trunk@18110 -
2011-08-06 12:19:44 +00:00
marco
bf65638891 * strtodatetime adapted to new strtotime regime. Take separator from formatsettings.
Second patch fo Mantis #19870

git-svn-id: trunk@18100 -
2011-08-05 13:37:16 +00:00
marco
52afb619aa * add overloaded strtotime, patch by Lacak2, Mantis #19870
git-svn-id: trunk@18093 -
2011-08-04 17:01:34 +00:00
marco
079831b50e * Deref old content of node in FPSList.put. Mantis #19854
git-svn-id: trunk@18063 -
2011-08-02 15:15:27 +00:00
michael
0d14fc2851 * Second patch from Mattias Gaertner (bug 19623, should fix 19633 as well)
git-svn-id: trunk@17845 -
2011-06-27 18:34:25 +00:00
michael
b98270d27c * Undo 17822 - causes resource compilation errors in lazarus
git-svn-id: trunk@17842 -
2011-06-27 08:18:30 +00:00
michael
a2d007dfa3 * Applied patch from Mattias Gaertner to fix parse buffer not always being loaded (bug 19623)
git-svn-id: trunk@17823 -
2011-06-25 10:58:34 +00:00
florian
37b8b791d5 * overloaded versions of IsNan, resolves #14351
* prefer <ord> -> single over <ord> -> double/extended, this is delphi compatible

git-svn-id: trunk@17758 -
2011-06-14 20:38:51 +00:00
joost
96ec37aa92 * Fixed multiplying negative tBCD values
git-svn-id: trunk@17744 -
2011-06-13 17:12:49 +00:00
michael
a07b14853a * Changed ImplicitDir default from False to True
git-svn-id: trunk@17735 -
2011-06-13 09:07:17 +00:00
marco
949b6dd65a * Patch from LacaK2 for Mantis #18807 adding of formatsettings variants of BCD conversion routines
git-svn-id: trunk@17729 -
2011-06-12 13:30:03 +00:00
marco
92a7e1c781 * fix typos in windows implementation r17717
git-svn-id: trunk@17723 -
2011-06-11 22:26:42 +00:00
michael
6b42ee69a9 * Changed FileSearch to handle a set of options instead of boolean.
Options now include stripquotes
* Changed ExeSearch so dirlist is optional and PATH is used if omitted. 
  It uses stripQuotes on windows. (bug 19282)

git-svn-id: trunk@17717 -
2011-06-11 11:36:51 +00:00
michael
fd491e8647 * Fixed permissions on file create
git-svn-id: trunk@17560 -
2011-05-26 07:02:42 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
michael
4d572aa08d * Added TEventTypes set
git-svn-id: trunk@17531 -
2011-05-23 12:33:28 +00:00
florian
7de8972e5c * fix Sysutils.AssertErrorHandler as proposed by Martin Friebe in #19130, resolves #19310
git-svn-id: trunk@17470 -
2011-05-15 15:13:22 +00:00
joost
99bbb6e5cf * EncodeTimeInterval implemented, allowing time intervals>24 hour
git-svn-id: trunk@17410 -
2011-05-08 12:28:41 +00:00
michael
7069db2194 * Fixed setting of RAW interfaces
git-svn-id: trunk@17391 -
2011-05-02 19:16:53 +00:00
florian
7f0d245ac2 * reintegrate avr branch into trunk, work on avr is less invasive than I thought so it can be continued in trunk
git-svn-id: trunk@17348 -
2011-04-19 20:17:52 +00:00
florian
ee54a8b879 * Merged helper branch made by Sven Barth
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
 U   rtl/inc/objc1.inc
U    rtl/inc/system.inc
U    rtl/objpas/typinfo.pp
A    tests/test/tchlp30.pp
A    tests/test/thlp35.pp
A    tests/test/tchlp3.pp
A    tests/test/thlp7.pp
A    tests/test/trhlp24.pp
A    tests/test/tchlp13.pp
A    tests/test/thlp44.pp
A    tests/test/thlp18.pp
A    tests/test/trhlp33.pp
A    tests/test/tchlp22.pp
A    tests/test/thlp27.pp
A    tests/test/trhlp16.pp
A    tests/test/tchlp31.pp
A    tests/test/thlp36.pp
A    tests/test/tchlp4.pp
A    tests/test/thlp8.pp
A    tests/test/trhlp25.pp
A    tests/test/trhlp1.pp
A    tests/test/uhlp41a.pp
A    tests/test/tchlp40.pp
A    tests/test/tchlp14.pp
A    tests/test/thlp19.pp
A    tests/test/trhlp34.pp
 U   tests/test/ttpara1.pp
A    tests/test/tchlp23.pp
A    tests/test/thlp28.pp
A    tests/test/urhlp14.pp
A    tests/test/trhlp17.pp
A    tests/test/tchlp32.pp
A    tests/test/uhlp43.pp
A    tests/test/thlp37.pp
A    tests/test/tchlp5.pp
A    tests/test/thlp9.pp
A    tests/test/trhlp26.pp
A    tests/test/trhlp2.pp
A    tests/test/uchlp12.pp
A    tests/test/tchlp41.pp
A    tests/test/uhlp41b.pp
A    tests/test/tchlp15.pp
A    tests/test/trhlp35.pp
 U   tests/test/ttpara2.pp
A    tests/test/tchlp50.pp
A    tests/test/tchlp24.pp
A    tests/test/thlp29.pp
A    tests/test/trhlp18.pp
A    tests/test/thlp10.pp
 U   tests/test/cg/ttincdec.pp
A    tests/test/tchlp33.pp
A    tests/test/thlp38.pp
A    tests/test/tchlp6.pp
A    tests/test/trhlp27.pp
A    tests/test/trhlp3.pp
A    tests/test/tchlp42.pp
A    tests/test/tchlp16.pp
A    tests/test/trhlp36.pp
A    tests/test/tchlp51.pp
A    tests/test/tchlp25.pp
A    tests/test/trhlp19.pp
A    tests/test/thlp11.pp
A    tests/test/tchlp34.pp
A    tests/test/thlp39.pp
A    tests/test/tchlp7.pp
A    tests/test/trhlp28.pp
A    tests/test/thlp20.pp
A    tests/test/trhlp4.pp
A    tests/test/tchlp43.pp
A    tests/test/tchlp17.pp
A    tests/test/trhlp37.pp
A    tests/test/tchlp52.pp
A    tests/test/tchlp26.pp
A    tests/test/thlp1.pp
A    tests/test/urhlp17.pp
A    tests/test/thlp12.pp
A    tests/test/tchlp35.pp
A    tests/test/tchlp8.pp
A    tests/test/trhlp29.pp
A    tests/test/thlp21.pp
A    tests/test/trhlp5.pp
A    tests/test/tchlp44.pp
A    tests/test/tchlp18.pp
A    tests/test/trhlp10.pp
A    tests/test/trhlp38.pp
A    tests/test/thlp30.pp
A    tests/test/tchlp53.pp
A    tests/test/tchlp27.pp
A    tests/test/thlp2.pp
A    tests/test/thlp13.pp
A    tests/test/tchlp36.pp
A    tests/test/tchlp9.pp
A    tests/test/thlp22.pp
A    tests/test/trhlp6.pp
A    tests/test/tchlp45.pp
A    tests/test/tchlp19.pp
A    tests/test/trhlp11.pp
A    tests/test/trhlp39.pp
A    tests/test/thlp31.pp
A    tests/test/tchlp54.pp
A    tests/test/tchlp28.pp
A    tests/test/uhlp39.pp
A    tests/test/thlp3.pp
A    tests/test/trhlp20.pp
A    tests/test/thlp40.pp
A    tests/test/thlp14.pp
A    tests/test/tchlp37.pp
A    tests/test/thlp23.pp
A    tests/test/trhlp7.pp
A    tests/test/tchlp46.pp
A    tests/test/trhlp12.pp
A    tests/test/thlp32.pp
A    tests/test/tchlp29.pp
A    tests/test/thlp4.pp
A    tests/test/trhlp21.pp
A    tests/test/tchlp10.pp
A    tests/test/thlp41.pp
A    tests/test/thlp15.pp
A    tests/test/tchlp38.pp
U    tests/test/trtti1.pp
A    tests/test/trhlp30.pp
A    tests/test/thlp24.pp
A    tests/test/trhlp8.pp
A    tests/test/uchlp18.pp
A    tests/test/tchlp47.pp
A    tests/test/trhlp13.pp
A    tests/test/thlp33.pp
A    tests/test/tchlp1.pp
A    tests/test/thlp5.pp
A    tests/test/trhlp22.pp
A    tests/test/tchlp11.pp
A    tests/test/thlp42.pp
A    tests/test/thlp16.pp
A    tests/test/tchlp39.pp
A    tests/test/uhlp3.pp
A    tests/test/trhlp31.pp
A    tests/test/tchlp20.pp
A    tests/test/uhlp31.pp
A    tests/test/thlp25.pp
A    tests/test/trhlp9.pp
A    tests/test/tchlp48.pp
A    tests/test/trhlp40.pp
A    tests/test/trhlp14.pp
A    tests/test/thlp34.pp
A    tests/test/tchlp2.pp
A    tests/test/thlp6.pp
A    tests/test/trhlp23.pp
A    tests/test/tchlp12.pp
A    tests/test/thlp43.pp
A    tests/test/thlp17.pp
A    tests/test/trhlp32.pp
A    tests/test/tchlp21.pp
A    tests/test/thlp26.pp
A    tests/test/tchlp49.pp
A    tests/test/trhlp41.pp
A    tests/test/trhlp15.pp
 U   tests/webtbf/tw13815.pp
 U   tests/tbf/tb0216.pp
U    compiler/msgtxt.inc
U    compiler/nld.pas
U    compiler/dbgdwarf.pas
U    compiler/sparc/cgcpu.pas
U    compiler/fmodule.pas
U    compiler/i386/cgcpu.pas
U    compiler/msgidx.inc
U    compiler/pdecsub.pas
U    compiler/ncgld.pas
U    compiler/symdef.pas
U    compiler/nobj.pas
U    compiler/nflw.pas
U    compiler/pdecobj.pas
U    compiler/objcdef.pas
U    compiler/pinline.pas
U    compiler/pexpr.pas
U    compiler/ncgrtti.pas
U    compiler/x86_64/cgcpu.pas
U    compiler/htypechk.pas
U    compiler/parser.pas
U    compiler/tokens.pas
U    compiler/symbase.pas
U    compiler/ncal.pas
U    compiler/symtable.pas
U    compiler/pp.lpi
U    compiler/m68k/cgcpu.pas
U    compiler/ppu.pas
U    compiler/rautils.pas
U    compiler/arm/cgcpu.pas
U    compiler/ptype.pas
U    compiler/symconst.pas
U    compiler/mips/cgcpu.pas
U    compiler/msg/errore.msg
U    compiler/psub.pas
U    compiler/utils/ppudump.pp
 U   compiler/utils
U    compiler/pdecvar.pas
U    compiler/ncgcal.pas
U    compiler/pdecl.pas
U    compiler/dbgstabs.pas
U    compiler/ppcgen/cgppc.pas
 U   packages/fcl-xml/tests/README_DOM.txt
 U   packages/unzip/src/unzip51g.pp
 U   packages/winunits-base/src/dwmapi.pp
 U   .

git-svn-id: trunk@17328 -
2011-04-16 14:01:44 +00:00
sergei
6bca660e76 * Patch from LacaK, eliminates redundant variant finalization and try..finally block in TFMTBcdFactory.CastTo
git-svn-id: trunk@17319 -
2011-04-14 20:25:41 +00:00
svenbarth
35b47e491c Rebase to revision 17306
git-svn-id: branches/svenbarth/classhelpers@17314 -
2011-04-13 10:04:14 +00:00
florian
fb84cb865b * rebase to trunk@17295
git-svn-id: branches/avr@17296 -
2011-04-10 19:20:48 +00:00
sergei
b7a56722ff * Cleanup variant->string conversions: TryStrToDate and TryStrToTime are redundant because TryStrToDateTime already does the same checks. Patch from Luiz Americo, resolves #19115.
git-svn-id: trunk@17265 -
2011-04-07 04:10:54 +00:00
sergei
c17afffb65 * Fixed Variant (containing DateTime) to string conversions. Conversion to WideString was plain wrong, and conversion to AnsiString was ignoring the time portion. Patch from Luiz Americo, resolves #19075.
git-svn-id: trunk@17259 -
2011-04-06 07:08:30 +00:00
svenbarth
d0705a1779 Rebase to revision 17236
git-svn-id: branches/svenbarth/classhelpers@17241 -
2011-04-03 17:24:35 +00:00
svenbarth
b0b051ae83 Introduce a new type kind for helpers in the RTTI. This is Delphi incompatible, but it's cleaner than Delphi's "let's extend some magic class". This might not matter much though, because according to Google the RTTI for class helpers seems to be rarely used.
* compiler/ncgrtti.pas:
- objectdef_rtti_class_full:
 - don't write the VMT data for helpers
 - write the typeinfo of the extended type (something that Delphi does definitely not support :P )
- objectdef_rtti: write the new type kind for helpers instead that of classes
* compiler/symconst.pas: introduce new type kind constant "tkHelper" before "tkFile" (what is that used for btw?)
* rtl/inc/system.inc: add the constant here as well (why wasn't tkUChar added here?)
* objpas/typinfo.pp: 
- add tkHelper to the TTypeKind enum (but here tkUChar was added?!)
- extend the TTypeData record with the data of helpers

git-svn-id: branches/svenbarth/classhelpers@17240 -
2011-04-03 14:13:00 +00:00
michael
f235e4c116 * Fixed 18183
git-svn-id: trunk@17225 -
2011-04-02 15:41:39 +00:00