diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-24 01:12:50 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-24 01:12:50 +0200 |
commit | ff350d99fff38a3f1f2bfe3a230448cc991d4ac6 (patch) | |
tree | 88c6f45a9a3e651f99b2db09752fa7ed668f13a8 /src/docdump/filestreamhelper.pas | |
parent | 1b0638852d202a17b264b02911341d44a0a81cc2 (diff) | |
download | fpGUI-ff350d99fff38a3f1f2bfe3a230448cc991d4ac6.tar.xz |
New debug project: docdump which dumps the file structure of INF files
out to a more human readable form. Hopefully this will help me debug
and reading problems in docview. And also help with implementation
of a custom ipfc compiler (one day).
Signed-off-by: Graeme Geldenhuys <graemeg@gmail.com>
Diffstat (limited to 'src/docdump/filestreamhelper.pas')
-rw-r--r-- | src/docdump/filestreamhelper.pas | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/docdump/filestreamhelper.pas b/src/docdump/filestreamhelper.pas new file mode 100644 index 00000000..ff831a91 --- /dev/null +++ b/src/docdump/filestreamhelper.pas @@ -0,0 +1,35 @@ +unit filestreamhelper; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils; + +type + TFileTextStream = class(TFileStream) + public + procedure WriteLn(const fmt: String; const args: array of const); + procedure WriteLn(const s: String); + end; + +implementation + +{ TFileTextStream } + +procedure TFileTextStream.WriteLn(const fmt: String; const args: array of const); +var + temp: String; +begin + temp := Format(fmt, args) + LineEnding; + Write(temp[1], Length(temp)); +end; + +procedure TFileTextStream.WriteLn(const s: String); +begin + self.WriteLn('%s', [s]); +end; + +end. + |