Commit Graph

36 Commits

Author SHA1 Message Date
nickysn
800bb3adc2 * instead of using discardresult, wrap the uniquestring functions in procedures,
that are declared as inline

git-svn-id: trunk@49016 -
2021-03-19 21:13:20 +00:00
nickysn
a9f4c8a16b * compilation on Windows fixed
git-svn-id: trunk@48958 -
2021-03-14 02:53:41 +00:00
nickysn
df947d3ae8 * fixed rtl compilation with FPC 3.2.0 starting compiler
git-svn-id: branches/wasm@48305 -
2021-01-22 00:48:44 +00:00
nickysn
7e958e0a35 + introduced the discardresult directive and declared the UniqueString()
overloads, using this directive

git-svn-id: branches/wasm@48283 -
2021-01-21 21:42:07 +00:00
svenbarth
a2c9c75e97 Convert Insert() and Delete() to intrinsics in preparation for dynamic array support for these two procedures.
Since overloading compilerprocs does not work each procedure got its own unique name, but they are using the new compilerproc extension to map them to the Insert and Delete symbol so that error messages can be shown with the respective name for the procedure declarations instead of fpc_shortstr_delete for example.

git-svn-id: trunk@33895 -
2016-06-03 21:25:49 +00:00
michael
154b9bdd11 * Correct signature of pos
git-svn-id: trunk@31467 -
2015-08-31 19:34:15 +00:00
Jonas Maebe
ff583bde6c * made setstring() a compiler intrinsic so it can set the compile-time
code page of ansistrings (mantis #26735)

git-svn-id: trunk@28813 -
2014-10-12 20:27:06 +00:00
paul
932349020c rtl: deprecate winwidestringalloc
git-svn-id: trunk@26421 -
2014-01-11 14:16:49 +00:00
sergei
f07d02b427 - Removed string conversion helpers that are not actually used by compiler code generation (duplicated pwidechar/punicodechar stuff).
- Removed one copy of duplicated utf8 encode/decode procedures.

git-svn-id: trunk@20262 -
2012-02-05 18:01:04 +00:00
sergei
8d26b3358f RTL, wide/unicode strings cleanup:
- Removed outdated debugging code
- Removed DefaultWide2AnsiMove, using DefaultUnicode2AnsiMove instead.
- Removed unnecessary operations like SetLength before widestringmanager conversion calls and null-termination afterwards.
- Removed setting pointer to nil after fpc_wide/unicodestr_decr_ref.

git-svn-id: trunk@20231 -
2012-02-03 11:12:25 +00:00
sergei
7ff76caa73 * Removed 'inline' attribute from 6 overloaded pos() functions which contain a managed typecast. Inlining it leads to noticeable increase in code size without any sensible speed improvement.
* Added 'const' modifier to the first argument of these functions in order to avoid creating a local copy.

git-svn-id: trunk@20207 -
2012-02-01 13:34:36 +00:00
paul
631c545423 merge r19075 from cpstrnew branch by paul:
rtl: change UTF8Decode, UTF8Encode, AnsiToUTF8, UTF8ToAnsi to use RawByteString as arguments/result for compatibility with the old code and also with delphi

git-svn-id: trunk@19128 -
2011-09-17 14:30:17 +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
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
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
florian
86e3e79e67 + WC_NO_BEST_FIT_CHARS
* use WC_NO_BEST_FIT_CHARS when calling WideCharToMultiByte
* made tiwde6 more verbose

git-svn-id: trunk@9481 -
2007-12-16 13:45:09 +00:00
Jonas Maebe
0d8594a705 * made cwstring thread safe without locks + test (twide4): widestring
manager now has two extra parameterless procedures (ThreadInitProc
    and ThreadFiniProc) which are called whenever a thread begins/ends,
    and cwstring uses these to create separate iconv handles for
    each thread (via threadvars)
  * renamed UCS4 to UCS-4BE/LE, because UCS4 is not recognised by most
    systems
  * clean up all iconv handles on exit, and check whether they are
    valid before doing so

git-svn-id: trunk@7949 -
2007-07-04 18:10:34 +00:00
florian
f900d1ab5b * more consitent space and case usage
git-svn-id: trunk@3464 -
2006-05-09 20:37:22 +00:00
Jonas Maebe
b08eccdbf0 - reverted ansi2wide and wide2ansi changes, because they affect
third party sources too much

git-svn-id: trunk@2046 -
2005-12-24 01:40:23 +00:00
Jonas Maebe
9a08cdccf0 * several changes of var parameters into out parameters to avoid
useless warnings: code parameter of val(), destination of str(),
    destinations of ansi2wide and wide2ansi

git-svn-id: trunk@2041 -
2005-12-23 22:25:26 +00:00
Jonas Maebe
2dea0c793f * made the target parameter of SetString an "out" instead of "var" parameter
git-svn-id: trunk@1896 -
2005-12-07 16:06:34 +00:00
peter
cc38ec676e * add winwidestringalloc boolean, set it to false to use the fpc
heapmanager to allocate widestrings

git-svn-id: trunk@1306 -
2005-10-06 06:28:05 +00:00
florian
78f4cb86b0 * more widestring overloads for pos to avoid problems with selection of the correct one
git-svn-id: trunk@1177 -
2005-09-24 16:42:35 +00:00
florian
bb26084a0f + UCS4StringToWideString
+ WideStringToUCS4String
+ locale sensitive comparing of widestrings on unix

git-svn-id: trunk@1142 -
2005-09-19 19:13:03 +00:00
michael
db5d9d75aa + Removed INTERNCOPY define
git-svn-id: trunk@259 -
2005-06-07 21:11:49 +00:00
michael
a20556e62d + Removed INTERNLENGTH/INTERNSETLENGTH defines
git-svn-id: trunk@257 -
2005-06-07 21:07:21 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
9445db95f3 * widestring manager can handle now ansi<->wide string conversions even if the lens don't match 2005-03-14 21:09:04 +00:00
florian
0bfbd0a18e + added Ansi* routines to widestring manager
* made them using OS calls on windows
2005-03-12 14:56:22 +00:00
florian
7fa1ae2ea8 + WideSameStr 2005-02-26 15:00:14 +00:00
florian
eb4b962cee + implemented WideFormat
+ some Widestring stuff implemented
  * some Widestring stuff fixed
2005-02-26 10:21:17 +00:00
florian
3ed23de88e + StrCharLength infrastructure 2005-02-06 09:38:45 +00:00
florian
8f571abbb9 + infrastructure for WideCompareText implemented 2005-02-03 18:40:50 +00:00
florian
4f7560d89e * improved widestring infrastructure manager 2005-02-01 20:22:49 +00:00