Jonas Maebe
9d893195b5
* fixed potential buffer overflow in fpc_Write_Text_Char/
...
fpc_Write_Text_WideChar (bug 4919)
git-svn-id: trunk@3024 -
2006-03-24 21:08:51 +00:00
michael
155df8d326
+ StdIO flush now handled as all other files
...
git-svn-id: trunk@2971 -
2006-03-19 19:18:49 +00:00
peter
9566255122
* allow out file parameters
...
* assign has out file
git-svn-id: trunk@2717 -
2006-03-01 10:18:47 +00:00
Jonas Maebe
0e2a5dde24
* the pointer parameter of fpc_Read_Text_PChar_As_Pointer is not an
...
out parameter, but a const (the pointer is const and must be
valid already)
git-svn-id: trunk@2486 -
2006-02-08 20:32:32 +00:00
Jonas Maebe
a67f42a3e7
* also return 0 when reading an unsigned integer at the end of a file
...
git-svn-id: trunk@2156 -
2006-01-04 12:07:21 +00:00
Jonas Maebe
58381ff7b6
* made chararray handling 98% TP-compatible, fixes web bugs 3012
...
and 4080. The compatibility differences are:
a) writing a chararray which is zero-based but not zero-
terminated does not cause a buffer overflow
b) non-zero-based chararrays can also be read
The difference was that previously, all chararrays were treated
as pchars. In TP/Delphi (and now also in FPC), this is only done
for zero-based chararrays. For non-zero-based ones, the entire
contents of the array should always be used (including #0 's).
The default parameters in the system unit for the chararray
helpers are to avoid having to use a define for bootstrapping.
git-svn-id: trunk@2152 -
2006-01-04 10:05:10 +00:00
peter
198aa2e72a
* change value to const string to remvoe implicit exception stack:
...
git-svn-id: trunk@1949 -
2005-12-14 17:23:32 +00:00
florian
4a6939e354
* made generic basic file handling 64 bit
...
git-svn-id: trunk@1792 -
2005-11-20 12:23:54 +00:00
florian
0508459315
* From Jakob Klos:
...
* assign takes care of DefaultTextLineBreakStyle when determing the line ending style, fixes 4164
git-svn-id: trunk@610 -
2005-07-10 13:59:47 +00:00
michael
3a2eaa94b1
+ Removed INTERNCONSTINTF define
...
git-svn-id: trunk@267 -
2005-06-07 22:04:18 +00:00
michael
93ba0409be
+ Removed HASCOMPILERPROC define
...
git-svn-id: trunk@265 -
2005-06-07 21:41:02 +00:00
michael
8a226bba52
+ Removed HASWIDESTRING/HASWIDECHAR defines
...
git-svn-id: trunk@241 -
2005-06-07 20:42:22 +00:00
peter
4ace790492
* remove $Log
...
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
florian
f8c314a7b7
* changed fpc_read_text to use out instead of var
...
git-svn-id: trunk@73 -
2005-05-22 18:17:15 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
marco
9d33cf03b1
* Patch from maillist for read() on a file with only a few numerical digits
...
in them and no crlf
git-svn-id: trunk@15 -
2005-05-18 08:57:17 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
Tomas Hajny
d3c103dfd7
* EOF_CTRLZ conditional define replaced with CtrlZMarksEOF, #26 handling made more consistent (fix for bug #2453 )
2005-04-03 21:10:59 +00:00
peter
e417e34496
* truncate log
2005-02-14 17:13:06 +00:00
peter
14eb8f59b4
internconst, internproc and some external declarations moved to interface
2004-11-17 22:19:04 +00:00
peter
95e0ed26f8
* use helper call to retrieve address of input/output to reduce
...
code that is generated in the main program for loading the
threadvar
2004-11-09 23:10:22 +00:00
Tomas Hajny
85320d6787
* SetTextLineEnding implemented, FileRec.Name position alignment for CPU64
2004-09-21 23:36:51 +00:00
olle
268e5d32cc
* prefixed write[buffer|blanks] with fpc_ and made them externally visible
2004-08-20 10:04:39 +00:00
olle
0337fc7b32
+ handles mac line endings without blocking the console, on Mac OS only
2004-06-21 18:48:48 +00:00
peter
b5df63e617
* ValSInt fixed for 64 bit
2004-05-01 20:52:50 +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
041eb4aa1d
* do_read/do_write addr argument changed to pointer
2004-04-22 21:10:56 +00:00
peter
9a2f05820a
* fixed ignorespaces which was broken by the previous commit
...
when a line started with spaces
2002-11-29 16:26:52 +00:00
peter
bc3943ca4f
* fix for tw1896
2002-11-29 15:50:27 +00:00
peter
01dfac4a4e
* old logs removed and tabs fixed
2002-09-07 15:06:34 +00:00
peter
71a1ae2136
* sLineBreak changed to normal constant like Kylix
2002-07-01 16:29:05 +00:00
Jonas Maebe
d8a3bfb576
* fixed writing of empty ansistring with specified width (merged)
2001-11-21 14:51:33 +00:00
Jonas Maebe
c98f73e0d5
* fixed seekeof() so that it doesn't move the current possition in the
...
file anymore (merged)
* seekeof() now only regards #26 as EOF marker if EOF_CTRLZ is defined
(just like eof()) (merged)
* very tiny optimization to read_array_as_pchar
2001-09-25 16:34:59 +00:00
Jonas Maebe
a6cfe4083a
+ tempcreate/ref/delete nodes (allows the use of temps in the
...
resulttype and first pass)
* made handling of read(ln)/write(ln) processor independent
* moved processor independent handling for str and reset/rewrite-typed
from firstpass to resulttype pass
* changed names of helpers in text.inc to be generic for use as
compilerprocs + added "iocheck" directive for most of them
* reading of ordinals is done by procedures instead of functions
because otherwise FPC_IOCHECK overwrote the result before it could
be stored elsewhere (range checking still works)
* compilerprocs can now be used in the system unit before they are
implemented
* added note to errore.msg that booleans can't be read using read/readln
2001-08-23 14:28:35 +00:00
peter
b34e51e7f6
* regenerated
2001-08-22 20:49:14 +00:00
peter
0b4ee7574f
* read_array fix merged
2001-08-19 11:23:10 +00:00
Jonas Maebe
9ab14207f7
* really fixed write_array this time :/ (merged)
2001-07-21 15:53:28 +00:00
Jonas Maebe
0ea2e80af9
* correctly fixed potential buffer overrun in write_array
2001-07-16 13:53:21 +00:00
peter
ca8d604964
* various widestring updates, it works now mostly without charset
...
mapping supported
2001-07-08 21:00:14 +00:00
peter
49481a0c63
* v10 merges
2001-06-27 21:37:36 +00:00
peter
741d455ab7
* Formal const to var fixes
...
* Hexstr(int64) added
2001-06-04 11:43:51 +00:00
Jonas Maebe
faad9460c8
* fixed potential buffer overflow in FPC_WRITE_TEXT_PCHAR_AS_ARRAY (merged)
2001-04-08 13:21:30 +00:00
florian
1f91d1d88e
+ sLineBreak and misc. stuff for Kylix compatiblity
2001-03-21 23:29:40 +00:00
Jonas Maebe
de0a78a66e
* fix for web bug #1210 from Peter (merged)
2000-11-23 13:14:02 +00:00
michael
586c4cea50
+ Conditionals fixed
2000-07-14 10:33:09 +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
Jonas Maebe
17c623dc25
* changed a lot of "if fm.mode = fmClosed then" to case statements,
...
because if f is not yet initialized, the mode is invalid and can
contain another value even though the file is closed
+ check if a file is open in writeln_end (caused crash if used on
not opened files)
2000-03-24 10:26:18 +00:00
peter
9920510f64
* length check for readnumeric
2000-03-19 08:36:41 +00:00
Jonas Maebe
49b6de7c9e
* fixed declaration of val_int64 (removed destsize parameter)
...
* fixed val_int64 and val_qword so they reject invalid input
(u >= base)
* when reading a number, invalid input is removed from the input
buffer (+ it should be faster as well)
2000-03-17 21:27:56 +00:00
peter
6b66a55cd6
* truncated log
2000-02-09 16:59:28 +00:00
Jonas Maebe
e534908b2f
* committed the rest of my fix :)
2000-01-31 12:11:53 +00:00
pierre
38fb93fcfc
* Jonas' fix for bug811
2000-01-31 10:15:43 +00:00
florian
0a05c8d0e0
* reading of 64 bit type implemented
2000-01-23 12:22:37 +00:00
florian
7451fd5ab4
* writing of int64/qword fixed
2000-01-20 20:19:37 +00:00
Jonas Maebe
1c7978a96b
+ Mac linebreak ( #13 ) support for readln
2000-01-08 17:08:36 +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
peter
42516d7f5e
* read_int64 dummy added
1999-12-02 17:40:06 +00:00
peter
aa083c5b4d
* truncated log
1999-11-06 14:35:38 +00:00
peter
1a27ce8a2d
* inoutres 103 for closed files, just like delphi
1999-10-26 12:25:19 +00:00
peter
60854f1f6c
* read ansistring speedup (no length(s) calls anymore)
1999-10-04 20:42:45 +00:00
peter
62de5cdb72
* remove CR when reading one char less then size
1999-09-10 17:14:43 +00:00
peter
3b5373c08a
* fixed do_open flags to be > $100, becuase filemode can be upto 255
1999-09-10 15:40:32 +00:00
peter
c3a8983799
* fixed inoutres for diskfull
1999-09-08 16:12:24 +00:00
peter
1006d29317
* fixed array of char writing which didn't write the last char
1999-09-07 07:44:58 +00:00
peter
4557f11bac
* settextbuf size is now longint
1999-08-19 11:16:13 +00:00
peter
a4b08bdef9
* small speed improvements
1999-08-03 21:58:44 +00:00
florian
b7a267613b
+ write helper routine for in64 implemented
1999-07-26 09:43:24 +00:00
michael
d753055cfe
* Now ansistring of arbitrary length can be read
1999-07-08 15:18:14 +00:00
peter
ebd738f2f5
* removed temp defines
1999-07-05 20:04:21 +00:00
florian
404cffaad4
+ qword/int64 type released
1999-07-01 15:39:50 +00:00
florian
aaef13ac01
+ fpuint64 to system unit interface added: if it is true, the rtl
...
uses the fpu to do int64 operations, if possible
1999-06-30 22:17:22 +00:00
peter
458a7be587
* generic write_float str_float
1999-05-06 09:05:11 +00:00
peter
6da9dfae21
* fixed write array
...
* read array with maxlen
1999-04-26 18:27:26 +00:00
peter
dda7bf2bc9
+ subrange checking for readln()
1999-04-08 15:57:44 +00:00
peter
d028279366
* fixed bug with readln where it sometime didn't read until eol
1999-04-07 22:05:18 +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
554f02687b
* changed so handlerror() -> inoutres:= to have $I- support
1999-03-02 18:23:37 +00:00
peter
af8a04a5af
* use external names
...
* removed all direct assembler modes
1999-03-01 15:40:48 +00:00
peter
a868c2a6cc
* when error when opening a file, then reset the mode to fmclosed
1999-02-17 10:13:29 +00:00
peter
96ac1855a8
* fixed readln(ansistring)
1999-01-28 19:38:19 +00:00
peter
516958a67b
* removed temp symbols
1998-12-15 22:42:49 +00:00
peter
39c8939bcc
* fixed read(char) with empty buffer
1998-12-11 18:07:39 +00:00
peter
a41f61713d
+ open strings, $P switch support
1998-11-27 14:50:30 +00:00
peter
a990cb8ab6
* fixes for 0.99.8
1998-11-16 12:21:47 +00:00
peter
525f478bae
* write(pchar) has check for nil
1998-10-23 00:03:29 +00:00
peter
0a51bba5f7
* fixed maxlen which was not correct after my read_string update
1998-10-20 14:37:45 +00:00
peter
af1ccc6f61
+ read single,fixed
...
+ val with code:longint
+ val for fixed
1998-10-10 15:28:46 +00:00
michael
c04585305f
+ Ansistring write now gets pointer.
1998-09-29 08:39:07 +00:00
michael
7b7582c54b
+ AnsiStrings update
1998-09-28 14:27:08 +00:00
peter
d97b8fa00f
* fixed small bug with a #13#10 on a line
1998-09-24 23:32:24 +00:00
peter
5ae64603db
* fixed a bug introduced by my previous update
1998-09-18 12:23:22 +00:00
peter
1e3a448793
* new eof,eoln,seekeoln,seekeof
...
* speed upgrade for read_string
* inoutres 104/105 updates for read_* and write_*
1998-09-17 16:34:16 +00:00
peter
4620a73a9b
* FPC_ names
...
* Heap manager is now system independent
1998-09-14 10:48:00 +00:00
peter
cbe7d4629c
+ textrecbufsize
1998-09-08 10:14:06 +00:00
peter
23225bea44
* reset bufpos,bufend in opentext like tp7
1998-08-26 15:33:28 +00:00
pierre
2fefd65557
* close did not reset the bufpos and bufend fields
...
led to problems when using the same file several times
1998-08-26 11:23:25 +00:00
michael
8a66987b6c
+ Flush on close only for output files cd ../inc
1998-08-17 22:42:17 +00:00
peter
bd57e42086
* $ifdef ver0_99_5 updates
1998-08-11 00:04:46 +00:00