From f7738c12f1bcd8ffcfe372e927b32dcb3814f0bb Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 4 Nov 2004 20:57:58 +0000 Subject: [PATCH] sysmsgs is always available --- fv/Makefile | 47 +++++++++++++---------------------------------- fv/Makefile.fpc | 11 ++--------- fv/app.pas | 9 ++++----- fv/drivers.pas | 17 ++++------------- fv/platform.inc | 11 ++++------- fv/sysmsg.pas | 34 ++++++++++++++++++++++------------ ide/fpide.pas | 11 +++++------ 7 files changed, 54 insertions(+), 86 deletions(-) diff --git a/fv/Makefile b/fv/Makefile index 261e35d10d..edf0fb836d 100644 --- a/fv/Makefile +++ b/fv/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2004/10/30] +# Don't edit, this file is generated by FPCMake Version 1.1 [2004/11/03] # default: all MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc @@ -222,28 +222,7 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext override PACKAGE_NAME=fv override PACKAGE_VERSION=1.9.4 override TARGET_UNITS+=buildfv -ifeq ($(OS_TARGET),linux) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),go32v2) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),win32) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),freebsd) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),netbsd) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),openbsd) -override TARGET_UNITS+=sysmsg -endif -ifeq ($(OS_TARGET),darwin) -override TARGET_UNITS+=sysmsg -endif -override TARGET_IMPLICITUNITS+=app callspec colortxt dialogs drivers editors fileio fvcommon fvconsts gadgets histlist inplong memory menus msgbox resource statuses stddlg tabs time validate views gfvgraph +override TARGET_IMPLICITUNITS+=app colortxt dialogs drivers editors fvcommon fvconsts gadgets histlist inplong memory menus msgbox resource statuses stddlg tabs time validate views sysmsg override TARGET_EXAMPLEDIRS+=test override INSTALL_BUILDUNIT=buildfv override INSTALL_FPCPACKAGE=y @@ -745,7 +724,7 @@ ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(ECHO),) ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(ECHO),) -ECHO= __missing_command__ +ECHO= __missing_command_ECHO else ECHO:=$(firstword $(ECHO)) endif @@ -759,7 +738,7 @@ DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(DATE),) DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(DATE),) -DATE= __missing_command__ +DATE= __missing_command_DATE else DATE:=$(firstword $(DATE)) endif @@ -773,7 +752,7 @@ GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(GINSTALL),) GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(GINSTALL),) -GINSTALL= __missing_command__ +GINSTALL= __missing_command_GINSTALL else GINSTALL:=$(firstword $(GINSTALL)) endif @@ -785,7 +764,7 @@ export GINSTALL ifndef CPPROG CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(CPPROG),) -CPPROG= __missing_command__ +CPPROG= __missing_command_CPPROG else CPPROG:=$(firstword $(CPPROG)) endif @@ -794,7 +773,7 @@ export CPPROG ifndef RMPROG RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(RMPROG),) -RMPROG= __missing_command__ +RMPROG= __missing_command_RMPROG else RMPROG:=$(firstword $(RMPROG)) endif @@ -803,7 +782,7 @@ export RMPROG ifndef MVPROG MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(MVPROG),) -MVPROG= __missing_command__ +MVPROG= __missing_command_MVPROG else MVPROG:=$(firstword $(MVPROG)) endif @@ -814,7 +793,7 @@ MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(MKDIRPROG),) MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command__ +MKDIRPROG= __missing_command_MKDIRPROG else MKDIRPROG:=$(firstword $(MKDIRPROG)) endif @@ -869,7 +848,7 @@ export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR ifndef PPUMOVE PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command__ +PPUMOVE= __missing_command_PPUMOVE else PPUMOVE:=$(firstword $(PPUMOVE)) endif @@ -878,7 +857,7 @@ export PPUMOVE ifndef FPCMAKE FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command__ +FPCMAKE= __missing_command_FPCMAKE else FPCMAKE:=$(firstword $(FPCMAKE)) endif @@ -887,7 +866,7 @@ export FPCMAKE ifndef ZIPPROG ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command__ +ZIPPROG= __missing_command_ZIPPROG else ZIPPROG:=$(firstword $(ZIPPROG)) endif @@ -896,7 +875,7 @@ export ZIPPROG ifndef TARPROG TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(TARPROG),) -TARPROG= __missing_command__ +TARPROG= __missing_command_TARPROG else TARPROG:=$(firstword $(TARPROG)) endif diff --git a/fv/Makefile.fpc b/fv/Makefile.fpc index 1a1ab06e72..d495aaafb8 100644 --- a/fv/Makefile.fpc +++ b/fv/Makefile.fpc @@ -8,17 +8,10 @@ version=1.9.4 [target] units=buildfv -implicitunits=app callspec colortxt dialogs drivers editors fileio \ +implicitunits=app colortxt dialogs drivers editors \ fvcommon fvconsts gadgets histlist inplong memory \ menus msgbox resource statuses stddlg tabs time validate \ - views gfvgraph -units_go32v2=sysmsg -units_win32=sysmsg -units_linux=sysmsg -units_freebsd=sysmsg -units_netbsd=sysmsg -units_openbsd=sysmsg -units_darwin=sysmsg + views sysmsg exampledirs=test [libs] diff --git a/fv/app.pas b/fv/app.pas index ae89b56f02..b0076a67d7 100644 --- a/fv/app.pas +++ b/fv/app.pas @@ -927,15 +927,11 @@ BEGIN If (Event.What = evNothing) Then Begin { No mouse event } Drivers.GetMouseEvent(Event); { Load mouse event } If (Event.What = evNothing) Then -{$ifdef HasSysMsgUnit} begin Drivers.GetSystemEvent(Event); { Load system event } If (Event.What = evNothing) Then -{$endif HasSysMsgUnit} Idle; { Idle if no event } -{$ifdef HasSysMsgUnit} end; -{$endif HasSysMsgUnit} End; End; End; @@ -1162,7 +1158,10 @@ END; END. { $Log$ - Revision 1.23 2004-11-03 20:33:05 peter + Revision 1.24 2004-11-04 20:57:58 peter + sysmsgs is always available + + Revision 1.23 2004/11/03 20:33:05 peter * removed unnecesasry graphfv stuff Revision 1.22 2002/09/22 19:42:52 hajny diff --git a/fv/drivers.pas b/fv/drivers.pas index 5873c6e026..0578d8256a 100644 --- a/fv/drivers.pas +++ b/fv/drivers.pas @@ -84,9 +84,7 @@ USES {$ENDIF} video, -{$ifdef HasSysMsgUnit} SysMsg, -{$endif HasSysMsgUnit} FVCommon, Objects; { GFV standard units } {***************************************************************************} @@ -423,14 +421,12 @@ and the button and double click variables are set appropriately. ---------------------------------------------------------------------} PROCEDURE GetMouseEvent (Var Event: TEvent); -{$ifdef HasSysMsgUnit} {-GetSystemEvent------------------------------------------------------ Checks whether a system event is available. If a system event has occurred, Event.What is set to evCommand appropriately 10Oct2000 PM ---------------------------------------------------------------------} procedure GetSystemEvent (Var Event: TEvent); -{$endif HasSysMsgUnit} {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} { EVENT HANDLER CONTROL ROUTINES } @@ -1099,7 +1095,6 @@ begin FillChar(Event,sizeof(TEvent),0); end; -{$ifdef HasSysMsgUnit} {---------------------------------------------------------------------------} { GetSystemEvent } {---------------------------------------------------------------------------} @@ -1142,7 +1137,6 @@ begin else Event.What:=evNothing; end; -{$endif HasSysMsgUnit} {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} @@ -1170,9 +1164,7 @@ BEGIN LastWhereY:=MouseWhere.y; MouseEvents := True; { Set initialized flag } end; -{$ifdef HasSysMsgUnit} InitSystemMsg; -{$endif HasSysMsgUnit} END; {---------------------------------------------------------------------------} @@ -1180,9 +1172,7 @@ END; {---------------------------------------------------------------------------} PROCEDURE DoneEvents; BEGIN -{$ifdef HasSysMsgUnit} DoneSystemMsg; -{$endif HasSysMsgUnit} Mouse.DoneMouse; MouseEvents:=false; END; @@ -1441,9 +1431,7 @@ BEGIN ButtonCount := DetectMouse; { Detect mouse } DetectVideo; { Detect video } InitKeyboard; -{$ifdef HasSysMsgUnit} InitSystemMsg; -{$endif HasSysMsgUnit} {$ifdef win32} SetFileApisToOEM; SetConsoleCP(437); @@ -1455,7 +1443,10 @@ BEGIN END. { $Log$ - Revision 1.41 2004-11-03 20:51:36 florian + Revision 1.42 2004-11-04 20:57:58 peter + sysmsgs is always available + + Revision 1.41 2004/11/03 20:51:36 florian * fixed problems on targets requiring proper alignment Revision 1.40 2004/11/03 20:33:05 peter diff --git a/fv/platform.inc b/fv/platform.inc index 4ef5e8cccb..15a8be6356 100644 --- a/fv/platform.inc +++ b/fv/platform.inc @@ -177,21 +177,18 @@ FOR FPC THESE ARE THE TRANSLATIONS {$UNDEF OS_DOS} {$DEFINE OS_LINUX} {$DEFINE OS_UNIX} - {$DEFINE HasSysMsgUnit} {$ENDIF} {$IFDEF FreeBSD} {$UNDEF OS_DOS} {$DEFINE OS_FREEBSD} {$DEFINE OS_UNIX} - {$DEFINE HasSysMsgUnit} {$ENDIF} {$IFDEF NETBSD} {$UNDEF OS_DOS} {$DEFINE OS_NETBSD} {$DEFINE OS_UNIX} - {$DEFINE HasSysMsgUnit} {$ENDIF} @@ -199,7 +196,6 @@ FOR FPC THESE ARE THE TRANSLATIONS {$UNDEF OS_DOS} {$DEFINE OS_DARWIN} {$DEFINE OS_UNIX} - {$DEFINE HasSysMsgUnit} {$ENDIF} {---------------------------------------------------------------------------} @@ -207,7 +203,6 @@ FOR FPC THESE ARE THE TRANSLATIONS {---------------------------------------------------------------------------} {$IFDEF GO32V2} {$DEFINE OS_GO32} - {$DEFINE HasSysMsgUnit} {$ENDIF} {---------------------------------------------------------------------------} @@ -219,7 +214,6 @@ FOR FPC THESE ARE THE TRANSLATIONS {$ENDIF} {$UNDEF BIT_16} {$DEFINE BIT_32} - {$DEFINE HasSysMsgUnit} {$ENDIF} {---------------------------------------------------------------------------} @@ -392,7 +386,10 @@ FOR FPC THESE ARE THE TRANSLATIONS { $Log$ - Revision 1.12 2004-11-03 20:33:05 peter + Revision 1.13 2004-11-04 20:57:58 peter + sysmsgs is always available + + Revision 1.12 2004/11/03 20:33:05 peter * removed unnecesasry graphfv stuff Revision 1.11 2004/02/06 20:59:29 jonas diff --git a/fv/sysmsg.pas b/fv/sysmsg.pas index 2c004cc002..4fe8cbc2fd 100644 --- a/fv/sysmsg.pas +++ b/fv/sysmsg.pas @@ -84,7 +84,22 @@ implementation {$define HAS_SYSMSG} {$endif unix} -{$ifndef HAS_SYSMSG} +{$ifdef HAS_SYSMSG} + +procedure PutSystemEvent(const SystemEvent: TSystemEvent); +begin + if PendingSystemEvents evNothing) Then - Begin - HandleEvent(Event); - End; -{$endif HasSysMsgUnit} + HandleEvent(Event); {$endif FVISION} inherited GetEvent(Event); @@ -1252,7 +1248,10 @@ end; END. { $Log$ - Revision 1.27 2004-11-02 23:53:19 peter + Revision 1.28 2004-11-04 20:57:59 peter + sysmsgs is always available + + Revision 1.27 2004/11/02 23:53:19 peter * fixed crashes with ide and 1.9.x Revision 1.26 2003/09/29 14:36:59 peter