Commit Graph

125 Commits

Author SHA1 Message Date
yury
a95e47507b * Replaced lot of duplicate code in fpc_Read_xxx procedures by call to internal CheckRead function.
git-svn-id: trunk@5877 -
2007-01-11 01:25:14 +00:00
yury
71961bb8ce * Implemented fpc_Write_Text_Currency and fpc_Read_Text_Currency.
git-svn-id: trunk@5874 -
2007-01-10 22:07:42 +00:00
florian
6f968732c0 * don't call the system if flush hasn't to flush anything
git-svn-id: trunk@4829 -
2006-10-08 14:21:00 +00:00
Jonas Maebe
b386335f27 * treat zero-based arrays of char also as pchar's when reading
(i.e., always zero-terminate) (bug 7567)

git-svn-id: trunk@4826 -
2006-10-08 09:22:30 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
daniel
35bc0b8160 * Fix missing ctrlZmarkseof check.
git-svn-id: trunk@3910 -
2006-06-21 14:39:44 +00:00
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