From a5f687d31492a07d0461db805e973d87d707b0ac Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 6 Apr 2000 08:27:33 +0000 Subject: [PATCH] + Initial revision of printer unit for win32, took that one of go32v2 --- rtl/win32/Makefile | 4 ++-- rtl/win32/Makefile.fpc | 2 +- rtl/win32/printer.pp | 46 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 rtl/win32/printer.pp diff --git a/rtl/win32/Makefile b/rtl/win32/Makefile index cbb9942a02..ac7d2ce9f9 100644 --- a/rtl/win32/Makefile +++ b/rtl/win32/Makefile @@ -1,5 +1,5 @@ # -# Makefile generated by fpcmake v0.99.13 [2000/03/22] +# Makefile generated by fpcmake v0.99.13 [2000/04/06] # defaultrule: all @@ -198,7 +198,7 @@ endif # Targets override LOADEROBJECTS+=wprt0 wdllprt0 -override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings windows ole2 opengl32 winsock initc dos crt objects graph sysutils typinfo math cpu mmx getopts heaptrc lineinfo wincrt winmouse sockets +override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings windows ole2 opengl32 winsock initc dos crt objects graph sysutils typinfo math cpu mmx getopts heaptrc lineinfo wincrt winmouse sockets printer # Clean diff --git a/rtl/win32/Makefile.fpc b/rtl/win32/Makefile.fpc index fdbeb0cfa9..62845253b2 100644 --- a/rtl/win32/Makefile.fpc +++ b/rtl/win32/Makefile.fpc @@ -9,7 +9,7 @@ units=$(SYSTEMUNIT) objpas strings \ dos crt objects graph \ sysutils typinfo math \ cpu mmx getopts heaptrc lineinfo \ - wincrt winmouse sockets + wincrt winmouse sockets printer [require] rtl=0 diff --git a/rtl/win32/printer.pp b/rtl/win32/printer.pp new file mode 100644 index 0000000000..add8667c79 --- /dev/null +++ b/rtl/win32/printer.pp @@ -0,0 +1,46 @@ +{ + $Id$ + This file is part of the Free Pascal run time library. + Copyright (c) 1999-2000 by Florian Klaempfl + member of the Free Pascal development team + + Printer unit for BP7 compatible RTL + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +unit printer; +interface + +var + lst : text; + +implementation + +var + old_exit : pointer; + +procedure printer_exit; +begin + close(lst); + exitproc:=old_exit; +end; + + +begin + assign(lst,'PRN'); + rewrite(lst); + old_exit:=exitproc; + exitproc:=@printer_exit; +end. +{ + $Log$ + Revision 1.1 2000-04-06 08:27:33 florian + + Initial revision of printer unit for win32, took that one of go32v2 + +}