Commit Graph

136 Commits

Author SHA1 Message Date
peter
81b6d9f16c * replace strlenint with sizeint 2004-05-01 23:55:18 +00:00
peter
cafed35e77 * str() helpers now also use valint/valuint
* int64/qword helpers disabled for cpu64
2004-04-29 18:59:43 +00:00
peter
4238814518 * 1.0.x fix 2004-01-21 22:14:05 +00:00
peter
a4178230a7 * decrref does not reset always to nil, only when string is disposed.
the reset to nil for temps is done by the compiler
2004-01-21 22:02:18 +00:00
Jonas Maebe
4be7651aa2 * fixed conversion of fpc_*str_unique to compilerproc 2003-06-17 19:24:08 +00:00
Jonas Maebe
394b70f94d * fpc_{ansistr|widestr}_unique is now a function so it can be used as
compilerproc
2003-06-17 16:38:53 +00:00
florian
eab5d1f7c5 * started to make the rtl 64 bit save by introducing SizeInt and SizeUInt (similar to size_t of C) 2003-05-01 08:05:23 +00:00
Jonas Maebe
b5976b8730 * fixed setstring (+- like suggested by Dimitry Sibiryakov) 2003-02-26 19:16:55 +00:00
michael
a1ab52022b + Fixed range check error and others in Delete 2002-12-09 08:33:31 +00:00
carl
781415a0da - avoid warnings (add typecast) 2002-12-07 14:34:30 +00:00
Jonas Maebe
f5a775bc7c * fixed some buffer overflow errors in SetString (both short and
ansistring versions) (merged)
2002-10-21 19:52:47 +00:00
Jonas Maebe
275f02d058 * fixed ansistring append helpers so they preserve the terminating #0
* optimized SetLength() so that it uses reallocmem in case the refcount
    of the target string is 1
2002-10-20 12:59:21 +00:00
michael
aae8314d02 + Added check for nil buffer to setstring 2002-10-19 17:06:50 +00:00
florian
72ab5b62bb + ansistring_append* implemented 2002-10-17 12:43:00 +00:00
peter
603b3bc48b * Copy() changed to internal function calling compilerprocs
* FPC_SHORTSTR_COPY renamed to FPC_SHORTSTR_ASSIGN because of the
    new copy functions
2002-10-02 18:21:51 +00:00
carl
e1167f8d09 * Delphi compatibility fix (with string routines) 2002-09-14 11:20:50 +00:00
carl
7ebda0a778 * cardinal -> longword
- remove some unused routines
2002-09-07 21:10:47 +00:00
peter
01dfac4a4e * old logs removed and tabs fixed 2002-09-07 15:06:34 +00:00
peter
268e4bb7e7 * use saveregisters for incr routines, saves also problems with
the optimizer
2002-04-26 15:19:04 +00:00
peter
0cdf327866 * updated compilerprocs
* incr ref count has now a value argument instead of var
2002-04-25 20:14:56 +00:00
Jonas Maebe
a0731e0d02 * fixed bug in fpc_char_to_ansistr when converting #0 (found by Peter) 2002-01-07 13:23:53 +00:00
florian
67f6ce5348 * code of ansitr_concat improved 2001-11-17 23:58:12 +00:00
Jonas Maebe
41a57028b9 * converted adding/comparing of strings to compileproc. Note that due
to the way the shortstring helpers for i386 are written, they are
    still handled by the old code (reason: fpc_shortstr_compare returns
    results in the flags instead of in eax and fpc_shortstr_concat
    has wierd parameter conventions). The compilerproc stuff should work
    fine with the generic implementations though.
  * removed some nested comments warnings
2001-08-30 15:43:14 +00:00
Jonas Maebe
06f9cd4c96 * some fixes in compilerprocs for chararray to string conversions
* conversion from string to chararray is now also done via compilerprocs
2001-08-29 19:49:03 +00:00
Jonas Maebe
fc92c3b336 + compilerproc implementation of most string-related type conversions
- removed all code from the compiler which has been replaced by
    compilerproc implementations (using {$ifdef hascompilerproc} is not
    necessary in the compiler)
2001-08-28 13:24:46 +00:00
Jonas Maebe
4716f168dd * renamed some str(x,y) and val(x,y) helpers so the naming scheme is the
same for all string types
  + added the str(x,y) and val(x,y,z) helpers for int64/qword to
    compproc.inc
2001-08-13 12:40:16 +00:00
Jonas Maebe
b9f6efc85b + "compproc" helpers
* renamed several helpers so that their name is the same as their
    "public alias", which should facilitate the conversion of processor
    specific code in the code generator to processor independent code
  * some small fixes to the val_ansistring and val_widestring helpers
    (always immediately exit if the source string is longer than 255
     chars)
  * fixed fpc_dynarray_high and fpc_dynarray_length if the dynarray is
    still nil (used to crash, now return resp -1 and 0)
2001-08-01 15:00:09 +00:00
peter
5c0d161bef * merged textfile, readlink and concat ansistring fixes 2001-07-10 18:04:37 +00:00
peter
db87f86f00 * Length made internal
* Add array support for Length
2001-07-09 21:15:40 +00:00
florian
ea060c924d * another MT fix 2001-07-09 11:41:57 +00:00
peter
ca8d604964 * various widestring updates, it works now mostly without charset
mapping supported
2001-07-08 21:00:14 +00:00
Jonas Maebe
1251917e11 * removed DestSize parameter from declaration of ValAnsiSignedInt64
(merged)
2001-07-04 12:17:09 +00:00
florian
23b3c24a01 + made the ref. couting MT safe 2001-05-27 14:28:44 +00:00
peter
5dbe3bba52 * upcase, lowercase for ansistring 2001-04-13 18:06:07 +00:00
florian
5e9dbab759 * val for int64 hopefully works now correct 2000-12-10 15:00:14 +00:00
Jonas Maebe
4a7f3db6d9 + added pos(char,ansistring), because there is also a pos(char,shortstring)
and without the ansistring version, the shortstring version is always
    called when calling pos(char,pchar), even when using $h+ (because the
    first parameter matches exactly) (merged)
2000-12-08 14:04:43 +00:00
peter
94c1f86d79 * changed ver1_0 defines to temporary defs 2000-11-06 20:34:24 +00:00
florian
1a2851eb47 * a lot of small changes:
- setlength is internal
     - win32 graph unit extended
     ....
2000-10-21 18:20:17 +00:00
peter
a06bc54ee9 * fixed chararray to ansistring (merged) 2000-08-29 18:39:42 +00:00
Jonas Maebe
1a8c7b1d27 * fixed bug in setlength (it sometimes read after the end of the heap)
and small improvement to ansistring_to_chararray conversion (merged
    from fixes branch)
2000-08-24 07:37:21 +00:00
marco
e817560f04 * fixes for val(int64 or qword) to ansistring 2000-08-09 19:31:18 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
pierre
f3b853f096 * Change Code to var param in ValAnsiUnsignedInt function 2000-07-04 07:57:46 +00:00
peter
b4c4d9d1a3 * UniqueAnsiString -> UniqueString for Delphi compatibility 2000-06-11 07:02:30 +00:00
peter
bb008db4bc * use freemem without size 2000-05-18 17:04:48 +00:00
peter
6b66a55cd6 * truncated log 2000-02-09 16:59:28 +00:00
daniel
ec29a31834 * copyright 2000 2000-01-07 16:41:28 +00:00
daniel
a79b4a404b * copyright 2000 added 2000-01-07 16:32:21 +00:00
sg
87d0345efc * Fixed bug #722: If the start position of AnsiString Copy is less than 1,
it will be set to 1 (same behaviour as in Delphi)
1999-11-28 11:24:04 +00:00
michael
65cd1cdbc7 + Added Ansistring setstring call 1999-11-25 13:34:57 +00:00
peter
aa083c5b4d * truncated log 1999-11-06 14:35:38 +00:00
peter
4c3df986f0 * fixed copy where size+index could be < 0 1999-11-02 23:57:54 +00:00
florian
326e64a39c * StringOfChar fixed, how can be a bug in two lines of code ????? 1999-10-27 14:27:49 +00:00
florian
093ad73c78 + StringOfChar 1999-10-27 14:17:20 +00:00
peter
2aca3b7908 * pos function speed up by a factor 40 :) 1999-10-04 20:48:18 +00:00
peter
ebd738f2f5 * removed temp defines 1999-07-05 20:04:21 +00:00
peter
ec0a511cfa * merged 1999-06-14 00:43:35 +00:00
peter
e1b6682670 * small ansistring fixes
* val_ansistr_sint destsize changed to longint
  * don't write low/hi ascii with -al
1999-06-09 23:00:11 +00:00
michael
f627b90eaa Copy checks index now for negative values. 1999-06-05 20:48:56 +00:00
peter
157011cc0a * fixed decr_ansistr which didn't set s to nil 1999-05-31 20:37:39 +00:00
florian
85916705f2 * small fixes for the new ansistring temp. management 1999-05-17 22:41:24 +00:00
florian
e905aeea04 * most of the Object Pascal stuff moved to the system unit 1999-05-17 21:52:33 +00:00
peter
458a7be587 * generic write_float str_float 1999-05-06 09:05:11 +00:00
peter
de533ed2cc * fixed pchar 2 ansi 1999-04-22 10:51:17 +00:00
michael
77d45d20af + 1 byte too much allocated in new_ansiStringastrings.inc 1999-04-13 09:02:06 +00:00
michael
66bb181cf5 * More fixes and optimizing for ansistr_concat 1999-04-09 07:33:15 +00:00
peter
dda7bf2bc9 + subrange checking for readln() 1999-04-08 15:57:44 +00:00
peter
e3836e3e31 * fixed concat when s1 or s2 was nil 1999-04-08 10:19:55 +00:00
peter
29d632520b * fixed insert on last char
* saver chararray 2 ansi
1999-04-06 11:23:58 +00:00
michael
b149cc5681 * Fixed chararray to ansistring conversion 1999-04-06 10:06:51 +00:00
peter
8d5ffc3b09 * universal names for str/val (ansistr instead of stransi)
* '1.' support for val() this is compatible with tp7
1999-04-01 22:00:48 +00:00
Jonas Maebe
228829bd86 * changes for internal Val code (do a "make cycle OPT=-dvalintern" to test)
* in text.inc: changed RTE 106 when read integer values are out of bounds to RTE 201
  * in systemh.inc: disabled "support_fixed" for the i386 because it gave internal errors,
1999-03-16 17:49:36 +00:00
peter
80a48282e6 * function names cleanup
+ chararray -> ansistring
1999-03-02 18:24:51 +00:00
peter
af8a04a5af * use external names
* removed all direct assembler modes
1999-03-01 15:40:48 +00:00
michael
734889c0b6 * Fixed pos 1999-02-04 14:55:42 +00:00
florian
4d9e0a3b11 + routines for range checking added 1999-02-04 10:49:21 +00:00
peter
9f444c9461 * fixed ansi2short 1999-02-02 11:37:34 +00:00
michael
b2ac51a11b + Implemented more str() functions 1999-01-06 14:48:43 +00:00
peter
eb3e1984e6 * fixed str() and made it working 1999-01-06 13:03:39 +00:00
florian
8bf6ef4b56 * naming for str(...) routines inserted
* don't know what in int64 changed
1999-01-06 12:25:02 +00:00
peter
516958a67b * removed temp symbols 1998-12-15 22:42:49 +00:00
michael
7c71c739bc + Fixed pchar2ansi 1998-11-18 10:56:46 +00:00
michael
cc415c9cd4 + Fixed copy. Now reference count is correct 1998-11-17 12:16:07 +00:00
peter
c8d3ad6484 + several checks for empty string 1998-11-17 11:33:22 +00:00
michael
71482c66e4 + renamed from astrings.pp to astrings.inc 1998-11-17 10:34:18 +00:00