Commit Graph

45 Commits

Author SHA1 Message Date
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
paul
812a665cbe rtl: don't crash if resource is not found in TResourceStream and was passed by ID instead of Name (in this case exception tried to get a string from ID)
git-svn-id: trunk@17173 -
2011-03-24 03:44:26 +00:00
marco
32a7502f38 * Change TProxyStream.seek to 64-bit variant.
git-svn-id: trunk@17093 -
2011-03-08 15:13:53 +00:00
sergei
41aeb9a22b * Rework TStream.CopyFrom (see Mantis #17980):
a) Use significantly larger buffer (128k instead of 1k)
b) When Count=0, do not try to determine the source size. Just copy until the source can be read. This should improve performance with limited seek capability sources (e.g. a decompression stream will be decompressed once rather than twice).
c) Use ReadBuffer/WriteBuffer, so an exception is raised when something goes wrong. This conforms to Delphi behavior.

git-svn-id: trunk@16992 -
2011-02-24 03:25:40 +00:00
sergei
907e7a32d5 * GetFileHandle(), THandleStream: changed type that is used to store file handle from Integer to THandle, so it can be redefined to 64 bits on certain platforms, see http://lists.freepascal.org/lists/fpc-devel/2010-November/023019.html
git-svn-id: trunk@16383 -
2010-11-20 12:58:53 +00:00
paul
a1d94c6829 rtl: implement TStreamAdapter.CopyTo, .SetSize, return proper error value for Clone instead of raising exception (#0016161) + test
git-svn-id: trunk@15138 -
2010-04-11 12:52:31 +00:00
paul
17687d90ce rtl: minor changes for TStreamAdapter:
- return STG_E_INVALIDPOINTER instead of E_INVLIDARG for Read,Write as msdn requires
  - return STG_E_INVALIDFUNCTION instead of E_INVLIDARG for Seek as msdn requires

git-svn-id: trunk@15127 -
2010-04-10 17:50:29 +00:00
florian
42ae8bf971 * fixed memory stream compilation on 64 bit targets
git-svn-id: trunk@14523 -
2010-01-02 16:05:57 +00:00
florian
b5167560c3 * T*MemoryStream now uses PtrInt for sizes and positions so it can be bigger than 2 GB on 64 Bit systems, resolves #15313
git-svn-id: trunk@14513 -
2010-01-01 21:05:18 +00:00
marco
27114853b4 * TStream.Read/writeqword. Mantis 15023
git-svn-id: trunk@14111 -
2009-11-08 11:47:50 +00:00
marco
6ed7d33569 * patch from 15003 from M spiller, reverting now implemented.
git-svn-id: trunk@14078 -
2009-11-06 10:52:23 +00:00
marco
09b22de964 * TStreamAdapter + relevant constants. From 10608
git-svn-id: trunk@13988 -
2009-10-31 20:13:41 +00:00
marco
b5e361a4cb * TOleStream + TProxystream (Mantis 8376)
git-svn-id: trunk@13984 -
2009-10-30 18:27:26 +00:00
marco
1e7ee7aef4 * Patch from Paul Ishenin, load stringlists with fmdenywrite. (improves sharing behaviour)
git-svn-id: trunk@13803 -
2009-10-04 13:36:43 +00:00
Jonas Maebe
6f4637b32a * do not do anything when writing to a t(custom)memorystream if the current
position is negative (patch by Collin Western, mantis #13318)

git-svn-id: trunk@12955 -
2009-03-22 15:53:16 +00:00
marco
66676be8e5 * pbyte killed, it is in systems nowadays
git-svn-id: trunk@10096 -
2008-01-29 19:35:01 +00:00
michael
b244f6eb71 * Patch from Sergei Gorelkin, making TStream.Read and .Write virtual
git-svn-id: trunk@9572 -
2007-12-29 19:03:56 +00:00
michael
429fd4f685 * Patch from Giulio Bernardi to use NtoLE instead of swapendian
git-svn-id: trunk@9438 -
2007-12-13 09:59:19 +00:00
michael
b363afcd0a * Patch from Giulio Bernardi
* ObjectBinaryToText, ObjectTextToBinary and ObjectTextToResource are
    endian safe and writing and reading extended type is supported on
    machines that don't have an extended type
 - TStream.WriteResourceHeader, TStream.ReadResHeader,
   TStream.FixupResourceHeader are endian safe

git-svn-id: trunk@9397 -
2007-12-05 20:50:26 +00:00
yury
0a3591a2a5 * Fixed warnings and notes.
git-svn-id: trunk@9046 -
2007-11-01 15:55:54 +00:00
florian
0caa70a8b3 + basic TStreamAdapter implementation
git-svn-id: trunk@7815 -
2007-06-25 21:05:08 +00:00
michael
2eda10c74c * Patch from Vincent Snijders to grow memory stream by a quarter of its size
git-svn-id: trunk@5581 -
2006-12-13 19:17:39 +00:00
yury
82b74ffc64 * fixed warning and note while compiling RTL.
git-svn-id: trunk@4265 -
2006-07-20 12:31:58 +00:00
Jonas Maebe
9e801eb048 * removed/conditionalised several unused variables
git-svn-id: trunk@4199 -
2006-07-14 20:44:57 +00:00
yury
53ef335edd * TFileStream.Create did not raise exceptions if error occured.
git-svn-id: trunk@4107 -
2006-07-06 19:00:40 +00:00
michael
dc0e8428a6 + Fixed rights parameter in TFileStream.Create and FileCreate
git-svn-id: trunk@3862 -
2006-06-13 22:01:49 +00:00
oro06
42bd89095f *fix fileopen (please OS2,EMX maintainers have a look)
git-svn-id: trunk@3858 -
2006-06-13 08:15:35 +00:00
Vincent Snijders
353f623f1f removed seek64bit define
git-svn-id: trunk@1704 -
2005-11-09 13:26:22 +00:00
oro06
84cd7d6706 * fixed stream resource unicode issue
git-svn-id: trunk@1160 -
2005-09-23 10:02:01 +00:00
florian
95b995fe27 * fixed resource streams for 64 bit systems
git-svn-id: trunk@1158 -
2005-09-23 09:56:14 +00:00
florian
527a01bc9d + TResourceStream implemented
git-svn-id: trunk@1143 -
2005-09-19 20:15:25 +00:00
Vincent Snijders
a879211175 fixed setting memstream capacity to 0
git-svn-id: trunk@590 -
2005-07-05 21:54:32 +00:00
peter
73e0105080 * use Reallocmem in TStream.Realloc
* prevent setting the capacity < 0, which will give an RTE when
    passed to the heap manager

git-svn-id: trunk@566 -
2005-07-03 13:20:06 +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
peter
7867c168b8 * add const to 64bit seeks 2005-03-25 20:07:43 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
be53661900 * 1.0.x fix 2005-01-20 16:37:57 +00:00
michael
ec7c4a2ff4 + CustomMemoryStream.getsize overridden 2005-01-19 19:57:57 +00:00
michael
2992a0ed48 * Patch from Peter to fix 64bit issue in tstream.seek() 2005-01-19 09:09:50 +00:00
michael
753460a415 + Patch from Mattias Gaertner to fix CopyFrom 2005-01-18 22:31:44 +00:00
michael
55e42ab72f + Added TOwnerStream 2005-01-09 13:15:37 +00:00
peter
9d55df2bd5 * merged copyfrom with 0 2003-10-30 16:30:53 +00:00
peter
3d27318cb2 * moved classes unit to rtl 2003-10-06 21:01:06 +00:00