Browse Source

--- Merging r25677 into '.':
U packages/graph/src/go32v2/vesa.inc
C packages/graph/src/msdos
--- Merging r25681 into '.':
G packages/graph/src/go32v2/vesa.inc
--- Merging r25722 into '.':
U packages/graph/src/go32v2/graph.pp
--- Merging r25779 into '.':
U packages/ptc/docs/CHANGES.txt
A packages/graph/src/ptcgraph/ptcmouse.pp
U packages/graph/fpmake.pp
Summary of conflicts:
Tree conflicts: 1

# revisions: 25677,25681,25722,25779
r25677 | nickysn | 2013-10-06 11:42:29 +0200 (Sun, 06 Oct 2013) | 4 lines
Changed paths:
M /trunk/packages/graph/src/go32v2/vesa.inc
M /trunk/packages/graph/src/msdos/vesa.inc

- rm the hexstr function from the graph unit, as that has already been included
in the system unit
r25681 | nickysn | 2013-10-06 13:36:32 +0200 (Sun, 06 Oct 2013) | 6 lines
Changed paths:
M /trunk/packages/graph/src/go32v2/vesa.inc

- rm the first call to int 10, ax=4f04, dl=0 from SaveStateVESA, since this function is
called again immediately after the inline asm block via RealIntr and the exact same
operations are performed once again in Pascal (probably someone translated the inline
asm block to pascal, but forgot to remove it).
r25722 | nickysn | 2013-10-08 16:45:56 +0200 (Tue, 08 Oct 2013) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ use PatternLineVESA256 also for the 640x400 256-colour VESA mode
r25779 | nickysn | 2013-10-14 16:31:14 +0200 (Mon, 14 Oct 2013) | 1 line
Changed paths:
M /trunk/packages/graph/fpmake.pp
A /trunk/packages/graph/src/ptcgraph/ptcmouse.pp
M /trunk/packages/ptc/docs/CHANGES.txt

+ added unit ptcmouse, similar to winmouse and msmouse, for use with ptcgraph and ptccrt

git-svn-id: branches/fixes_2_6@25925 -

marco 11 years ago
parent
commit
47f0518f56

+ 1 - 0
.gitattributes

@@ -3064,6 +3064,7 @@ packages/graph/src/inc/palette.inc svneol=native#text/plain
 packages/graph/src/macosx/graph.pp svneol=native#text/plain
 packages/graph/src/ptcgraph/ptccrt.pp svneol=native#text/plain
 packages/graph/src/ptcgraph/ptcgraph.pp svneol=native#text/x-pascal
+packages/graph/src/ptcgraph/ptcmouse.pp svneol=native#text/plain
 packages/graph/src/sdlgraph/sdlgraph.pp svneol=native#text/plain
 packages/graph/src/unix/ggigraph.pp svneol=native#text/plain
 packages/graph/src/unix/graph.pp svneol=native#text/plain

+ 22 - 214
packages/graph/Makefile

@@ -1,11 +1,11 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013-06-17 rev 24913]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013/10/30]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux jvm-java jvm-android i8086-msdos
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 BSDs = freebsd netbsd openbsd darwin
-UNIXs = linux $(BSDs) solaris qnx haiku aix
-LIMIT83fs = go32v2 os2 emx watcom msdos
+UNIXs = linux $(BSDs) solaris qnx haiku
+LIMIT83fs = go32v2 os2 emx watcom
 OSNeedsComspecToRunBatch = go32v2 watcom
 FORCE:
 .PHONY: FORCE
@@ -178,12 +178,6 @@ else
 ARCH=$(CPU_TARGET)
 endif
 endif
-ifeq ($(FULL_TARGET),arm-embedded)
-ifeq ($(SUBARCH),)
-$(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
-endif
-override FPCOPT+=-Cp$(SUBARCH)
-endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -209,14 +203,6 @@ endif
 ifeq ($(OS_TARGET),linux)
 linuxHier=1
 endif
-ifndef CROSSCOMPILE
-BUILDFULLNATIVE=1
-export BUILDFULLNATIVE
-endif
-ifdef BUILDFULLNATIVE
-BUILDNATIVE=1
-export BUILDNATIVE
-endif
 export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
 ifdef FPCDIR
 override FPCDIR:=$(subst \,/,$(FPCDIR))
@@ -265,27 +251,8 @@ endif
 ifndef BINUTILSPREFIX
 ifndef CROSSBINDIR
 ifdef CROSSCOMPILE
-ifneq ($(OS_TARGET),msdos)
 ifndef DARWIN2DARWIN
-ifneq ($(CPU_TARGET),jvm)
 BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
-ifeq ($(OS_TARGET),android)
-ifeq ($(CPU_TARGET),arm)
-BINUTILSPREFIX=arm-linux-androideabi-
-else
-ifeq ($(CPU_TARGET),i386)
-BINUTILSPREFIX=i686-linux-android-
-else
-ifeq ($(CPU_TARGET),mips)
-BINUTILSPREFIX=mipsel-linux-android-
-endif
-endif
-endif
-endif
-endif
-endif
-else
-BINUTILSPREFIX=$(OS_TARGET)-
 endif
 endif
 endif
@@ -344,13 +311,13 @@ GRAPHUNIT_DIR=src/unix
 UNIXINCDEPS=$(UNIXINC)/graph16.inc
 endif
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt sdlgraph
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse sdlgraph
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 override TARGET_UNITS+=graph
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=graph wincrt winmouse sdlgraph ptcgraph ptccrt
+override TARGET_UNITS+=graph wincrt winmouse sdlgraph ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 override TARGET_UNITS+=graph $(GGIGRAPH_UNIT) sdlgraph
@@ -359,7 +326,7 @@ ifeq ($(FULL_TARGET),i386-darwin)
 override TARGET_UNITS+=sdlgraph
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 override TARGET_UNITS+=graph $(GGIGRAPH_UNIT)
@@ -368,7 +335,7 @@ ifeq ($(FULL_TARGET),m68k-amiga)
 override TARGET_UNITS+=graph
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt sdlgraph
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse sdlgraph
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 override TARGET_UNITS+=graph
@@ -377,31 +344,28 @@ ifeq ($(FULL_TARGET),powerpc-darwin)
 override TARGET_UNITS+=sdlgraph
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_UNITS+=graph $(GGIGRAPH_UNIT)
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=graph wincrt winmouse ptcgraph ptccrt
+override TARGET_UNITS+=graph wincrt winmouse ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
-endif
-ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+override TARGET_UNITS+=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
@@ -469,9 +433,6 @@ endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),i386-android)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
@@ -520,9 +481,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),powerpc-aix)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
@@ -583,9 +541,6 @@ endif
 ifeq ($(FULL_TARGET),arm-symbian)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),arm-android)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
@@ -595,9 +550,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),powerpc64-aix)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 ifeq ($(FULL_TARGET),avr-embedded)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
@@ -607,21 +559,9 @@ endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),mips-linux)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 endif
-ifeq ($(FULL_TARGET),jvm-java)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
-ifeq ($(FULL_TARGET),jvm-android)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
-ifeq ($(FULL_TARGET),i8086-msdos)
-override CLEAN_UNITS+=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
-endif
 override INSTALL_FPCPACKAGE=y
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_OPTIONS+=-S2
@@ -689,9 +629,6 @@ endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),i386-android)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -740,9 +677,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),powerpc-aix)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -803,9 +737,6 @@ endif
 ifeq ($(FULL_TARGET),arm-symbian)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),arm-android)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -815,9 +746,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),powerpc64-aix)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),avr-embedded)
 override COMPILER_OPTIONS+=-S2
 endif
@@ -827,21 +755,9 @@ endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),mips-linux)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 override COMPILER_OPTIONS+=-S2
 endif
-ifeq ($(FULL_TARGET),jvm-java)
-override COMPILER_OPTIONS+=-S2
-endif
-ifeq ($(FULL_TARGET),jvm-android)
-override COMPILER_OPTIONS+=-S2
-endif
-ifeq ($(FULL_TARGET),i8086-msdos)
-override COMPILER_OPTIONS+=-S2
-endif
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
 endif
@@ -908,9 +824,6 @@ endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
-ifeq ($(FULL_TARGET),i386-android)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
 endif
@@ -959,9 +872,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
-ifeq ($(FULL_TARGET),powerpc-aix)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
 endif
@@ -1022,9 +932,6 @@ endif
 ifeq ($(FULL_TARGET),arm-symbian)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
-ifeq ($(FULL_TARGET),arm-android)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
 endif
@@ -1034,9 +941,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
-ifeq ($(FULL_TARGET),powerpc64-aix)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
 ifeq ($(FULL_TARGET),avr-embedded)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
@@ -1046,21 +950,9 @@ endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
 endif
-ifeq ($(FULL_TARGET),mips-linux)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
-endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc  src/unix
 endif
-ifeq ($(FULL_TARGET),jvm-java)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
-ifeq ($(FULL_TARGET),jvm-android)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
-ifeq ($(FULL_TARGET),i8086-msdos)
-override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src/inc
-endif
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
@@ -1127,9 +1019,6 @@ endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),i386-android)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 ifeq ($(FULL_TARGET),m68k-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
@@ -1178,9 +1067,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),powerpc-aix)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
@@ -1241,9 +1127,6 @@ endif
 ifeq ($(FULL_TARGET),arm-symbian)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),arm-android)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
@@ -1253,9 +1136,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),powerpc64-aix)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 ifeq ($(FULL_TARGET),avr-embedded)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
@@ -1265,21 +1145,9 @@ endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),mips-linux)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
 endif
-ifeq ($(FULL_TARGET),jvm-java)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
-ifeq ($(FULL_TARGET),jvm-android)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
-ifeq ($(FULL_TARGET),i8086-msdos)
-override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src/inc src/ptcgraph tests examples
-endif
 override SHARED_BUILD=n
 override SHARED_BUILD=n
 ifdef REQUIRE_UNITSDIR
@@ -1541,14 +1409,6 @@ SHAREDLIBEXT=.dll
 SHORTSUFFIX=wat
 IMPORTLIBPREFIX=
 endif
-ifneq ($(CPU_TARGET),jvm)
-ifeq ($(OS_TARGET),android)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=lnx
-endif
-endif
 ifeq ($(OS_TARGET),linux)
 BATCHEXT=.sh
 EXEEXT=
@@ -1673,30 +1533,6 @@ EXEEXT=.dol
 SHAREDLIBEXT=.so
 SHORTSUFFIX=wii
 endif
-ifeq ($(OS_TARGET),aix)
-BATCHEXT=.sh
-EXEEXT=
-SHORTSUFFIX=aix
-endif
-ifeq ($(OS_TARGET),java)
-OEXT=.class
-ASMEXT=.j
-SHAREDLIBEXT=.jar
-SHORTSUFFIX=java
-endif
-ifeq ($(CPU_TARGET),jvm)
-ifeq ($(OS_TARGET),android)
-OEXT=.class
-ASMEXT=.j
-SHAREDLIBEXT=.jar
-SHORTSUFFIX=android
-endif
-endif
-ifeq ($(OS_TARGET),msdos)
-STATICLIBPREFIX=
-STATICLIBEXT=.lib
-SHORTSUFFIX=d16
-endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 FPCMADE=fpcmade.$(SHORTSUFFIX)
 ZIPSUFFIX=$(SHORTSUFFIX)
@@ -1918,11 +1754,7 @@ AS=$(ASPROG)
 LD=$(LDPROG)
 RC=$(RCPROG)
 AR=$(ARPROG)
-ifdef inUnix
-PPAS=./ppas$(SRCBATCHEXT)
-else
 PPAS=ppas$(SRCBATCHEXT)
-endif
 ifdef inUnix
 LDCONFIG=ldconfig
 else
@@ -1963,8 +1795,8 @@ REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_SDL=1
 REQUIRE_PACKAGES_HERMES=1
 REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_PTC=1
 REQUIRE_PACKAGES_OPENGL=1
+REQUIRE_PACKAGES_PTC=1
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 REQUIRE_PACKAGES_RTL=1
@@ -2029,9 +1861,6 @@ endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 REQUIRE_PACKAGES_RTL=1
 endif
-ifeq ($(FULL_TARGET),i386-android)
-REQUIRE_PACKAGES_RTL=1
-endif
 ifeq ($(FULL_TARGET),m68k-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HERMES=1
@@ -2095,9 +1924,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 REQUIRE_PACKAGES_RTL=1
 endif
-ifeq ($(FULL_TARGET),powerpc-aix)
-REQUIRE_PACKAGES_RTL=1
-endif
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HERMES=1
@@ -2142,8 +1968,8 @@ ifeq ($(FULL_TARGET),x86_64-win64)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HERMES=1
 REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_PTC=1
 REQUIRE_PACKAGES_OPENGL=1
+REQUIRE_PACKAGES_PTC=1
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 REQUIRE_PACKAGES_RTL=1
@@ -2177,9 +2003,6 @@ endif
 ifeq ($(FULL_TARGET),arm-symbian)
 REQUIRE_PACKAGES_RTL=1
 endif
-ifeq ($(FULL_TARGET),arm-android)
-REQUIRE_PACKAGES_RTL=1
-endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HERMES=1
@@ -2194,9 +2017,6 @@ endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
-ifeq ($(FULL_TARGET),powerpc64-aix)
-REQUIRE_PACKAGES_RTL=1
-endif
 ifeq ($(FULL_TARGET),avr-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2211,14 +2031,6 @@ endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 REQUIRE_PACKAGES_RTL=1
 endif
-ifeq ($(FULL_TARGET),mips-linux)
-REQUIRE_PACKAGES_RTL=1
-REQUIRE_PACKAGES_HERMES=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_X11=1
-REQUIRE_PACKAGES_OPENGL=1
-REQUIRE_PACKAGES_PTC=1
-endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_HERMES=1
@@ -2227,15 +2039,6 @@ REQUIRE_PACKAGES_X11=1
 REQUIRE_PACKAGES_OPENGL=1
 REQUIRE_PACKAGES_PTC=1
 endif
-ifeq ($(FULL_TARGET),jvm-java)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(FULL_TARGET),jvm-android)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(FULL_TARGET),i8086-msdos)
-REQUIRE_PACKAGES_RTL=1
-endif
 ifdef REQUIRE_PACKAGES_RTL
 PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
 ifneq ($(PACKAGEDIR_RTL),)
@@ -2652,12 +2455,17 @@ endif
 endif
 ifdef CREATESHARED
 override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
 endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
 ifneq ($(findstring $(OS_TARGET),freebsd openbsd netbsd linux solaris),)
 ifeq ($(CPU_TARGET),x86_64)
 override FPCOPT+=-Cg
 endif
 endif
+endif
 ifdef LINKSHARED
 endif
 ifdef GCCLIBDIR

+ 3 - 3
packages/graph/Makefile.fpc

@@ -24,7 +24,7 @@ units=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)
 [target]
 dirs=
 units=
-units_linux=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt
+units_linux=$(GRAPH_UNIT) $(GGIGRAPH_UNIT) ptcgraph ptccrt ptcmouse
 units_freebsd=graph $(GGIGRAPH_UNIT)
 units_win32=graph wincrt winmouse
 units_win64=graph wincrt winmouse
@@ -36,8 +36,8 @@ units_i386_freebsd=sdlgraph
 units_win32=sdlgraph
 units_powerpc_darwin=sdlgraph
 units_i386_darwin=sdlgraph
-units_win32=ptcgraph ptccrt
-units_win64=ptcgraph ptccrt
+units_win32=ptcgraph ptccrt ptcmouse
+units_win64=ptcgraph ptccrt ptcmouse
 
 [compiler]
 options=-S2

+ 5 - 0
packages/graph/fpmake.pp

@@ -117,6 +117,11 @@ begin
         begin
           AddUnit('ptcgraph');
         end;
+    T:=P.Targets.AddUnit('ptcmouse.pp',[win32,win64,linux]);
+      with T.Dependencies do
+        begin
+          AddUnit('ptcgraph');
+        end;
 
 
 {$ifndef ALLPACKAGES}

+ 1 - 0
packages/graph/src/go32v2/graph.pp

@@ -4203,6 +4203,7 @@ const CrtAddress: word = 0;
              mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
              mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
              mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
+             mode.PatternLine := {$ifdef fpc}@{$endif}PatternLineVESA256;
              mode.XAspect := 8333;
              mode.YAspect := 10000;
              AddMode(mode);

+ 2 - 41
packages/graph/src/go32v2/vesa.inc

@@ -76,20 +76,6 @@ var
 
   ScanLines: word;        { maximum number of scan lines for mode }
 
-function hexstr(val : longint;cnt : byte) : string;
-const
-  HexTbl : array[0..15] of char='0123456789ABCDEF';
-var
-  i : longint;
-begin
-  hexstr[0]:=char(cnt);
-  for i:=cnt downto 1 do
-   begin
-     hexstr[i]:=hextbl[val and $f];
-     val:=val shr 4;
-   end;
-end;
-
 
 {$IFDEF DPMI}
 
@@ -2670,34 +2656,9 @@ Const
         LogLn('Prepare to save VESA video state');
 {$endif logging}
     { Prepare to save video state...}
-    asm
-      mov  ax, 4F04h       { get buffer size to save state }
-      mov  dx, 00h
-      mov  cx, 00001111b   { Save DAC / Data areas / Hardware states }
-{$ifdef fpc}
-      push ebx
-      push ebp
-      push esi
-      push edi
-{$endif fpc}
-      int  10h
-{$ifdef fpc}
-      pop edi
-      pop esi
-      pop ebp
-{$endif fpc}
-      mov  [StateSize], bx
-{$ifdef fpc}
-      pop ebx
-{$endif fpc}
-      cmp  al,04fh
-      jnz  @notok
-      mov  [SaveSupported],TRUE
-     @notok:
-    end ['EDX','ECX','EAX'];
-    regs.eax := $4f04;
+    regs.eax := $4F04;     { get buffer size to save state }
     regs.edx := $0000;
-    regs.ecx := $000F;
+    regs.ecx := $000F;     { Save DAC / Data areas / Hardware states }
     RealIntr($10, regs);
     StateSize := word(regs.ebx);
     if byte(regs.eax) = $4f then

+ 202 - 0
packages/graph/src/ptcgraph/ptcmouse.pp

@@ -0,0 +1,202 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2013 by Nikolay Nikolov ([email protected])
+    Copyright (c) 1999-2000 by Florian Klaempfl
+    member of the Free Pascal development team
+
+    This file implements mouse input support for ptcgraph.
+    It is similar to the winmouse and msmouse units.
+
+    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 ptcmouse;
+
+{$MODE objfpc}
+
+interface
+
+{ initializes the mouse with the default values for the current screen mode }
+function InitMouse: Boolean;
+
+{ shows mouse pointer,text+graphics screen support }
+procedure ShowMouse;
+
+{ hides mouse pointer }
+procedure HideMouse;
+
+{ reads mouse position in pixels (divide by 8 to get text position in standard
+  text mode) and reads the buttons state:
+     bit 1 set -> left button pressed
+     bit 2 set -> right button pressed
+     bit 3 set -> middle button pressed
+  Have a look at the example program in the manual to see how you can use this }
+procedure GetMouseState(var x, y, buttons: LongInt);
+
+{ returns true if the left button is pressed }
+function LPressed: Boolean;
+
+{ returns true if the right button is pressed }
+function RPressed: Boolean;
+
+{ returns true if the middle button is pressed }
+function MPressed: Boolean;
+
+(*!!!!! the following functions aren't implemented yet:
+{ positions the mouse pointer }
+procedure SetMousePos(x,y: LongInt);
+
+{ returns at which position "button" was last pressed in x,y and returns the
+  number of times this button has been pressed since the last time this
+  function was called with "button" as parameter. For button you can use the
+  LButton, RButton and MButton constants for resp. the left, right and middle
+  button }
+function GetLastButtonPress(button: LongInt; var x, y: LongInt): LongInt;
+
+{ returns at which position "button" was last released in x,y and returns the
+  number of times this button has been re since the last time. For button
+  you can use the LButton, RButton and MButton constants for resp. the left,
+  right and middle button
+}
+function GetLastButtonRelease(button: LongInt; var x, y: LongInt): LongInt;
+
+{ sets mouse's x range, with Min and Max resp. the higest and the lowest
+  column (in pixels) in between which the mouse cursor can move }
+procedure SetMouseXRange(Min, Max: LongInt);
+
+{ sets mouse's y range, with Min and Max resp. the higest and the lowest
+  row (in pixels) in between which the mouse cursor can move}
+procedure SetMouseYRange(Min, Max: LongInt);
+
+{ set the window coordinates in which the mouse cursor can move }
+procedure SetMouseWindow(x1, y1, x2, y2: LongInt);
+
+{ sets the mouse shape in text mode: background and foreground color and the
+  Ascii value with which the character on screen is XOR'ed when the cursor
+  moves over it. Set to 0 for a "transparent" cursor}
+procedure SetMouseShape(ForeColor, BackColor, Ascii: Byte);
+
+{ sets the mouse ascii in text mode. The difference between this one and
+  SetMouseShape, is that the foreground and background colors stay the same
+  and that the Ascii code you enter is the character that you will get on
+  screen; there's no XOR'ing }
+procedure SetMouseAscii(Ascii: Byte);
+
+{ set mouse speed in mickey's/pixel; default: horizontal: 8; vertical: 16 }
+procedure SetMouseSpeed(Horizontal, Vertical: LongInt);
+
+{ set a rectangle on screen that mouse will disappear if it is moved into }
+procedure SetMouseHideWindow(x1, y1, x2, y2: LongInt);
+*)
+
+const
+  LButton = 1; { left button   }
+  RButton = 2; { right button  }
+  MButton = 4; { middle button }
+
+var
+  MouseFound: Boolean;
+
+implementation
+
+uses
+   ptcgraph, ptc, ptcwrapper;
+
+function InGraphMode: Boolean;
+begin
+  Result := (PTCWrapperObject <> nil) and (PTCWrapperObject.IsOpen);
+end;
+
+var
+  MouseX, MouseY: LongInt;
+  MouseButtonState: Byte;
+
+procedure GetMouseEvents;
+var
+  ev: IPTCEvent;
+  MouseEv: IPTCMouseEvent;
+begin
+  if not InGraphMode then
+  begin
+    MouseX := 0;
+    MouseY := 0;
+    MouseButtonState := 0;
+    exit;
+  end;
+  repeat
+    PTCWrapperObject.NextEvent(ev, False, [PTCMouseEvent]);
+    if ev <> nil then
+    begin
+      case ev.EventType of
+        PTCMouseEvent:
+          begin
+            MouseEv := ev as IPTCMouseEvent;
+            MouseX := MouseEv.X;
+            MouseY := MouseEv.Y;
+            MouseButtonState := 0;
+            if PTCMouseButton1 in MouseEv.ButtonState then
+              MouseButtonState := MouseButtonState or LButton;
+            if PTCMouseButton2 in MouseEv.ButtonState then
+              MouseButtonState := MouseButtonState or RButton;
+            if PTCMouseButton3 in MouseEv.ButtonState then
+              MouseButtonState := MouseButtonState or MButton;
+          end;
+      end;
+    end;
+  until ev = nil;
+end;
+
+function InitMouse: Boolean;
+begin
+  GetMouseEvents;
+  InitMouse := MouseFound;
+end;
+
+procedure ShowMouse;
+begin
+  GetMouseEvents;
+  if InGraphMode then
+    PTCWrapperObject.Option('show cursor');
+end;
+
+procedure HideMouse;
+begin
+  GetMouseEvents;
+  if InGraphMode then
+    PTCWrapperObject.Option('hide cursor');
+end;
+
+function LPressed: Boolean;
+begin
+  GetMouseEvents;
+  LPressed := (MouseButtonState and LButton) <> 0;
+end;
+
+function RPressed: Boolean;
+begin
+  GetMouseEvents;
+  RPressed := (MouseButtonState and RButton) <> 0;
+end;
+
+function MPressed: Boolean;
+begin
+  GetMouseEvents;
+  MPressed := (MouseButtonState and MButton) <> 0;
+end;
+
+procedure GetMouseState(var x, y, buttons: LongInt);
+begin
+  GetMouseEvents;
+  x := MouseX;
+  y := MouseY;
+  buttons := MouseButtonState;
+end;
+
+begin
+  MouseFound := True;
+end.

+ 2 - 0
packages/ptc/docs/CHANGES.txt

@@ -1,4 +1,6 @@
 0.99.14
+ - added new unit ptcmouse for use with ptcgraph & ptccrt applications. It is
+   similar to the winmouse and msmouse units.
  - support for resizable windows extended. Your application now receives
    a new event IPTCResizeEvent and is allowed to call a new method called
    InternalResize, which adjusts the console's width and height according to