Commit Graph

34837 Commits

Author SHA1 Message Date
paul
1d2778af24 merge r17554 from cpstrnew branch by inoussa:
new tests.

git-svn-id: trunk@19119 -
2011-09-17 13:57:24 +00:00
paul
005795495d merge r17552 from cpstrnew branch by inoussa:
*In normal procedure "var" and "out" RawByteString parameters does not accept other string types. Procedures with
"compilerproc" directive or the newly added "rtlproc" directive accept that. Please note that it is up to the
procedure coder to ensure the correctness of the code page in that case. The new directive is needed to handle 
the RTL procedures/functions that are not marked as "compilerproc" such as "UniqueString", "Insert" and "Delete".

*Correct "fpc_ansistr_concat" to handle code page correctly.

*Default "ansitring" type is now created with code page set to "0" instead of "65535". Before that change it was 
impossible to distinguish a "RawByteString" with the default "ansistring". At runtime "ansistring" variable'code
page is set to DefaultSystemCodePage

*UniqueString flavor of "SetLength" has been updated to release memory when shrinked to at least 50%, like ansitring
does.

git-svn-id: trunk@19118 -
2011-09-17 13:52:09 +00:00
paul
0c3ccadf07 merge r17488 from cpstrnew branch by michael:
* Updates from Inoussa

git-svn-id: trunk@19117 -
2011-09-17 13:46:45 +00:00
paul
cf77233a52 merge r17487 from cpstrnew branch by michael:
* UPdates from inoussa

git-svn-id: trunk@19116 -
2011-09-17 13:43:15 +00:00
paul
6f08c86eb1 merge r17486 from cpstrnew branch by michael:
* New tests from Inoussa to test various code-page string related issues

git-svn-id: trunk@19115 -
2011-09-17 13:37:41 +00:00
paul
22b19220a3 merge r17485 from cpstrnew branch by michael:
Patch from Inoussa:
* rtl/inc/astrings.inc
    ** "fpc_AnsiStr_Concat_multi" : add "cp" parameter. If the "DestS" variable is "nil" this code page
       is use in order not to loose the declared code page of the original (result)variable.
    ** "fpc_AnsiStr_Compare" : modify to compare taking care of the code  page of the arguments.
    ** "fpc_AnsiStr_Compare_equal" : modify to compare taking care of the code page of the arguments.
    ** "fpc_AnsiStr_SetLength" : add "cp" parameter. If the "S" variable is "nil" this code page
       is use in order not to loose the declared code page of the original (result)variable.

* rtl/inc/systemh.inc
    ** add "SetCodePage" prototype.

git-svn-id: trunk@19114 -
2011-09-17 13:34:37 +00:00
paul
723f3424d4 merge r17484 from cpstrnew branch by michael:
* Patch from Inoussa:
* defcmp.pas
    ** ansistring to/from RawByteString are evaluated "te_equal"
    ** ansistring to UTF8string is evaluated (te_convert_l1,tc_string_2_string)

* ncnv.pas
    ** "ttypeconvnode.typecheck_char_to_string" : WideChar to AnsiString/ShortString
        is possible if the source code page is not utf8
    ** "ttypeconvnode.typecheck_char_to_char" : WideChar to AnsiChar
        is possible if the source code page is not utf8

* ncon.pas
    ** "tstringconstnode.changestringtype" : Unicode to utf8string bug fix(set the encoding),
       constants in the source code with code page set utf8 should be converted back to utf8

* nopt.pas
    ** "genmultistringadd" : fpc_<stringname>_concat_multi have a new parameter "cp"
        to indicate the "DestS" code page if the variable content is nil. This is required
        in order not to loose the declared code page.

* pinline.pas
    ** "inline_setlength" : a new parameter "cp" to indicate the code page if the variable content
       is nil. This is required in order not to loose the declared code page.
* ptconst.pas
    ** "parse_arraydef" : for string const to array of ansichar/widechar conversion check for wide string and
        convert if it is required. For char const to array of ansichar/widechar conversion check for wide char and
        convert if it is required.

git-svn-id: trunk@19113 -
2011-09-17 13:30:09 +00:00
paul
f8b5920f31 merge r17438 from cpstrnew branch by michael:
* Applied patch from Inoussa to fix copy of unicode string

git-svn-id: trunk@19112 -
2011-09-17 13:27:26 +00:00
paul
0550c547f4 merge r17436 from cpstrnew branch by michael:
* Tests for typed constants

git-svn-id: trunk@19111 -
2011-09-17 13:24:03 +00:00
paul
2fe59a676a merge r17435 from cpstrnew branch by michael:
* Tests for typed constants

git-svn-id: trunk@19110 -
2011-09-17 13:22:16 +00:00
paul
1db610ecbd merge r17434 from cpstrnew branch by michael:
* Patch from Inoussa to fix constant strings with codepage

git-svn-id: trunk@19109 -
2011-09-17 13:19:59 +00:00
paul
4b9a082152 merge r17371 from cpstrnew branch by michael:
* Patch from Inoussa to fix tunistr5.pp

git-svn-id: trunk@19108 -
2011-09-17 13:17:19 +00:00
paul
7fd7eee1c9 merge r17330 from cpstrnew branch by michael:
* Patch from Inoussa, fixing tunistr1.pp and twide1.pp

git-svn-id: trunk@19107 -
2011-09-17 13:12:07 +00:00
paul
29c6b034aa merge r17330 from cpstrnew branch by michael:
* Patch from inoussa to handle pwchararray to ansistr

git-svn-id: trunk@19106 -
2011-09-17 13:07:03 +00:00
paul
fbc01291c4 merge r17327 from cpstrnew branch by michael:
* Patch from Inoussa to fix first test case

git-svn-id: trunk@19105 -
2011-09-17 13:04:50 +00:00
paul
9e0ad7baae merge r17318 from cpstrnew branch by florian:
* compilation fix by Inoussa OUEDRAOGO, resolves #19160

git-svn-id: trunk@19104 -
2011-09-17 13:01:20 +00:00
paul
99dae8b97e merge r16256 from cpstrnew branch by marco:
* fix for cycling with 2.4.x

git-svn-id: trunk@19103 -
2011-09-17 12:53:58 +00:00
paul
091627883f merge r14347 from cpstrnew branch by florian:
* fixed bootstrapping with 2.4.0
* patches by Graeme Geldenhuys, resolve #15251, #15252, #15253

git-svn-id: trunk@19102 -
2011-09-17 12:00:06 +00:00
paul
eefa5dbf25 merge r14170 from cpstrnew branch by paul:
add a test wich fails at moment

git-svn-id: trunk@19101 -
2011-09-17 11:57:43 +00:00
paul
233004f72b merge r14144 from cpstrnew branch by paul:
call MultiByteToWideChar with dwFlags=0 for UTF8 code page

git-svn-id: trunk@19100 -
2011-09-17 11:56:16 +00:00
paul
55434fd1d8 merge r14143 from cpstrnew branch by paul:
use RawByteString instead of AnsiString for Pos()

git-svn-id: trunk@19099 -
2011-09-17 11:54:58 +00:00
paul
e9f8182370 merge r14142 from cpstrnew branch by paul:
eat {$stringchecks} directive without the warning

git-svn-id: trunk@19098 -
2011-09-17 11:53:36 +00:00
paul
5bff550a15 merge r14141 from cpstrnew branch by paul:
+ test

git-svn-id: trunk@19097 -
2011-09-17 11:52:05 +00:00
paul
8f3f583199 merge r14140 from cpstrnew branch by paul:
prefer exact string const matches

git-svn-id: trunk@19096 -
2011-09-17 11:48:18 +00:00
paul
ad8195e9ae merge r14136 from cpstrnew branch by paul:
- fix return type of StringCodePage functions from Word to TSystemCodePage
- add SetMultiByteConversionCodePage procedure (which just change the DefaultSystemCodePage constant)

git-svn-id: trunk@19095 -
2011-09-17 11:46:33 +00:00
paul
b3db8db481 merge r14133 from cpstrnew branch by paul except ptconst.pas which has a difficult merge conflict (code moved to another unit which is not at the branch during the revision):
make AnsiStr concatenation and copy work

git-svn-id: trunk@19094 -
2011-09-17 11:44:47 +00:00
paul
2162add8ac merge r14132 from cpstrnew branch by paul:
- a set of rtl changes from AnsiString to RawByteString to various conversion functions
- a test which proves output in cp1251 and cp866 codepages (standard for Russian windows)

git-svn-id: trunk@19093 -
2011-09-17 11:39:13 +00:00
paul
2023b618ac merge r14131 from cpstrnew branch by paul:
rtl: do WriteStr without codepage conversion

git-svn-id: trunk@19092 -
2011-09-17 11:36:44 +00:00
paul
848ca6b0c0 merge r14130 from cpstrnew branch by paul:
pass unicodestring to rawbytestring arguments with converting to default system code page

git-svn-id: trunk@19091 -
2011-09-17 11:34:42 +00:00
paul
067b863b1b merge r14129 from cpstrnew by paul (defcmp.pas is not merged because trunk already has this fix):
prefer widestring->unicodestring and vice versa conversions than widestring->ansistring

git-svn-id: trunk@19090 -
2011-09-17 11:32:44 +00:00
paul
afa559ab2e merge r14123 from cpstrnew branch by paul:
fix string ref count for empty strings

git-svn-id: trunk@19089 -
2011-09-17 11:27:05 +00:00
paul
5e9ee14ee7 merge r 14122 from cpstrnew branch by paul:
fix StringCodePage for empty unicode and ansi strings

git-svn-id: trunk@19088 -
2011-09-17 11:24:49 +00:00
paul
203ded84ec merge r14121 from cpstrnew branch by paul:
make tcpstr1 work

git-svn-id: trunk@19087 -
2011-09-17 11:23:02 +00:00
paul
27538f21a4 merge r13489 from cpstrnew branch by florian:
* made tcpstr1 work

git-svn-id: trunk@19086 -
2011-09-17 11:21:00 +00:00
paul
8cc22972a0 merge r13488 from cpstrnew branch by florian except ncgcon.pas which has a difficult merge conflict (code moved to another unit which is not at the branch during the revision):
* first batch of patches to make tcpstr1.pp work

git-svn-id: trunk@19085 -
2011-09-17 11:16:45 +00:00
paul
06af8f3e44 merge r13486 from cpstrnew branch by florian:
+ fpc_ansistr_to_ansistr implemented, rtl compiles again

git-svn-id: trunk@19084 -
2011-09-17 11:03:30 +00:00
paul
ae0d732c8f merge r13485 from cpstrnew branch by florian:
* fixed compilation of system unit after last changes

git-svn-id: trunk@19083 -
2011-09-17 11:01:42 +00:00
paul
28627482c5 merge r13483 from cpstrnew branch by florian:
+ Win32Unicode2AnsiMove and Win32Wide2AnsiMove support code page parameter
+ Win32Ansi2UnicodeMove and Win32Ansi2WideMove support code page parameter
+ code page parameter added for several compilerprocs
* unified more code between win32 and win64 (widestring conversion routines

git-svn-id: trunk@19082 -
2011-09-17 10:54:00 +00:00
paul
42832675d8 merge r13482 from cpstrnew branch by florian:
+ first tests for code page aware strings

git-svn-id: trunk@19081 -
2011-09-17 10:40:45 +00:00
paul
8a4634a7b1 merge r13481 from cpstrnew branch by florian
+ support parsing of strings with code page specification
+ added encoding and elementsize field to ansi- and unicodestring records
+ some basic rtl support routines for encoding aware strings
+ DefaultSystemCodePage
+ DefaultUnicodeCodePage
+ ppu writing/loading of code page aware strings

git-svn-id: trunk@19080 -
2011-09-17 10:37:36 +00:00
paul
a95512f0ec merge cpstrnew branch r13480 by florian:
* merged old cpstr branch

git-svn-id: trunk@19079 -
2011-09-17 10:03:59 +00:00
Jonas Maebe
6920c7a0c1 * fixed stat/fstat-related types for iphonesim platform
(mantis #20249)

git-svn-id: trunk@19078 -
2011-09-17 09:31:32 +00:00
pierre
ea6138cffa * Add Category and svn information
git-svn-id: trunk@19077 -
2011-09-16 16:07:48 +00:00
marco
44bd4470f9 * Patch from Mantis #20046 fixing an issue in rcmatchstring.
git-svn-id: trunk@19072 -
2011-09-15 20:19:25 +00:00
sergei
1365467b0d + Support classes for creating unwind bytecode for Win64.
git-svn-id: trunk@19071 -
2011-09-15 15:35:08 +00:00
sergei
6280ee2eed * Changed attributes of .pdata section so it is smart-linkable on x86_64.
* Changed alignment of .pdata section to 4.
+ Support saving RELOC_NONE relocations to .o files and reading them back on x86_64.

git-svn-id: trunk@19070 -
2011-09-15 15:22:03 +00:00
sergei
782cdd8e9a x86 external Intel assembler:
+ Write name of sec_threadvar
+ Also write actual section alignment instead of always using PARA.

git-svn-id: trunk@19069 -
2011-09-15 15:05:14 +00:00
Jonas Maebe
05c4c3ae25 + test for mantis #20257 (already fixed in 2.7.x)
git-svn-id: trunk@19068 -
2011-09-15 12:47:23 +00:00
pierre
874f27a105 * Remove useless local variable which prevents go32v2 compilation
git-svn-id: trunk@19067 -
2011-09-14 21:55:36 +00:00
pierre
30129a0363 * msg files regeneration after commit 19057
git-svn-id: trunk@19066 -
2011-09-14 13:38:46 +00:00