You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(27) |
Apr
(11) |
May
(112) |
Jun
(8) |
Jul
(10) |
Aug
(68) |
Sep
(12) |
Oct
(3) |
Nov
(19) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(15) |
Mar
(20) |
Apr
(22) |
May
(131) |
Jun
(27) |
Jul
(19) |
Aug
(207) |
Sep
(61) |
Oct
(27) |
Nov
(28) |
Dec
(21) |
| 2004 |
Jan
(7) |
Feb
(25) |
Mar
(14) |
Apr
(55) |
May
(15) |
Jun
(2) |
Jul
(14) |
Aug
(28) |
Sep
(29) |
Oct
|
Nov
|
Dec
|
|
From: Joern E. <je...@us...> - 2002-05-05 01:34:18
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg In directory usw-pr-cvs1:/tmp/cvs-serv29134/platforms/Cross/plugins/Mpeg3Plugin/libmpeg Modified Files: Makefile make.inc Log Message: regenerated after ":=" changes in mkMakefile Index: Makefile =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 24 Oct 2001 23:12:10 -0000 1.1.1.1 --- Makefile 5 May 2002 01:34:16 -0000 1.2 *************** *** 2,13 **** ### settings for building libmpeg by itself ! LIBMPEG_CC:=cc ! LIBMPEG_CFLAGS:= ! LIBMPEG_LINKLIB:=ar rcs ! LIBMPEG_NASM:=nasm -f elf ! LIBMPEG_SOURCE_DIR:=. ! LIBMPEG_BUILD_DIR:=. ! LIBMPEG_OBJECT_EXT:=o ! LIBMPEG_LIBRARY_EXT:=a --- 2,13 ---- ### settings for building libmpeg by itself ! LIBMPEG_CC=cc ! LIBMPEG_CFLAGS= ! LIBMPEG_LINKLIB=ar rcs ! LIBMPEG_NASM=nasm -f elf ! LIBMPEG_SOURCE_DIR=. ! LIBMPEG_BUILD_DIR=. ! LIBMPEG_OBJECT_EXT=o ! LIBMPEG_LIBRARY_EXT=a *************** *** 22,31 **** #### automatically generated by ./mkMakefile # flags for compiling libmpeg ! LIBMPEG_CFLAGS := $(LIBMPEG_CFLAGS) -I$(LIBMPEG_SOURCE_DIR) -I$(LIBMPEG_SOURCE_DIR)/audio -I$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED:=$(LIBMPEG_BUILD_DIR)/tree.created ! LIBMPEG_CFLAGS := $(LIBMPEG_CFLAGS) -DNOPTHREADS $(LIBMPEG_BUILD_DIR_CREATED): --- 22,31 ---- #### automatically generated by ./mkMakefile # flags for compiling libmpeg ! LIBMPEG_CFLAGS += -I$(LIBMPEG_SOURCE_DIR) -I$(LIBMPEG_SOURCE_DIR)/audio -I$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED=$(LIBMPEG_BUILD_DIR)/tree.created ! LIBMPEG_CFLAGS += -DNOPTHREADS $(LIBMPEG_BUILD_DIR_CREATED): Index: make.inc =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/make.inc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** make.inc 24 Oct 2001 23:12:11 -0000 1.1.1.1 --- make.inc 5 May 2002 01:34:16 -0000 1.2 *************** *** 1,10 **** #### automatically generated by ./mkMakefile # flags for compiling libmpeg ! LIBMPEG_CFLAGS := $(LIBMPEG_CFLAGS) -I$(LIBMPEG_SOURCE_DIR) -I$(LIBMPEG_SOURCE_DIR)/audio -I$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED:=$(LIBMPEG_BUILD_DIR)/tree.created ! LIBMPEG_CFLAGS := $(LIBMPEG_CFLAGS) -DNOPTHREADS $(LIBMPEG_BUILD_DIR_CREATED): --- 1,10 ---- #### automatically generated by ./mkMakefile # flags for compiling libmpeg ! LIBMPEG_CFLAGS += -I$(LIBMPEG_SOURCE_DIR) -I$(LIBMPEG_SOURCE_DIR)/audio -I$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED=$(LIBMPEG_BUILD_DIR)/tree.created ! LIBMPEG_CFLAGS += -DNOPTHREADS $(LIBMPEG_BUILD_DIR_CREATED): |
|
From: Joern E. <je...@us...> - 2002-05-05 01:33:11
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/Mpeg3Plugin In directory usw-pr-cvs1:/tmp/cvs-serv28996/platforms/unix/plugins/Mpeg3Plugin Modified Files: mkMakeRules Log Message: changed macro assignments from ":=" to "=", "A := $(A) ..." to "A += ..:" so it also works with Solaris make Index: mkMakeRules =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/Mpeg3Plugin/mkMakeRules,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mkMakeRules 25 Jan 2002 02:31:19 -0000 1.3 --- mkMakeRules 5 May 2002 01:33:09 -0000 1.4 *************** *** 61,75 **** then cat <<EOF ! LIBMPEG_CC:=\$(LIBTOOL) --mode=compile \$(CC) ! LIBMPEG_LINKLIB:=\$(LIBTOOL) --mode=link \$(CC) -o ! LIBMPEG_OBJECT_EXT:=lo ! LIBMPEG_LIBRARY_EXT:=la EOF else cat <<EOF ! LIBMPEG_CC:=\$(CC) ! LIBMPEG_LINKLIB:=\$(AR) rcs ! LIBMPEG_OBJECT_EXT:=o ! LIBMPEG_LIBRARY_EXT:=a EOF fi --- 61,75 ---- then cat <<EOF ! LIBMPEG_CC=\$(LIBTOOL) --mode=compile \$(CC) ! LIBMPEG_LINKLIB=\$(LIBTOOL) --mode=link \$(CC) -o ! LIBMPEG_OBJECT_EXT=lo ! LIBMPEG_LIBRARY_EXT=la EOF else cat <<EOF ! LIBMPEG_CC=\$(CC) ! LIBMPEG_LINKLIB=\$(AR) rcs ! LIBMPEG_OBJECT_EXT=o ! LIBMPEG_LIBRARY_EXT=a EOF fi *************** *** 77,84 **** cat <<EOF ! LIBMPEG_CFLAGS:=-O3 ! LIBMPEG_NASM:=nasm -f elf ! LIBMPEG_SOURCE_DIR:=$libmpegdir ! LIBMPEG_BUILD_DIR:=\$(top_builddir)/Mpeg3Plugin/libmpeg EOF --- 77,84 ---- cat <<EOF ! LIBMPEG_CFLAGS=-O3 ! LIBMPEG_NASM=nasm -f elf ! LIBMPEG_SOURCE_DIR=$libmpegdir ! LIBMPEG_BUILD_DIR=\$(top_builddir)/Mpeg3Plugin/libmpeg EOF *************** *** 109,113 **** ! PLUGINS_O:=\$(PLUGINS_O) Mpeg3Plugin.o \$(LIBMPEG_BUILD_DIR)/libmpeg3.a EOF --- 109,113 ---- ! PLUGINS_O += Mpeg3Plugin.o \$(LIBMPEG_BUILD_DIR)/libmpeg3.a EOF |
|
From: Joern E. <je...@us...> - 2002-05-05 01:33:11
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg In directory usw-pr-cvs1:/tmp/cvs-serv28996/platforms/Cross/plugins/Mpeg3Plugin/libmpeg Modified Files: mkMakefile Log Message: changed macro assignments from ":=" to "=", "A := $(A) ..." to "A += ..:" so it also works with Solaris make Index: mkMakefile =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/mkMakefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mkMakefile 24 Oct 2001 23:12:11 -0000 1.1.1.1 --- mkMakefile 5 May 2002 01:33:09 -0000 1.2 *************** *** 55,62 **** cat >> $commonPart <<EOF # flags for compiling libmpeg ! LIBMPEG_CFLAGS := \$(LIBMPEG_CFLAGS) -I\$(LIBMPEG_SOURCE_DIR) -I\$(LIBMPEG_SOURCE_DIR)/audio -I\$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED:=\$(LIBMPEG_BUILD_DIR)/tree.created EOF --- 55,62 ---- cat >> $commonPart <<EOF # flags for compiling libmpeg ! LIBMPEG_CFLAGS += -I\$(LIBMPEG_SOURCE_DIR) -I\$(LIBMPEG_SOURCE_DIR)/audio -I\$(LIBMPEG_SOURCE_DIR)/video # a file that indicates the build tree has been created ! LIBMPEG_BUILD_DIR_CREATED=\$(LIBMPEG_BUILD_DIR)/tree.created EOF *************** *** 65,73 **** if [ $USE_MMX = 1 ] then ! echo "LIBMPEG_CFLAGS := \$(LIBMPEG_CFLAGS) -DHAVE_MMX" >> $commonPart fi if [ $USE_PTHREADS = 0 ] then ! echo "LIBMPEG_CFLAGS := \$(LIBMPEG_CFLAGS) -DNOPTHREADS" >> $commonPart fi echo >> $commonPart --- 65,73 ---- if [ $USE_MMX = 1 ] then ! echo "LIBMPEG_CFLAGS += -DHAVE_MMX" >> $commonPart fi if [ $USE_PTHREADS = 0 ] then ! echo "LIBMPEG_CFLAGS += -DNOPTHREADS" >> $commonPart fi echo >> $commonPart *************** *** 169,180 **** ### settings for building libmpeg by itself ! LIBMPEG_CC:=cc ! LIBMPEG_CFLAGS:= ! LIBMPEG_LINKLIB:=ar rcs ! LIBMPEG_NASM:=nasm -f elf ! LIBMPEG_SOURCE_DIR:=. ! LIBMPEG_BUILD_DIR:=. ! LIBMPEG_OBJECT_EXT:=o ! LIBMPEG_LIBRARY_EXT:=a --- 169,180 ---- ### settings for building libmpeg by itself ! LIBMPEG_CC=cc ! LIBMPEG_CFLAGS= ! LIBMPEG_LINKLIB=ar rcs ! LIBMPEG_NASM=nasm -f elf ! LIBMPEG_SOURCE_DIR=. ! LIBMPEG_BUILD_DIR=. ! LIBMPEG_OBJECT_EXT=o ! LIBMPEG_LIBRARY_EXT=a |
|
From: Joern E. <je...@us...> - 2002-05-05 01:26:07
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg
In directory usw-pr-cvs1:/tmp/cvs-serv27794
Modified Files:
mpeg3io.c
Log Message:
changed the conditional compilation test around the "sentmntent" stuff from
"not (mac or windows)" to "linux" so it also compiles on Solaris and FreeBSD.
However, I can't see where this function is ever called anyway.
Index: mpeg3io.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3io.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mpeg3io.c 27 Dec 2001 23:15:44 -0000 1.2
--- mpeg3io.c 5 May 2002 01:26:04 -0000 1.3
***************
*** 34,38 ****
#include "mpeg3protos.h"
! #if !(defined(TARGET_OS_MAC) || defined(WIN32))
#include <mntent.h>
#endif
--- 34,38 ----
#include "mpeg3protos.h"
! #if defined(__linux__)
#include <mntent.h>
#endif
***************
*** 123,127 ****
{
struct stat file_st, device_st;
! struct mntent *mnt;
FILE *fp;
--- 123,129 ----
{
struct stat file_st, device_st;
! #if defined(__linux__)
! struct mntent *mnt;
! #endif
FILE *fp;
***************
*** 132,138 ****
}
! #if !(defined(WIN32) || defined(TARGET_OS_MAC))
! fp = setmntent(MOUNTED, "r");
! while(fp && (mnt = getmntent(fp)))
{
if(stat(mnt->mnt_fsname, &device_st) < 0) continue;
--- 134,140 ----
}
! #if defined(__linux__)
! fp = setmntent(MOUNTED, "r");
! while(fp && (mnt = getmntent(fp)))
{
if(stat(mnt->mnt_fsname, &device_st) < 0) continue;
|
|
From: Joern E. <je...@us...> - 2002-05-05 01:21:46
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm
In directory usw-pr-cvs1:/tmp/cvs-serv27437
Modified Files:
sqUnixExternalPrims.c
Log Message:
suppress misleading error message while trying to load an external plugin
with a directory of the same name present
Index: sqUnixExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqUnixExternalPrims.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqUnixExternalPrims.c 24 Oct 2001 23:14:17 -0000 1.1.1.1
--- sqUnixExternalPrims.c 5 May 2002 01:21:43 -0000 1.2
***************
*** 115,119 ****
{
/* insist on the error message: the shared lib really _is_ broken */
! fprintf(stderr, "ioLoadModule(%s): %s\n", libName, dlerror());
}
else
--- 115,122 ----
{
/* insist on the error message: the shared lib really _is_ broken */
! if (!(S_ISDIR(buf.st_mode)))
! {
! fprintf(stderr, "ioLoadModule(%s): %s\n", libName, dlerror());
! }
}
else
|
|
From: Andreas R. <and...@us...> - 2002-05-05 00:18:57
|
Update of /cvsroot/squeak/squeak/platforms/win32/misc In directory usw-pr-cvs1:/tmp/cvs-serv18130 Modified Files: makefile.cvs Log Message: added export target Index: makefile.cvs =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/misc/makefile.cvs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** makefile.cvs 4 May 2002 21:34:50 -0000 1.1 --- makefile.cvs 5 May 2002 00:18:53 -0000 1.2 *************** *** 58,59 **** --- 58,62 ---- endif + export: + cvs -z3 -d:pserver:ano...@cv...:/cvsroot/squeak export -r HEAD win32-solo Cross-solo + |
|
From: Andreas R. <and...@us...> - 2002-05-05 00:10:02
|
Update of /cvsroot/squeak/squeak/platforms/win32/vm In directory usw-pr-cvs1:/tmp/cvs-serv16388 Removed Files: sqWin32Drop.c Log Message: removed sqWin32Drop.c from vm directory --- sqWin32Drop.c DELETED --- |
|
From: Andreas R. <and...@us...> - 2002-05-05 00:06:02
|
Update of /cvsroot/squeak/squeak/platforms/win32 In directory usw-pr-cvs1:/tmp/cvs-serv15763 Added Files: Makefile.mingw32 build.bat Log Message: relocated files --- NEW FILE: Makefile.mingw32 --- ############################################################################# # Makefile for Win32 Squeak using gcc-2.95.2 and MingW32 ############################################################################# ifndef SRCDIR include plugins/plugins.ext include plugins/plugins.int INTERNAL_LIBS = $(addsuffix .lib, $(INTERNAL_PLUGINS)) EXTERNAL_LIBS = $(addsuffix .dll, $(EXTERNAL_PLUGINS)) endif AR = ar rc CP = copy RM = del ############################################################################# # Default locations # ifndef SRCDIR SRCDIR= . endif BLDDIR= $(SRCDIR)/release ifndef OBJDIR OBJDIR= $(BLDDIR) endif ############################################################################# # Default targets # VM= Squeak.exe ############################################################################# # VM definitions # VMDEF= Squeak.def VMEXP= Squeak.exp VMLIB= Squeak.lib VMRES= Squeak.res VMDEFIN=misc/Squeak.def.in ############################################################################# # Generic VM source file definitions # VMDIR= $(SRCDIR)/vm VMSRC= $(notdir $(wildcard $(VMDIR)/*.c)) gnu-interp.c VMOBJ:= $(VMSRC:.c=.o) VMOBJ:= $(filter-out interp.o sqFilePrims.o, $(VMOBJ)) LIBSRC = $(wildcard *.c) LIBOBJ = $(LIBSRC:.c=.o) .PRECIOUS: gnu-interp.c #BBCopy-i386.cc ############################################################################# # DirectX definitions # DXDIR= c:/dx7sdk/include ############################################################################# # Plugin (DLL) file definitions # # DLLDIR is set through makefile invokation DLLDIR = $(SRCDIR)/plugins DLLOBJ = $(notdir $(subst .c,.o, $(wildcard $(DLLDIR)/*.c))) \ $(notdir $(subst .cc,.o, $(wildcard $(DLLDIR)/*.cc))) \ $(notdir $(subst .ccg,.o, $(wildcard $(DLLDIR)/*.ccg))) # DLLOBJ = $(DLLSRC:.c=.o) $(DLLSRC:.cc=.o) DLLOBJ := $(filter-out sqMac% sqUnix% %-ppc.o, $(DLLOBJ)) ############################################################################# # What object files do we need? # ALLOBJ= $(VMOBJ) ############################################################################# # Where go the intermediate files? # VMOUTDIR= $(BLDDIR) PLUGINOUTDIR= $(BLDDIR) ############################################################################# # And where to look for files? # VPATH= $(SRCDIR) $(VMDIR) $(VMOUTDIR) $(PLUGINOUTDIR) ############################################################################# # C compiler settings (for egcs-1.1.2) # CC= gcc CXX= g++ CFLAGS= -g -mpentium -mwindows -O3 -fomit-frame-pointer -funroll-loops -fschedule-insns2 CXXFLAGS= $(CFLAGS) -felide-constructors WFLAGS= DEFS= -DWIN32_FILE_SUPPORT -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DX86 $(XDEFS) #-DUSE_DIB_SECTIONS #-DPROFILE XDEFS= -DSQUEAK_BUILTIN_PLUGIN INCS= -I. -I$(SRCDIR) -I$(VMDIR) -I$(DXDIR) $(XINC) MD= mkdir ############################################################################# # Linker settings # # Note: I had to use 'gcc' instead of 'ld' to prevent unresolved symbols # The switch '-mwindows' gives us a GUI app instead of a console app. # LD= gcc LDFLAGS= -mwindows STDLIBS= -lddraw -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm -luser32 -lgdi32 -lkernel32 CRTLIB = -lcrtdll LIBS= $(STDLIBS) $(CRTLIB) ############################################################################# # AWK settings # # Note: AWK is only necessary for building gnu-interp.c # AWK= gawk ############################################################################# # DLL settings # # Note: DLLTOOL/DLLWRAP does the work for everything related to plugins # DLLTOOL= dlltool DLLWRAP= dllwrap ############################################################################# # RC settings # # Note: RC compiles the .rc files into linkable .o files # !!!WARNING!!! windres can break if you have MacAfee VShield running!!! # RC= windres RCFLAGS= --include-dir $(SRCDIR)/misc .SUFFIXES: .SUFFIXES: .ccg .cc .c .o .s .i .rc .res .cg .hg .ccg all: $(VM) $(EXTERNAL_LIBS) ############################################################################# # Compiling Squeak itself # # Mpeg3Plugin.o sqOpenGLRenderer.o sqWin32FilePrims.o $(VM): $(ALLOBJ) $(INTERNAL_LIBS) $(VMEXP) resource.o $(LD) $(LDFLAGS) -o $(VMOUTDIR)/$(VM) $(addprefix $(VMOUTDIR)/,$(ALLOBJ)) $(VMOUTDIR)/$(VMEXP) $(VMOUTDIR)/resource.o $(addprefix $(VMOUTDIR)/,$(INTERNAL_LIBS)) $(LIBS) strip --strip-all $(VMOUTDIR)/$(VM) ############################################################################# # The exports for named primitives from Squeak (required by VM) # $(VMDEF) $(VMEXP) $(VMLIB): $(ALLOBJ) $(DLLTOOL) --input-def $(VMDEFIN) --output-def $(VMOUTDIR)/$(VMDEF) --output-exp $(VMOUTDIR)/$(VMEXP) --output-lib $(VMOUTDIR)/$(VMLIB) $(addprefix $(VMOUTDIR)/,$(ALLOBJ)) ############################################################################# # Building plugins DLL: $(DLLOBJ) assureReleaseDir: -$(MD) release #%.dll: assureReleaseDir # -$(MD) Release\\$* # $(MAKE) -C ../$* -f ../win32/Makefile.mingw32 DLLDIR=$* DLLNAME=$*.dll DLL XDEFS=-DSTANDALONE # $(DLLTOOL) --output-def $(OUTDIR)/$*/$*.def --output-exp $(OUTDIR)/$*/$*.exp --output-lib $(OUTDIR)/$*/$*.lib $(OUTDIR)/$*/*.o # $(DLLWRAP) -mwindows -def $(OUTDIR)/$*/$*.def -o $(OUTDIR)/$*.dll $(LIBS) $(OUTDIR)/$*/*.o $(OUTDIR)/$*/$*.exp # strip --strip-all $(OUTDIR)/$*.dll makelib: $(LIBOBJ) $(AR) $(LIB) $(LIBOBJ) $(RM) $(LIBOBJ) makedll: $(LIBOBJ) $(DLLTOOL) \ --output-def $(OBJDIR)/$(LIB).def \ --output-exp $(OBJDIR)/$(LIB).exp \ --output-lib $(OBJDIR)/$(LIB).lib \ $(LIBOBJ) $(DLLWRAP) -mwindows \ -def $(OBJDIR)/$(LIB).def \ -o $(OBJDIR)/$(LIB).dll \ $(LIBS) \ $(OBJDIR)/$(LIB).exp \ $(LIBOBJ) strip --strip-all $(OBJDIR)/$(LIB).dll $(RM) $(LIBOBJ) $(LIB).lib $(LIB).exp $(LIB).def %.lib: @$(MAKE) -C plugins/$* -f ../../Makefile.mingw32 SRCDIR=../../ LIB=$*.lib OBJDIR=. XDEFS=-DSQUEAK_BUILTIN_PLUGIN makelib $(CP) plugins\$*\$*.lib release\$*.lib $(RM) plugins\$*\$*.lib %.dll: @$(MAKE) -C plugins/$* -f ../../Makefile.mingw32 SRCDIR=../../ LIB=$* OBJDIR=. XDEFS=-DNIX makedll $(CP) plugins\$*\$*.dll release\$*.dll $(RM) plugins\$*\$*.dll ############################################################################# # Rules for automated builds # Mpeg%.o: $(CC) -o $(VMOUTDIR)/$@ $(CFLAGS) -I$(VMDIR)/libmpeg -I$(DLLDIR)/Mpeg3Plugin -I$(VMDIR)/libmpeg/audio -I$(VMDIR)/libmpeg/video $(INCS) $(DEFS) -c $< .c.o: $(CC) -o $(OBJDIR)/$@ $(CFLAGS) $(INCS) $(DEFS) -c $< .cc.o: $(CXX) -o $(OBJDIR)/$@ $(CXXFLAGS) $(INCS) $(DEFS) -c $< .c.s: $(CC) -S -o $@ -fverbose-asm -Wa,ah $(CFLAGS) $(INCS) $(DEFS) -c $< .cc.s: $(CXX) -S -o $@ -fverbose-asm -Wa,ah $(CXXFLAGS) $(INCS) $(DEFS) -c $< .c.i: $(CC) -E -o $@ $(CFLAGS) $(INCS) $(DEFS) -c $< gnu-%.c: %.c $(AWK) -f $(SRCDIR)/misc/gnuify $< > $@ .rc.res: $(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@ resource.o: $(VMRES) $(RC) $(RCFLAGS) -i $(OBJDIR)/$< -o $(OBJDIR)/$@ .cg.c: $(CCG) -n -o $@ $< .hg.h: $(CCG) -n -o $@ $< .ccg.cc: $(CCG) -n -o $@ $< ############################################################################# # Extra specific dependencies # sqNamedPrims.o: sqNamedPrims.c sqNamedPrims.h gnu-interp.c: interp.c misc/gnuify Mpeg3Plugin.o: Mpeg3Plugin.c Squeak.res: misc/Squeak.rc $(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@ ### housekeeping clean: @echo ------------------------------------------------------ @echo Please delete all files from the "$(OUTDIR)" directory @echo ------------------------------------------------------ ############################################################################# # Generic Win32 support file definitions # #WINDIR= $(SRCDIR)/win32 #WINSRC= $(notdir $(wildcard $(WINDIR)/sqWin32*.c)) #WINOBJ= $(WINSRC:.c=.o) ############################################################################# # Specific Win32 support file definitions # #WIN95DIR= $(WINDIR)/Win95 #WIN95SRC= $(notdir $(wildcard $(WIN95DIR)/sqWin32*.c)) #WIN95OBJ= $(WIN95SRC:.c=.o) ############################################################################# # The Squeak plugin # #NPDIR= $(WINDIR)/NPSqueak #NPSRC= $(notdir $(wildcard $(NPDIR)/*.c)) #NPOBJ:= $(NPSRC:.c=.o) NPRes.o #NPINC = $(NPDIR)/include ############################################################################# # CCG definitions # # Note: CCGINCDIR is a phony entry since CCG makes includes based on # include <ccg/asm-i386.h> so we have to make it find that. # #CCGDIR = $(SRCDIR)/../ccg #CCGINCDIR = $(CCGDIR)/.. #CCG= $(WINDIR)/utils/ccg.exe ############################################################################# # The Squeak plugin # #NPSqueak.dll: assureReleaseDir # $(MD) Release\\NPSqueak # $(MAKE) -f Makefile.mingw32 DLLDIR=NPSqueak $(NPOBJ) # $(DLLWRAP) -mwindows -def NPSqueak/NPSqueak.def -o $(OUTDIR)/NPSqueak.dll $(STDLIBS) $(OUTDIR)/NPSqueak/*.o # strip --strip-all $(OUTDIR)/NPSqueak.dll # #NPRes.o: NPSqueak.rc # $(RC) $(RCFLAGS) -i $< -o $(OUTDIR)/$@ # #NPSqueakLand.dll: # $(MD) Release\\NPSqueak # $(MAKE) -f Makefile.mingw32 DLLDIR=NPSqueak $(NPOBJ) XDEFS=-DSQUEAKLAND # $(DLLWRAP) -mwindows -def NPSqueak/NPSqueak.def -o $(OUTDIR)/NPSqueakLand.dll $(LIBS) $(OUTDIR)/NPSqueak/*.o # strip --strip-all $(OUTDIR)/NPSqueakLand.dll --- NEW FILE: build.bat --- make -f Makefile.mingw32 %1 %2 %3 |
|
From: Andreas R. <and...@us...> - 2002-05-04 23:45:47
|
Update of /cvsroot/squeak/squeak/platforms/win32/vm
In directory usw-pr-cvs1:/tmp/cvs-serv12284/vm
Modified Files:
sqWin32Window.c
Log Message:
Fix for the mouse button bits
Index: sqWin32Window.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Window.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqWin32Window.c 4 May 2002 23:20:28 -0000 1.4
--- sqWin32Window.c 4 May 2002 23:45:44 -0000 1.5
***************
*** 934,938 ****
red |= msg->wParam & MK_RBUTTON;
blue = yellow = 0;
! } else if(f3ButtonMouse) {
blue = msg->wParam & MK_MBUTTON;
yellow = msg->wParam & MK_RBUTTON;
--- 934,938 ----
red |= msg->wParam & MK_RBUTTON;
blue = yellow = 0;
! } else if(!f3ButtonMouse) {
blue = msg->wParam & MK_MBUTTON;
yellow = msg->wParam & MK_RBUTTON;
***************
*** 943,950 ****
if(red && !blue && !yellow) { /* red button honors modifiers */
if(alt && !ctrl) {
! red = 0; yellow = 1;
}
if(ctrl && !alt) {
! red = 0; blue = 1;
}
}
--- 943,950 ----
if(red && !blue && !yellow) { /* red button honors modifiers */
if(alt && !ctrl) {
! red = 0; blue = 1;
}
if(ctrl && !alt) {
! red = 0; yellow = 1;
}
}
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:32
|
Update of /cvsroot/squeak/squeak/platforms/win32/vm
In directory usw-pr-cvs1:/tmp/cvs-serv7733/vm
Modified Files:
sqWin32.h sqWin32Alloc.c sqWin32Args.c sqWin32Directory.c
sqWin32ExternalPrims.c sqWin32Intel.c sqWin32PluginSupport.c
sqWin32Prefs.c sqWin32Service.c sqWin32Utils.c sqWin32Window.c
Added Files:
sqWin32Exports.c
Log Message:
Update to 3.2.1
--- NEW FILE: sqWin32Exports.c ---
#include <stdio.h>
int win32JoystickDebugInfo(void);
int win32JoystickDebugPrintRawValues(void);
int win32JoystickDebugPrintAlternativeValues(void);
int win32DebugPrintSocketState(void);
int primitivePluginBrowserReady(void);
int primitivePluginRequestURLStream(void);
int primitivePluginRequestURL(void);
int primitivePluginPostURL(void);
int primitivePluginRequestFileHandle(void);
int primitivePluginDestroyRequest(void);
int primitivePluginRequestState(void);
extern void* stWindow;
extern void* firstMessageHook;
extern void* preMessageHook;
void *os_exports[][3] = {
{"","win32JoystickDebugInfo", win32JoystickDebugInfo},
{"","win32JoystickDebugPrintRawValues", win32JoystickDebugPrintRawValues},
{"","win32JoystickDebugPrintAlternativeValues", win32JoystickDebugPrintAlternativeValues},
{"","win32DebugPrintSocketState", win32DebugPrintSocketState},
{"","primitivePluginBrowserReady", primitivePluginBrowserReady},
{"","primitivePluginRequestURLStream", primitivePluginRequestURLStream},
{"","primitivePluginRequestURL", primitivePluginRequestURL},
{"","primitivePluginPostURL", primitivePluginPostURL},
{"","primitivePluginRequestFileHandle", primitivePluginRequestFileHandle},
{"","primitivePluginDestroyRequest", primitivePluginDestroyRequest},
{"","primitivePluginRequestState", primitivePluginRequestState},
{"","stWindow", &stWindow},
{"","firstMessageHook", &firstMessageHook},
{"","preMessageHook", &preMessageHook},
{NULL,NULL, NULL}
};
Index: sqWin32.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32.h 28 Jan 2002 13:56:59 -0000 1.2
--- sqWin32.h 4 May 2002 23:20:28 -0000 1.3
***************
*** 241,245 ****
#endif
! #define SQUEAK_VM_VERSION TEXT("Squeak 3.1 VM (alpha build 6) from ") TEXT(__DATE__) \
TEXT("\n") TEXT("Compiler: ") TEXT(COMPILER) TEXT(VERSION)
--- 241,245 ----
#endif
! #define SQUEAK_VM_VERSION TEXT("Squeak 3.2.1 VM (release candidate) from ") TEXT(__DATE__) \
TEXT("\n") TEXT("Compiler: ") TEXT(COMPILER) TEXT(VERSION)
Index: sqWin32Alloc.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Alloc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
Index: sqWin32Args.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Args.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32Args.c 5 Apr 2002 00:42:25 -0000 1.2
--- sqWin32Args.c 4 May 2002 23:20:28 -0000 1.3
***************
*** 26,45 ****
fp = fopen(name,"rb");
if(!fp) return 0; /* not an image */
! if(fread(&magic, 1, sizeof(magic), fp) != sizeof(magic))
! {
! fclose(fp);
! return 0;
! }
! if (readableFormat(magic) || readableFormat(byteSwapped(magic))) {
! fclose(fp);
! return true;
}
/* no luck at beginning of file, seek to 512 and try again */
if(fseek( fp, 512, SEEK_SET)) {
! /* seek failed, which implies file is too small */
! fclose(fp);
! return false;
};
if(fread(&magic, 1, sizeof(magic), fp) != sizeof(magic))
{
--- 26,45 ----
fp = fopen(name,"rb");
if(!fp) return 0; /* not an image */
! if(fread(&magic, 1, sizeof(magic), fp) != sizeof(magic)) {
! fclose(fp);
! return 0;
! }
! if(readableFormat(magic) || readableFormat(byteSwapped(magic))) {
! fclose(fp);
! return true;
}
/* no luck at beginning of file, seek to 512 and try again */
if(fseek( fp, 512, SEEK_SET)) {
! /* seek failed, which implies file is too small */
! fclose(fp);
! return false;
};
+
if(fread(&magic, 1, sizeof(magic), fp) != sizeof(magic))
{
Index: sqWin32Directory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Directory.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
Index: sqWin32ExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32ExternalPrims.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
Index: sqWin32Intel.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Intel.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32Intel.c 28 Jan 2002 13:56:59 -0000 1.2
--- sqWin32Intel.c 4 May 2002 23:20:28 -0000 1.3
***************
*** 145,150 ****
int OutputConsoleString(char *string)
! { int pos;
pos = SendMessage(consoleWindow,WM_GETTEXTLENGTH, 0,0);
SendMessage(consoleWindow, EM_SETSEL, pos, pos);
--- 145,164 ----
int OutputConsoleString(char *string)
! {
! int pos;
+ if(fDynamicConsole && !fShowConsole) {
+ /* show console window */
+ ShowWindow(consoleWindow, SW_SHOW);
+ fShowConsole = TRUE;
+ #ifndef NO_PREFERENCES
+ CheckMenuItem(vmPrefsMenu, 0x0030, MF_BYCOMMAND | MF_CHECKED);
+ #endif
+ OutputConsoleString(
+ "# Debug console\n"
+ "# To close: F2 -> 'debug options' -> 'show output console'\n"
+ "# To disable: F2 -> 'debug options' -> 'show console on errors'\n"
+ );
+ }
pos = SendMessage(consoleWindow,WM_GETTEXTLENGTH, 0,0);
SendMessage(consoleWindow, EM_SETSEL, pos, pos);
***************
*** 154,166 ****
string++;
}
- /* something has been written in the console */
- if(fDynamicConsole)
- {
- ShowWindow(consoleWindow, SW_SHOW);
- fShowConsole = TRUE;
- #ifndef NO_PREFERENCES
- CheckMenuItem(vmPrefsMenu, 0x0030, MF_BYCOMMAND | MF_CHECKED);
- #endif
- }
return 1;
}
--- 168,171 ----
***************
*** 465,471 ****
--- 470,481 ----
}
+ extern int inCleanExit;
+
void __cdecl Cleanup(void)
{ /* not all of these are essential, but they're polite... */
+ if(!inCleanExit) {
+ printCallStack();
+ }
ioShutdownAllModules();
#ifndef NO_PLUGIN_SUPPORT
Index: sqWin32PluginSupport.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32PluginSupport.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqWin32PluginSupport.c 24 Oct 2001 23:14:28 -0000 1.1.1.1
--- sqWin32PluginSupport.c 4 May 2002 23:20:28 -0000 1.2
***************
*** 1,7 ****
-
/* Plugin support primitives */
#include <windows.h>
#include "sq.h"
! #include "FilePlugin.h"
#ifdef DEBUG
--- 1,6 ----
/* Plugin support primitives */
#include <windows.h>
#include "sq.h"
! #include "../plugins/FilePlugin/FilePlugin.h"
#ifdef DEBUG
Index: sqWin32Prefs.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Prefs.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
Index: sqWin32Service.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Service.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Index: sqWin32Utils.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Utils.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
Index: sqWin32Window.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Window.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqWin32Window.c 6 Mar 2002 10:32:21 -0000 1.3
--- sqWin32Window.c 4 May 2002 23:20:28 -0000 1.4
***************
*** 444,447 ****
--- 444,455 ----
static DWORD dwTimerPeriod;
+ static DWORD timerID;
+ int _lowResMSecs = 0;
+
+ void CALLBACK timerCallback(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) {
+ _lowResMSecs++;
+ interruptCheckCounter = 0;
+ }
+
#include <mmsystem.h>
void SetupTimer()
***************
*** 458,461 ****
--- 466,473 ----
if(timeBeginPeriod(dwTimerPeriod) != 0)
return;
+ timerID = timeSetEvent(dwTimerPeriod, 0,
+ timerCallback, 0,
+ TIME_PERIODIC |
+ TIME_CALLBACK_FUNCTION);
#endif /* defined(_WIN32_WCE) */
}
***************
*** 464,467 ****
--- 476,480 ----
{
#if !defined(_WIN32_WCE)
+ timeKillEvent(timerID);
timeEndPeriod(dwTimerPeriod);
#endif /* !defined(_WIN32_WCE) */
***************
*** 769,772 ****
--- 782,786 ----
{ RECT r;
int width, height, maxWidth, maxHeight, actualWidth, actualHeight;
+ int deltaWidth, deltaHeight;
if(!IsWindow(stWindow)) return; /* might happen if run as NT service */
***************
*** 806,813 ****
actualWidth = r.right - r.left;
actualHeight = r.bottom - r.top;
! width += (width - actualWidth);
! height += (height - actualHeight);
! width = ( width <= maxWidth) ? width : maxWidth;
! height = (height <= maxHeight) ? height : maxHeight;
SetWindowPos(stWindow,
--- 820,832 ----
actualWidth = r.right - r.left;
actualHeight = r.bottom - r.top;
! /* deltaWidth/height contains the 'decoration' of the window */
! deltaWidth = width - actualWidth;
! deltaHeight = height - actualHeight;
! width += deltaWidth;
! height += deltaHeight;
! width = (width <= (maxWidth + deltaWidth)) ?
! width : (maxWidth + deltaWidth);
! height = (height <= (maxHeight + deltaHeight)) ?
! height : (maxHeight + deltaHeight);
SetWindowPos(stWindow,
***************
*** 916,924 ****
blue = yellow = 0;
} else if(f3ButtonMouse) {
- blue = msg->wParam & MK_RBUTTON;
- yellow = msg->wParam & MK_MBUTTON;
- } else {
blue = msg->wParam & MK_MBUTTON;
yellow = msg->wParam & MK_RBUTTON;
}
if(red && !blue && !yellow) { /* red button honors modifiers */
--- 935,943 ----
blue = yellow = 0;
} else if(f3ButtonMouse) {
blue = msg->wParam & MK_MBUTTON;
yellow = msg->wParam & MK_RBUTTON;
+ } else {
+ blue = msg->wParam & MK_RBUTTON;
+ yellow = msg->wParam & MK_MBUTTON;
}
if(red && !blue && !yellow) { /* red button honors modifiers */
***************
*** 1258,1264 ****
--- 1277,1285 ----
/* Misc support primitves */
/****************************************************************************/
+ int inCleanExit = 0;
int ioExit(void)
{
+ inCleanExit = 1;
exit(0);
/* avoid the warnings here */
***************
*** 1275,1279 ****
--- 1296,1304 ----
{
/* Make sure the value fits into Squeak SmallIntegers */
+ #ifndef _WIN32_WCE
+ return timeGetTime() & 0x3FFFFFFF;
+ #else
return GetTickCount() &0x3FFFFFFF;
+ #endif
}
***************
*** 1973,1981 ****
After resizing the main window the affected area can
be larger than the area covered by the display bits ... */
! if (affectedR > width) affectedR= width;
! if (affectedB > height) affectedB= height;
/* ... and don't forget left and top - else reverse_image_* will crash */
! if (affectedL > width) affectedL= width;
! if (affectedT > height) affectedT= height;
/* Don't draw empty areas */
--- 1998,2006 ----
After resizing the main window the affected area can
be larger than the area covered by the display bits ... */
! if (affectedR > width) affectedR= width-1;
! if (affectedB > height) affectedB= height-1;
/* ... and don't forget left and top - else reverse_image_* will crash */
! if (affectedL > width) affectedL= width-1;
! if (affectedT > height) affectedT= height-1;
/* Don't draw empty areas */
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SqueakFFIPrims
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/SqueakFFIPrims
Added Files:
sqWin32FFI.c
Log Message:
Update to 3.2.1
--- NEW FILE: sqWin32FFI.c ---
/****************************************************************************
* PROJECT: Squeak foreign function interface
* FILE: sqWin32FFI.c
* CONTENT: Win32 support for the foreign function interface
*
* AUTHOR: Andreas Raab (ar)
* ADDRESS: Walt Disney Imagineering, Glendale, CA
* EMAIL: and...@wd...
* RCSID: $Id: sqWin32FFI.c,v 1.1 2002/05/04 23:20:28 andreasraab Exp $
*
* NOTES:
*
*****************************************************************************/
#include "sq.h"
#include "sqFFI.h"
extern struct VirtualMachine *interpreterProxy;
#define primitiveFail() interpreterProxy->primitiveFail();
#ifdef _MSC_VER
#define LONGLONG __int64
#endif
#ifdef __GNUC__
#define LONGLONG long long int
#endif
/* Max stack size */
#define FFI_MAX_ARGS 128
/* The stack used to assemble the arguments for a call */
static int ffiArgs[FFI_MAX_ARGS];
/* The stack pointer while filling the stack */
static int ffiArgIndex = 0;
/* The area for temporarily allocated strings */
static char *ffiTempStrings[FFI_MAX_ARGS];
/* The number of temporarily allocated strings */
static int ffiTempStringCount = 0;
/* The return values for calls */
volatile static int intReturnValue;
volatile static int intReturnValue2;
volatile static double floatReturnValue;
static void* structReturnValue;
#define ARG_CHECK() if(ffiArgIndex >= FFI_MAX_ARGS) return primitiveFail();
#define ARG_PUSH(value) { ARG_CHECK(); ffiArgs[ffiArgIndex++] = value; }
/*****************************************************************************/
/*****************************************************************************/
/* ffiInitialize:
Announce that the VM is about to do an external function call. */
int ffiInitialize(void)
{
ffiArgIndex = 0;
ffiTempStringCount = 0;
return 1;
}
/* ffiSupportsCallingConvention:
Return true if the support code supports the given calling convention. */
int ffiSupportsCallingConvention(int callType)
{
if(callType == FFICallTypeCDecl) return 1;
if(callType == FFICallTypeApi) return 1;
return 0;
}
int ffiAlloc(int byteSize)
{
return (int) malloc(byteSize);
}
int ffiFree(int ptr)
{
if(ptr) free((void*)ptr);
return 1;
}
/*****************************************************************************/
/*****************************************************************************/
int ffiPushSignedChar(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushUnsignedChar(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushSignedByte(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushUnsignedByte(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushSignedShort(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushUnsignedShort(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushSignedInt(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushUnsignedInt(int value)
{
ARG_PUSH(value);
return 1;
}
int ffiPushSignedLongLong(int lowWord, int highWord)
{
ARG_PUSH(lowWord);
ARG_PUSH(highWord);
return 1;
}
int ffiPushUnsignedLongLong(int lowWord, int highWord)
{
ARG_PUSH(lowWord);
ARG_PUSH(highWord);
return 1;
}
int ffiPushSingleFloat(double value)
{
float floatValue;
floatValue = (float) value;
ARG_PUSH(*(int*)(&floatValue));
return 1;
}
int ffiPushDoubleFloat(double value)
{
ARG_PUSH(((int*)(&value))[0]);
ARG_PUSH(((int*)(&value))[1]);
return 1;
}
int ffiPushStructureOfLength(int pointer, int* structSpec, int structSize)
{
int nItems, i;
nItems = ((*structSpec & FFIStructSizeMask) + 3) / 4;
if(pointer == 0)
return primitiveFail();
for(i=0; i < nItems;i++)
ARG_PUSH(((int*)pointer)[i]);
return 1;
}
int ffiPushPointer(int pointer)
{
ARG_PUSH(pointer);
return 1;
}
int ffiPushStringOfLength(int srcIndex, int length)
{
char *ptr;
ARG_CHECK(); /* fail before allocating */
ptr = (char*) malloc(length+1);
if(!ptr) return primitiveFail();
memcpy(ptr, (void*)srcIndex, length);
ptr[length] = 0;
ffiTempStrings[ffiTempStringCount++] = ptr;
ARG_PUSH((int)ptr);
return 1;
}
/*****************************************************************************/
/*****************************************************************************/
/* ffiCanReturn:
Return true if the support code can return the given type. */
int ffiCanReturn(int *structSpec, int specSize)
{
int header = *structSpec;
if(header & FFIFlagPointer) return 1;
if(header & FFIFlagStructure) {
int structSize = header & FFIStructSizeMask;
if(structSize > 8) {
structReturnValue = malloc(structSize);
if(!structReturnValue) return 0;
ARG_PUSH((int)structReturnValue);
}
}
return 1;
}
/* ffiReturnFloatValue:
Return the value from a previous ffi call with float return type. */
double ffiReturnFloatValue(void)
{
return floatReturnValue;
}
/* ffiLongLongResultLow:
Return the low 32bit from the 64bit result of a call to an external function */
int ffiLongLongResultLow(void)
{
return intReturnValue;
}
/* ffiLongLongResultHigh:
Return the high 32bit from the 64bit result of a call to an external function */
int ffiLongLongResultHigh(void)
{
return intReturnValue2;
}
/* ffiStoreStructure:
Store the structure result of a previous ffi call into the given address.
Note: Since the ST allocator always allocates multiples of 32bit we can
use the atomic types for storing <= 64bit result structures. */
int ffiStoreStructure(int address, int structSize)
{
if(structSize <= 4) {
*(int*)address = intReturnValue;
return 1;
}
if(structSize <= 8) {
*(int*)address = intReturnValue;
*(int*)(address+4) = intReturnValue2;
return 1;
}
/* assume pointer to hidden structure */
memcpy((void*)address, (void*) structReturnValue, structSize);
return 1;
}
/* ffiCleanup:
Cleanup after a foreign function call has completed. */
int ffiCleanup(void)
{
int i;
for(i=0; i<ffiTempStringCount; i++)
free(ffiTempStrings[i]);
ffiTempStringCount = 0;
if(structReturnValue) {
free(structReturnValue);
structReturnValue = NULL;
}
return 1;
}
/*****************************************************************************/
/*****************************************************************************/
int oldSP;
int oldBP;
int newSP;
int newBP;
/* ffiCallAddress:
Perform the actual function call. */
int ffiCallAddress(int fn)
{
{
FILE *f = fopen("ffi.log","at");
fprintf(f, "%x",fn);
fflush(f);
fclose(f);
}
#ifdef _MSC_VER
__asm {
push ebx
mov ebx, fn
push ecx
push edx
push edi
push esi
push ebp
/* mark the frame */
mov ebp, esp
/* alloca() ffiStackIndex size bytes */
mov ecx, ffiArgIndex
shl ecx, 2
sub esp, ecx
/* copy stack */
mov edi, esp
lea esi, ffiArgs
shr ecx, 2
cld
rep movsd
/* go calling */
call ebx
/* restore frame */
mov esp, ebp
/* store the return values */
mov intReturnValue, eax
mov intReturnValue2, edx
fstp floatReturnValue
/* restore register values */
pop ebp
pop esi
pop edi
pop edx
pop ecx
pop ebx
/* done */
}
#endif
#ifdef __GNUC__
asm("
movl %%ebp, _oldBP
movl %%esp, _oldSP
pushl %%ebx;
pushl %%ecx;
pushl %%edx;
pushl %%edi;
pushl %%esi;
pushl %%ebp;
/* mark the frame */
movl %%esp, %%ebp
/* alloca() ffiStackIndex size bytes */
movl _ffiArgIndex, %%ecx;
shll $2, %%ecx;
subl %%ecx, %%esp
/* copy stack */
movl %%esp, %%edi;
leal _ffiArgs, %%esi;
shrl $2, %%ecx;
cld;
rep movsl;
/* go calling */
call *%%ebx
/* restore frame */
movl %%ebp, %%esp
/* store the return values */
movl %%eax, _intReturnValue
movl %%edx, _intReturnValue2
fstpl _floatReturnValue
/* restore register values */
popl %%ebp
popl %%esi
popl %%edi
popl %%edx
popl %%ecx
popl %%ebx
movl %%ebp, _newBP
movl %%esp, _newSP
": /* no outputs */ : "ebx" (fn) : "eax" /* clobbered registers */);
/* done */
#endif
{
FILE *f = fopen("ffi.log","at");
fprintf(f, "...ok\n");
if(oldBP != newBP || oldSP != newSP) {
fprintf(f,"oldSP=%x, oldBP=%x\nnewSP=%x, newBP=%x\n",oldSP, oldBP,newSP,newBP);
}
fprintf(f,"SP=%x, BP=%x\n",newSP,newBP);
fflush(f);
fclose(f);
}
return intReturnValue;
}
int ffiCallAddressOfWithPointerReturn(int fn, int callType)
{
return ffiCallAddress(fn);
}
int ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)
{
return ffiCallAddress(fn);
}
int ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)
{
return ffiCallAddress(fn);
}
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
/************ Test functions for the foreign function interface **************/
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
#ifndef NO_FFI_TEST
typedef struct ffiTestPoint2 {
int x;
int y;
} ffiTestPoint2;
typedef struct ffiTestPoint4 {
int x;
int y;
int z;
int w;
} ffiTestPoint4;
#pragma export on
EXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4);
EXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4);
EXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4);
EXPORT(float) ffiTestFloats(float f1, float f2);
EXPORT(double) ffiTestDoubles(double d1, double d2);
EXPORT(char *) ffiPrintString(char *string);
EXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2);
EXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2);
EXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2);
EXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2);
#pragma export off
/* test passing characters */
EXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4) {
printf("4 characters came in as\nc1 = %c (%x)\nc2 = %c (%x)\nc3 = %c (%x)\nc4 = %c (%x)\n", c1, c1, c2, c2, c3, c3, c4, c4);
return c1+c2;
}
/* test passing shorts */
EXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4) {
printf("4 shorts came in as\ns1 = %d (%x)\ns2 = %d (%x)\ns3 = %d (%x)\ns4 = %d (%x)\n", c1, c1, c2, c2, c3, c3, c4, c4);
return c1+c2;
}
/* test passing ints */
EXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4) {
printf("4 ints came in as\ni1 = %d (%x)\ni2 = %d (%x)\ni3 = %d (%x)\ni4 = %d (%x)\n", c1, c1, c2, c2, c3, c3, c4, c4);
return c1+c2;
}
/* test passing and returning floats */
EXPORT(float) ffiTestFloats(float f1, float f2) {
printf("The two floats are %f and %f\n", f1, f2);
return (float) (f1 + f2);
}
/* test passing and returning doubles */
EXPORT(double) ffiTestDoubles(double d1, double d2) {
printf("The two floats are %f and %f\n", (float)d1, (float)d2);
return d1+d2;
}
/* test passing and returning strings */
EXPORT(char*) ffiPrintString(char *string) {
printf("%s\n", string);
return string;
}
/* test passing and returning 64bit structures */
EXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2) {
ffiTestPoint2 result;
printf("pt1.x = %d\npt1.y = %d\npt2.x = %d\npt2.y = %d\n",
pt1.x, pt1.y, pt2.x, pt2.y);
result.x = pt1.x + pt2.x;
result.y = pt1.y + pt2.y;
return result;
}
/* test passing and returning large structures */
EXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2) {
ffiTestPoint4 result;
printf("pt1.x = %d\npt1.y = %d\npt1.z = %d\npt1.w = %d\n",
pt1.x, pt1.y, pt1.z, pt1.w);
printf("pt2.x = %d\npt2.y = %d\npt2.z = %d\npt2.w = %d\n",
pt2.x, pt2.y, pt2.z, pt2.w);
result.x = pt1.x + pt2.x;
result.y = pt1.y + pt2.y;
result.z = pt1.z + pt2.z;
result.w = pt1.w + pt2.w;
return result;
}
/* test passing and returning pointers */
EXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2) {
ffiTestPoint4 *result;
printf("pt1.x = %d\npt1.y = %d\npt1.z = %d\npt1.w = %d\n",
pt1->x, pt1->y, pt1->z, pt1->w);
printf("pt2.x = %d\npt2.y = %d\npt2.z = %d\npt2.w = %d\n",
pt2->x, pt2->y, pt2->z, pt2->w);
result = (ffiTestPoint4*) malloc(sizeof(ffiTestPoint4));
result->x = pt1->x + pt2->x;
result->y = pt1->y + pt2->y;
result->z = pt1->z + pt2->z;
result->w = pt1->w + pt2->w;
return result;
}
/* test passing and returning longlongs */
EXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2) {
return i1 + i2;
}
#endif /* NO_FFI_TEST */
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SocketPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/SocketPlugin
Modified Files:
sqWin32NewNet.c
Log Message:
Update to 3.2.1
Index: sqWin32NewNet.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqWin32NewNet.c 24 Oct 2001 23:14:25 -0000 1.1.1.1
--- sqWin32NewNet.c 4 May 2002 23:20:28 -0000 1.2
***************
*** 139,142 ****
--- 139,145 ----
#define ADDRESS(s) ((struct sockaddr_in*)(&PSP(s)->peer))
+ extern struct VirtualMachine *interpreterProxy;
+ #define FAIL() interpreterProxy->primitiveFail()
+
#define LOCKSOCKET(mutex, duration) \
if(WaitForSingleObject(mutex, duration) == WAIT_FAILED)\
***************
*** 189,192 ****
--- 192,196 ----
}
}
+
/* cleanupSocket:
Clean up the private socket structure and associated elements.
***************
*** 220,223 ****
--- 224,228 ----
setsockopt(temp->s, SOL_SOCKET, SO_LINGER, (char*)&l, sizeof(l));
closesocket(temp->s);
+ temp->s = NULL;
GlobalFree(GlobalHandle(temp));
}
***************
*** 247,250 ****
--- 252,256 ----
ioctlsocket(newSocket,FIONBIO,&zero);
closesocket(pss->s);
+ pss->s = 0;
/* Disable TCP delays */
setsockopt(newSocket, IPPROTO_TCP, TCP_NODELAY, (char*) &one, sizeof(one));
***************
*** 440,443 ****
--- 446,450 ----
pss->sockState = ThisEndClosed;
pss->readWatcherOp = 0; /* since a close succeeded */
+ pss->s = NULL;
doWait = 1;
break;
***************
*** 512,515 ****
--- 519,523 ----
} else {
/* get socket error */
+ /* printf("ERROR: %d\n", WSAGetLastError()); */
errSize = sizeof(pss->sockError);
getsockopt(pss->s, SOL_SOCKET, SO_ERROR, (char*)&pss->sockError, &errSize);
***************
*** 717,721 ****
return true;
} else {
! success(false);
return false;
}
--- 725,729 ----
return true;
} else {
! FAIL();
return false;
}
***************
*** 757,760 ****
--- 765,769 ----
}
} else {
+ pss->s = NULL;
pss->sockState = Unconnected;
}
***************
*** 768,771 ****
--- 777,781 ----
setsockopt(temp->s, SOL_SOCKET, SO_LINGER, (char*)&l, sizeof(l));
closesocket(temp->s);
+ temp->s = 0;
GlobalFree(GlobalHandle(temp));
}
***************
*** 817,821 ****
err = WSAGetLastError();
if(err != WSAEWOULDBLOCK) {
! success(false);
return;
}
--- 827,831 ----
err = WSAGetLastError();
if(err != WSAEWOULDBLOCK) {
! FAIL();
return;
}
***************
*** 843,846 ****
--- 853,857 ----
void sqSocketListenOnPort(SocketPtr s, int port)
{
+ int result;
struct sockaddr_in addr;
privateSocketStruct *pss = PSP(s);
***************
*** 858,866 ****
} else { /* TCP */
/* show our willingness to accept a single incoming connection */
! listen(SOCKET(s), 1);
! /* Waiting for accept => Start read watcher */
! pss->sockState = WaitingForConnection;
! pss->readWatcherOp = WatchAcceptSingle;
! SetEvent(pss->hReadWatcherEvent);
}
}
--- 869,881 ----
} else { /* TCP */
/* show our willingness to accept a single incoming connection */
! result = listen(SOCKET(s), 1);
! if(result == SOCKET_ERROR) {
! FAIL();
! } else {
! /* Waiting for accept => Start read watcher */
! pss->sockState = WaitingForConnection;
! pss->readWatcherOp = WatchAcceptSingle;
! SetEvent(pss->hReadWatcherEvent);
! }
}
}
***************
*** 873,876 ****
--- 888,892 ----
void sqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize)
{
+ int result;
struct sockaddr_in addr;
privateSocketStruct *pss = PSP(s);
***************
*** 891,901 ****
bind( SOCKET(s), (struct sockaddr*) &addr, sizeof(struct sockaddr_in));
/* show our willingness to accept a backlogSize incoming connections */
! listen(SOCKET(s), backlogSize);
! LOCKSOCKET(pss->mutex, INFINITE);
! /* Waiting for accept => Start read watcher */
! pss->sockState = WaitingForConnection;
! pss->readWatcherOp = WatchAccept;
! SetEvent(pss->hReadWatcherEvent);
! UNLOCKSOCKET(pss->mutex);
}
--- 907,921 ----
bind( SOCKET(s), (struct sockaddr*) &addr, sizeof(struct sockaddr_in));
/* show our willingness to accept a backlogSize incoming connections */
! result = listen(SOCKET(s), backlogSize);
! if(result != SOCKET_ERROR) {
! LOCKSOCKET(pss->mutex, INFINITE);
! /* Waiting for accept => Start read watcher */
! pss->sockState = WaitingForConnection;
! pss->readWatcherOp = WatchAccept;
! SetEvent(pss->hReadWatcherEvent);
! UNLOCKSOCKET(pss->mutex);
! } else {
! FAIL();
! }
}
***************
*** 919,925 ****
else if(socketType == UDPSocketType)
newSocket = socket(AF_INET, SOCK_DGRAM, 0);
! else { success(false); return; }
if(newSocket == INVALID_SOCKET) {
! success(false);
return;
}
--- 939,945 ----
else if(socketType == UDPSocketType)
newSocket = socket(AF_INET, SOCK_DGRAM, 0);
! else { FAIL(); return; }
if(newSocket == INVALID_SOCKET) {
! FAIL();
return;
}
***************
*** 958,962 ****
/* Create a new mutex object for synchronized access */
pss->mutex = CreateMutex(NULL, 0,NULL);
! if(!pss->mutex) { success(false); return; }
/* Install the socket into the socket list */
--- 978,982 ----
/* Create a new mutex object for synchronized access */
pss->mutex = CreateMutex(NULL, 0,NULL);
! if(!pss->mutex) { FAIL(); return; }
/* Install the socket into the socket list */
***************
*** 972,976 ****
/* note: necessary cleanup is done from within createWatcherThreads */
s->privateSocketPtr = NULL; /* declare invalid */
! primitiveFail();
}
}
--- 992,996 ----
/* note: necessary cleanup is done from within createWatcherThreads */
s->privateSocketPtr = NULL; /* declare invalid */
! FAIL();
}
}
***************
*** 1005,1013 ****
if(!accepted) { /* something was wrong here */
! success(false);
return;
}
if(accepted->s == INVALID_SOCKET) {
! success(false);
return;
}
--- 1025,1033 ----
if(!accepted) { /* something was wrong here */
! FAIL();
return;
}
if(accepted->s == INVALID_SOCKET) {
! FAIL();
return;
}
***************
*** 1033,1037 ****
/* Create a new mutex object for synchronized access */
pss->mutex = CreateMutex(NULL, 0,NULL);
! if(!pss->mutex) { success(false); return; }
/* Install the socket into the socket list */
--- 1053,1057 ----
/* Create a new mutex object for synchronized access */
pss->mutex = CreateMutex(NULL, 0,NULL);
! if(!pss->mutex) { FAIL(); return; }
/* Install the socket into the socket list */
***************
*** 1045,1049 ****
/* note: necessary cleanup is done from within createWatcherThreads */
s->privateSocketPtr = NULL; /* declare invalid */
! primitiveFail();
}
--- 1065,1069 ----
/* note: necessary cleanup is done from within createWatcherThreads */
s->privateSocketPtr = NULL; /* declare invalid */
! FAIL();
}
***************
*** 1128,1138 ****
/* Guard eventual writes to socket state */
LOCKSOCKET(pss->mutex, INFINITE)
! if(result == 0)
! pss->sockState = OtherEndClosed;
! else if(result < 0) {
! int err = WSAGetLastError();
! if(err == WSAECONNRESET) /* connection reset by peer */
pss->sockState = OtherEndClosed;
! else if(err == WSAEWOULDBLOCK) {
/* no data available -> wake up read watcher */
pss->sockState &= ~SOCK_DATA_READABLE;
--- 1148,1158 ----
/* Guard eventual writes to socket state */
LOCKSOCKET(pss->mutex, INFINITE)
! if(result == 0) {
! /* UDP doesn't know "other end closed" state */
! if(pss->sockType != UDPSocketType)
pss->sockState = OtherEndClosed;
! } else if(result < 0) {
! int err = WSAGetLastError();
! if(err == WSAEWOULDBLOCK) {
/* no data available -> wake up read watcher */
pss->sockState &= ~SOCK_DATA_READABLE;
***************
*** 1140,1143 ****
--- 1160,1170 ----
SetEvent(pss->hReadWatcherEvent);
} else {
+ /* printf("ERROR: %d\n", err); */
+ /* NOTE: We consider all other errors to be fatal, e.g.,
+ report them as "other end closed". Looking at the
+ WSock documentation this ought to be correct. */
+ /* UDP doesn't know "other end closed" state */
+ if(pss->sockType != UDPSocketType)
+ pss->sockState = OtherEndClosed;
pss->sockError = err;
}
***************
*** 1196,1211 ****
/* Guard eventual writes to socket state */
LOCKSOCKET(pss->mutex, INFINITE)
! /***NOTE***NOTE***NOTE***NOTE***NOTE***
! It's clear that for a write result being
! equal to zero the other side must have
! closed down (since we're rejecting zero
! writes above) but nevertheless keep it
! in mind if you change the above...
! **************************************/
! if(result == SOCKET_ERROR) {
! int err = WSAGetLastError();
! if(err == WSAECONNRESET) /* connection reset by peer */
pss->sockState = OtherEndClosed;
! else if(err == WSAEWOULDBLOCK) {
/* no data available => wake up write watcher */
pss->sockState &= ~SOCK_DATA_WRITABLE;
--- 1223,1233 ----
/* Guard eventual writes to socket state */
LOCKSOCKET(pss->mutex, INFINITE)
! if(result == 0) {
! /* UDP doesn't know "other end closed" state */
! if(pss->sockType != UDPSocketType)
pss->sockState = OtherEndClosed;
! } else {
! int err = WSAGetLastError();
! if(err == WSAEWOULDBLOCK) {
/* no data available => wake up write watcher */
pss->sockState &= ~SOCK_DATA_WRITABLE;
***************
*** 1213,1216 ****
--- 1235,1245 ----
SetEvent(pss->hWriteWatcherEvent);
} else {
+ /* printf("ERROR: %d\n", err); */
+ /* NOTE: We consider all other errors to be fatal, e.g.,
+ report them as "other end closed". Looking at the
+ WSock documentation this ought to be correct. */
+ /* UDP doesn't know "other end closed" state */
+ if(pss->sockType != UDPSocketType)
+ pss->sockState = OtherEndClosed;
pss->sockError = err;
}
***************
*** 1306,1310 ****
int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)
{
! primitiveFail();
}
--- 1335,1339 ----
int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)
{
! FAIL();
}
***************
*** 1313,1327 ****
int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)
{
! primitiveFail();
}
int sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, int buf, int bufSize, int *address, int *port, int *moreFlag)
{
! return primitiveFail();
}
int sqSockettoHostportSendDataBufCount(SocketPtr s, int address, int port, int buf, int bufSize)
{
! return primitiveFail();
}
--- 1342,1356 ----
int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)
{
! FAIL();
}
int sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, int buf, int bufSize, int *address, int *port, int *moreFlag)
{
! return FAIL();
}
int sqSockettoHostportSendDataBufCount(SocketPtr s, int address, int port, int buf, int bufSize)
{
! return FAIL();
}
***************
*** 1329,1333 ****
SocketPtr s,int optionName, int optionNameSize, int optionValue, int optionValueSize, int *result)
{
! return primitiveFail();
}
--- 1358,1362 ----
SocketPtr s,int optionName, int optionNameSize, int optionValue, int optionValueSize, int *result)
{
! return FAIL();
}
***************
*** 1335,1339 ****
SocketPtr s,int optionName, int optionNameSize, int *result)
{
! return primitiveFail();
}
--- 1364,1368 ----
SocketPtr s,int optionName, int optionNameSize, int *result)
{
! return FAIL();
}
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/FilePlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/FilePlugin
Modified Files:
sqWin32FilePrims.c
Log Message:
Update to 3.2.1
Index: sqWin32FilePrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqWin32FilePrims.c 28 Jan 2002 13:56:59 -0000 1.3
--- sqWin32FilePrims.c 4 May 2002 23:20:27 -0000 1.4
***************
*** 51,54 ****
--- 51,58 ----
extern unsigned char *memory;
+ int sqFileThisSession(void) {
+ return thisSession;
+ }
+
int sqFileAtEnd(SQFile *f) {
/* Return true if the file's read/write head is at the end of the file. */
***************
*** 215,222 ****
}
return (int) dwReallyWritten;
- }
-
- int sqFileThisSession() {
- return thisSession;
}
--- 219,222 ----
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SoundPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/SoundPlugin
Modified Files:
sqWin32Sound.c
Log Message:
Update to 3.2.1
Index: sqWin32Sound.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/SoundPlugin/sqWin32Sound.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqWin32Sound.c 28 Jan 2002 13:56:59 -0000 1.3
--- sqWin32Sound.c 4 May 2002 23:20:28 -0000 1.4
***************
*** 79,82 ****
--- 79,83 ----
int dx_soundShutdown(void) {
+ DPRINTF(("dx_soundShutDown\n"));
dx_snd_StopPlaying();
dx_snd_StopRecording();
***************
*** 121,124 ****
--- 122,126 ----
if(playTerminate) {
hPlayThread = NULL;
+ DPRINTF(("playCallback shutdown\n"));
dx_snd_StopPlaying();
return 0; /* done playing */
***************
*** 383,387 ****
int dx_snd_Stop(void) {
! playTerminate = 1;
return 1;
}
--- 385,389 ----
int dx_snd_Stop(void) {
! dx_snd_StopPlaying();
return 1;
}
***************
*** 441,445 ****
/* round up the size of the record buffers to multiple of 16 bytes*/
bytesPerFrame = stereo ? 4 : 2;
! recBufferSize = ((bytesPerFrame * 4096) / 16) * 16;
/* create the secondary sound buffer */
--- 443,447 ----
/* round up the size of the record buffers to multiple of 16 bytes*/
bytesPerFrame = stereo ? 4 : 2;
! recBufferSize = ((bytesPerFrame * 1024) / 16) * 16;
/* create the secondary sound buffer */
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SerialPlugin In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/SerialPlugin Modified Files: sqWin32SerialPort.c Log Message: Update to 3.2.1 Index: sqWin32SerialPort.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 |
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/UUIDPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/UUIDPlugin
Added Files:
sqWin32UUID.c
Log Message:
Update to 3.2.1
--- NEW FILE: sqWin32UUID.c ---
/****************************************************************************
* PROJECT: Squeak port for Win32 (NT / Win95)
* FILE: sqWin32UUID.c
* CONTENT: UUID support
*
* AUTHOR: Andreas Raab (ar)
* ADDRESS:
* EMAIL: And...@gm...
* RCSID: $Id: sqWin32UUID.c,v 1.1 2002/05/04 23:20:28 andreasraab Exp $
*
* NOTES:
*****************************************************************************/
#include <windows.h>
#include <ole2.h>
#include "sq.h"
int sqUUIDInit(void) {
return 1;
}
int sqUUIDShutdown(void) {
return 1;
}
int MakeUUID(char *location) {
if(CoCreateGuid((GUID*)location) == S_OK) return 1;
primitiveFail();
return 0;
}
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/JoystickTabletPlugin In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/JoystickTabletPlugin Modified Files: sqWin32Joystick.c Log Message: Update to 3.2.1 Index: sqWin32Joystick.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/JoystickTabletPlugin/sqWin32Joystick.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 |
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/misc In directory usw-pr-cvs1:/tmp/cvs-serv7733/misc Modified Files: Makefile.mingw32 Log Message: Update to 3.2.1 Index: Makefile.mingw32 =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/misc/Makefile.mingw32,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.mingw32 19 Jan 2002 19:39:26 -0000 1.1 --- Makefile.mingw32 4 May 2002 23:20:27 -0000 1.2 *************** *** 2,11 **** # Makefile for Win32 Squeak using gcc-2.95.2 and MingW32 ############################################################################# ############################################################################# # Default locations # SRCDIR= . ! BLDDIR= build ############################################################################# --- 2,29 ---- # Makefile for Win32 Squeak using gcc-2.95.2 and MingW32 ############################################################################# + ifndef SRCDIR + include plugins/plugins.ext + include plugins/plugins.int + + INTERNAL_LIBS = $(addsuffix .lib, $(INTERNAL_PLUGINS)) + EXTERNAL_LIBS = $(addsuffix .dll, $(EXTERNAL_PLUGINS)) + endif + + + AR = ar rc + CP = copy + RM = del ############################################################################# # Default locations # + ifndef SRCDIR SRCDIR= . ! endif ! BLDDIR= $(SRCDIR)/release ! ! ifndef OBJDIR ! OBJDIR= $(BLDDIR) ! endif ############################################################################# *************** *** 32,35 **** --- 50,56 ---- VMOBJ:= $(filter-out interp.o sqFilePrims.o, $(VMOBJ)) + LIBSRC = $(wildcard *.c) + LIBOBJ = $(LIBSRC:.c=.o) + .PRECIOUS: gnu-interp.c #BBCopy-i386.cc *************** *** 79,84 **** #-DUSE_DIB_SECTIONS #-DPROFILE ! XDEFS= ! INCS= -I. -I$(SRCDIR) -I$(VMDIR) -I$(DXDIR) -I$(DLLDIR)/FilePlugin -I$(DLLDIR)/SocketPlugin $(XINC) MD= mkdir --- 100,105 ---- #-DUSE_DIB_SECTIONS #-DPROFILE ! XDEFS= -DSQUEAK_BUILTIN_PLUGIN ! INCS= -I. -I$(SRCDIR) -I$(SRCDIR)/plugins -I$(VMDIR) -I$(DXDIR) -I$(DLLDIR)/FilePlugin -I$(DLLDIR)/SocketPlugin $(XINC) MD= mkdir *************** *** 122,126 **** .SUFFIXES: .ccg .cc .c .o .s .i .rc .res .cg .hg .ccg ! all: $(VM) $(PLUGINS) ############################################################################# --- 143,147 ---- .SUFFIXES: .ccg .cc .c .o .s .i .rc .res .cg .hg .ccg ! all: $(VM) $(EXTERNAL_LIBS) ############################################################################# *************** *** 129,135 **** # Mpeg3Plugin.o sqOpenGLRenderer.o sqWin32FilePrims.o ! $(VM): $(ALLOBJ) $(VMEXP) resource.o ! $(MD) $(VMOUTDIR) ! $(LD) $(LDFLAGS) -o $(VMOUTDIR)/$(VM) $(addprefix $(VMOUTDIR)/,$(ALLOBJ)) $(VMOUTDIR)/$(VMEXP) $(VMOUTDIR)/resource.o $(LIBS) strip --strip-all $(VMOUTDIR)/$(VM) --- 150,155 ---- # Mpeg3Plugin.o sqOpenGLRenderer.o sqWin32FilePrims.o ! $(VM): $(ALLOBJ) $(INTERNAL_LIBS) $(VMEXP) resource.o ! $(LD) $(LDFLAGS) -o $(VMOUTDIR)/$(VM) $(addprefix $(VMOUTDIR)/,$(ALLOBJ)) $(VMOUTDIR)/$(VMEXP) $(VMOUTDIR)/resource.o $(addprefix $(VMOUTDIR)/,$(INTERNAL_LIBS)) $(LIBS) strip --strip-all $(VMOUTDIR)/$(VM) *************** *** 146,157 **** assureReleaseDir: ! $(MD) Release - %.dll: assureReleaseDir - $(MD) Release\\$* - $(MAKE) -C ../$* -f ../win32/Makefile.mingw32 DLLDIR=$* DLLNAME=$*.dll DLL XDEFS=-DSTANDALONE - $(DLLTOOL) --output-def $(OUTDIR)/$*/$*.def --output-exp $(OUTDIR)/$*/$*.exp --output-lib $(OUTDIR)/$*/$*.lib $(OUTDIR)/$*/*.o - $(DLLWRAP) -mwindows -def $(OUTDIR)/$*/$*.def -o $(OUTDIR)/$*.dll $(LIBS) $(OUTDIR)/$*/*.o $(OUTDIR)/$*/$*.exp - strip --strip-all $(OUTDIR)/$*.dll ############################################################################# --- 166,208 ---- assureReleaseDir: ! -$(MD) release ! ! #%.dll: assureReleaseDir ! # -$(MD) Release\\$* ! # $(MAKE) -C ../$* -f ../win32/Makefile.mingw32 DLLDIR=$* DLLNAME=$*.dll DLL XDEFS=-DSTANDALONE ! # $(DLLTOOL) --output-def $(OUTDIR)/$*/$*.def --output-exp $(OUTDIR)/$*/$*.exp --output-lib $(OUTDIR)/$*/$*.lib $(OUTDIR)/$*/*.o ! # $(DLLWRAP) -mwindows -def $(OUTDIR)/$*/$*.def -o $(OUTDIR)/$*.dll $(LIBS) $(OUTDIR)/$*/*.o $(OUTDIR)/$*/$*.exp ! # strip --strip-all $(OUTDIR)/$*.dll ! ! ! makelib: $(LIBOBJ) ! $(AR) $(LIB) $(LIBOBJ) ! $(RM) $(LIBOBJ) ! ! makedll: $(LIBOBJ) ! $(DLLTOOL) \ ! --output-def $(OBJDIR)/$(LIB).def \ ! --output-exp $(OBJDIR)/$(LIB).exp \ ! --output-lib $(OBJDIR)/$(LIB).lib \ ! $(LIBOBJ) ! $(DLLWRAP) -mwindows \ ! -def $(OBJDIR)/$(LIB).def \ ! -o $(OBJDIR)/$(LIB).dll \ ! $(LIBS) \ ! $(OBJDIR)/$(LIB).exp \ ! $(LIBOBJ) ! strip --strip-all $(OBJDIR)/$(LIB).dll ! $(RM) $(LIBOBJ) $(LIB).lib $(LIB).exp $(LIB).def ! ! %.lib: ! @$(MAKE) -C plugins/$* -f ../../Makefile.mingw32 SRCDIR=../../ LIB=$*.lib OBJDIR=. XDEFS=-DSQUEAK_BUILTIN_PLUGIN makelib ! $(CP) plugins\$*\$*.lib release\$*.lib ! $(RM) plugins\$*\$*.lib ! ! %.dll: ! @$(MAKE) -C plugins/$* -f ../../Makefile.mingw32 SRCDIR=../../ LIB=$* OBJDIR=. XDEFS=-DNIX makedll ! $(CP) plugins\$*\$*.dll release\$*.dll ! $(RM) plugins\$*\$*.dll ############################################################################# *************** *** 160,173 **** Mpeg%.o: - $(MD) $(VMOUTDIR) $(CC) -o $(VMOUTDIR)/$@ $(CFLAGS) -I$(VMDIR)/libmpeg -I$(DLLDIR)/Mpeg3Plugin -I$(VMDIR)/libmpeg/audio -I$(VMDIR)/libmpeg/video $(INCS) $(DEFS) -c $< .c.o: ! $(MD) $(VMOUTDIR) ! $(CC) -o $(VMOUTDIR)/$@ $(CFLAGS) $(INCS) $(DEFS) -c $< .cc.o: ! $(MD) $(VMOUTDIR) ! $(CXX) -o $(VMOUTDIR)/$@ $(CXXFLAGS) $(INCS) $(DEFS) -c $< .c.s: --- 211,221 ---- Mpeg%.o: $(CC) -o $(VMOUTDIR)/$@ $(CFLAGS) -I$(VMDIR)/libmpeg -I$(DLLDIR)/Mpeg3Plugin -I$(VMDIR)/libmpeg/audio -I$(VMDIR)/libmpeg/video $(INCS) $(DEFS) -c $< .c.o: ! $(CC) -o $(OBJDIR)/$@ $(CFLAGS) $(INCS) $(DEFS) -c $< .cc.o: ! $(CXX) -o $(OBJDIR)/$@ $(CXXFLAGS) $(INCS) $(DEFS) -c $< .c.s: *************** *** 184,193 **** .rc.res: ! $(MD) $(VMOUTDIR) ! $(RC) $(RCFLAGS) -i $< -o $(VMOUTDIR)/$@ resource.o: $(VMRES) ! $(MD) $(VMOUTDIR) ! $(RC) $(RCFLAGS) -i $(VMOUTDIR)/$< -o $(VMOUTDIR)/$@ .cg.c: --- 232,239 ---- .rc.res: ! $(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@ resource.o: $(VMRES) ! $(RC) $(RCFLAGS) -i $(OBJDIR)/$< -o $(OBJDIR)/$@ .cg.c: |
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/MIDIPlugin In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/MIDIPlugin Modified Files: sqWin32MIDI.c Log Message: Update to 3.2.1 Index: sqWin32MIDI.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 |
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:31
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/B3DAcceleratorPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/B3DAcceleratorPlugin
Modified Files:
sqWin32D3D.c sqWin32OpenGL.c sqWin32OpenGL.h
Log Message:
Update to 3.2.1
Index: sqWin32D3D.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32D3D.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqWin32D3D.c 28 Jan 2002 13:56:58 -0000 1.3
--- sqWin32D3D.c 4 May 2002 23:20:27 -0000 1.4
***************
*** 28,32 ****
#include "sqConfig.h"
#include "sqPlatformSpecific.h"
! #include "SurfacePlugin.h"
#include "B3DAcceleratorPlugin.h"
--- 28,32 ----
#include "sqConfig.h"
#include "sqPlatformSpecific.h"
! #include "../SurfacePlugin/SurfacePlugin.h"
#include "B3DAcceleratorPlugin.h"
Index: sqWin32OpenGL.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32OpenGL.c 28 Jan 2002 13:56:58 -0000 1.2
--- sqWin32OpenGL.c 4 May 2002 23:20:27 -0000 1.3
***************
*** 299,303 ****
if(pfd.iLayerType != PFD_MAIN_PLANE)
continue; /* overlay/underlay */
!
if((pfd.dwFlags & PFD_GENERIC_FORMAT) == 0) {
/* This indicates an accellerated driver */
--- 299,315 ----
if(pfd.iLayerType != PFD_MAIN_PLANE)
continue; /* overlay/underlay */
! #ifdef TEA
! #warning "**************************************************************"
! #warning "**************************************************************"
! #warning "**************************************************************"
! #warning
! #warning "TEA: Stencil buffer required"
! #warning
! #warning "**************************************************************"
! #warning "**************************************************************"
! #warning "**************************************************************"
! if(pfd.cStencilBits < 8)
! continue; /* need stencil bits */
! #endif
if((pfd.dwFlags & PFD_GENERIC_FORMAT) == 0) {
/* This indicates an accellerated driver */
Index: sqWin32OpenGL.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32OpenGL.h 20 Jan 2002 19:21:51 -0000 1.2
--- sqWin32OpenGL.h 4 May 2002 23:20:27 -0000 1.3
***************
*** 4,9 ****
#define MAX_RENDERER 16
- #include <GL/gh.h>
-
typedef struct glRenderer {
GLint bufferRect[4];
--- 4,7 ----
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:30
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/DropPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/DropPlugin
Added Files:
sqWin32Drop.c
Log Message:
Update to 3.2.1
--- NEW FILE: sqWin32Drop.c ---
/****************************************************************************
* PROJECT: Squeak port for Win32 (NT / Win95)
* FILE: sqWin32Drop.c
* CONTENT: Drag and Drop support from Windows
*
* AUTHOR: Andreas Raab (ar)
* ADDRESS: Walt Disney Imagineering, Glendale, CA
* EMAIL: And...@di...
* RCSID: $Id: sqWin32Drop.c,v 1.1 2002/05/04 23:20:27 andreasraab Exp $
*
* NOTES:
*****************************************************************************/
#include <windows.h>
#include <ole2.h>
#include "sq.h"
extern struct VirtualMachine *interpreterProxy;
extern HWND stWindow;
#if 0
#define DPRINTF(x) printf x
#else
#define DPRINTF(x)
#endif
int sqSecFileAccessCallback(void *function) {
#warning "REMOVE THIS NONSENSE"
#warning "REMOVE THIS NONSENSE"
#warning "REMOVE THIS NONSENSE"
#warning "REMOVE THIS NONSENSE"
#warning "REMOVE THIS NONSENSE"
return 0;
}
/***************************************************************************/
/***************************************************************************/
/* File writing helpers */
/***************************************************************************/
/***************************************************************************/
#define BFT_BITMAP 0x4d42 /* 'BM' */
#define SIZEOF_BITMAPFILEHEADER_PACKED ( \
sizeof(WORD) + /* bfType */ \
sizeof(DWORD) + /* bfSize */ \
sizeof(WORD) + /* bfReserved1 */ \
sizeof(WORD) + /* bfReserved2 */ \
sizeof(DWORD)) /* bfOffBits */
/* Macro to determine to round off the given value to the closest byte */
#define WIDTHBYTES(i) ((i+31)/32*4)
WORD DibNumColors (VOID FAR * pv)
{
int bits;
LPBITMAPINFOHEADER lpbi;
LPBITMAPCOREHEADER lpbc;
lpbi = ((LPBITMAPINFOHEADER)pv);
lpbc = ((LPBITMAPCOREHEADER)pv);
if (lpbi->biSize != sizeof(BITMAPCOREHEADER)){
if (lpbi->biClrUsed != 0)
return (WORD)lpbi->biClrUsed;
bits = lpbi->biBitCount;
}
else
bits = lpbc->bcBitCount;
switch (bits){
case 1: return 2;
case 4: return 16;
case 8: return 256;
default: return 0;
}
}
WORD PaletteSize (VOID FAR * pv)
{
LPBITMAPINFOHEADER lpbi;
WORD NumColors;
lpbi = (LPBITMAPINFOHEADER)pv;
NumColors = DibNumColors(lpbi);
if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
return (WORD)(NumColors * sizeof(RGBTRIPLE));
else
return (WORD)(NumColors * sizeof(RGBQUAD));
}
HANDLE DibFromBitmap (
HBITMAP hbm,
DWORD biStyle,
WORD biBits,
HPALETTE hpal)
{
BITMAP bm;
BITMAPINFOHEADER bi;
BITMAPINFOHEADER FAR *lpbi;
DWORD dwLen;
HANDLE hdib;
HANDLE h;
HDC hdc;
if (!hbm)
return NULL;
if (hpal == NULL)
hpal = GetStockObject(DEFAULT_PALETTE);
GetObject(hbm,sizeof(bm),(LPSTR)&bm);
if (biBits == 0) biBits = bm.bmPlanes * bm.bmBitsPixel;
if (biBits == 16) biBits = 24;
bi.biSize = sizeof(BITMAPINFOHEADER);
bi.biWidth = bm.bmWidth;
bi.biHeight = bm.bmHeight;
bi.biPlanes = 1;
bi.biBitCount = biBits;
bi.biCompression = biStyle;
bi.biSizeImage = 0;
bi.biXPelsPerMeter = 0;
bi.biYPelsPerMeter = 0;
bi.biClrUsed = 0;
bi.biClrImportant = 0;
dwLen = bi.biSize + PaletteSize(&bi);
hdc = GetDC(NULL);
hpal = SelectPalette(hdc,hpal,FALSE);
RealizePalette(hdc);
hdib = GlobalAlloc(GHND,dwLen);
if (!hdib){
SelectPalette(hdc,hpal,FALSE);
ReleaseDC(NULL,hdc);
return NULL;
}
lpbi = (VOID FAR *)GlobalLock(hdib);
*lpbi = bi;
/* call GetDIBits with a NULL lpBits param, so it will calculate the
* biSizeImage field for us
*/
GetDIBits(hdc, hbm, 0L, (DWORD)bi.biHeight,
(LPBYTE)NULL, (LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS);
bi = *lpbi;
GlobalUnlock(hdib);
/* If the driver did not fill in the biSizeImage field, make one up */
if (bi.biSizeImage == 0){
bi.biSizeImage = WIDTHBYTES((DWORD)bm.bmWidth * biBits) * bm.bmHeight;
if (biStyle != BI_RGB)
bi.biSizeImage = (bi.biSizeImage * 3) / 2;
}
/* realloc the buffer big enough to hold all the bits */
dwLen = bi.biSize + PaletteSize(&bi) + bi.biSizeImage;
if (h = GlobalReAlloc(hdib,dwLen,0))
hdib = h;
else{
GlobalFree(hdib);
hdib = NULL;
SelectPalette(hdc,hpal,FALSE);
ReleaseDC(NULL,hdc);
return hdib;
}
/* call GetDIBits with a NON-NULL lpBits param, and actualy get the
* bits this time
*/
lpbi = (VOID FAR *)GlobalLock(hdib);
if (GetDIBits( hdc,
hbm,
0L,
(DWORD)bi.biHeight,
(LPBYTE)lpbi + (WORD)lpbi->biSize + PaletteSize(lpbi),
(LPBITMAPINFO)lpbi, (DWORD)DIB_RGB_COLORS) == 0){
GlobalUnlock(hdib);
hdib = NULL;
SelectPalette(hdc,hpal,FALSE);
ReleaseDC(NULL,hdc);
return NULL;
}
bi = *lpbi;
GlobalUnlock(hdib);
SelectPalette(hdc,hpal,FALSE);
ReleaseDC(NULL,hdc);
return hdib;
}
BOOL WriteDIB (
LPSTR szFile,
HANDLE hdib)
{
BITMAPFILEHEADER hdr;
LPBITMAPINFOHEADER lpbi;
HFILE fh;
OFSTRUCT of;
if (!hdib)
return FALSE;
fh = OpenFile(szFile, &of, (UINT)OF_CREATE|OF_READWRITE);
if (fh == -1)
return FALSE;
lpbi = (VOID FAR *)GlobalLock (hdib);
/* Fill in the fields of the file header */
hdr.bfType = BFT_BITMAP;
hdr.bfSize = GlobalSize (hdib) + SIZEOF_BITMAPFILEHEADER_PACKED;
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD) (SIZEOF_BITMAPFILEHEADER_PACKED + lpbi->biSize +
PaletteSize(lpbi));
/* Write the file header */
/* write bfType*/
_lwrite(fh, (LPSTR)&hdr.bfType, (UINT)sizeof (WORD));
/* now pass over extra word, and only write next 3 DWORDS!*/
_lwrite(fh, (LPSTR)&hdr.bfSize, sizeof(DWORD) * 3);
/* this struct already DWORD aligned!*/
/* Write the DIB header and the bits */
_lwrite (fh, (LPSTR)lpbi, GlobalSize (hdib));
GlobalUnlock (hdib);
_lclose(fh);
return TRUE;
}
/***************************************************************************/
/***************************************************************************/
/* Win32 COM part of drop support */
/***************************************************************************/
/***************************************************************************/
/* C-Style COM ... */
typedef struct DropTarget {
void **vtbl;
int ref;
} DropTarget;
static DropTarget stDropTarget;
static int numDropFiles;
static char** dropFiles = NULL;
static void freeDropFiles(void) {
int i;
if(dropFiles) {
for(i=0; i < numDropFiles; i++) {
free(dropFiles[i]);
}
free(dropFiles);
dropFiles = NULL;
numDropFiles = 0;
}
}
/* Implement IUnknown */
STDMETHODIMP DropTarget_QueryInterface(DropTarget *dt,REFIID riid,PVOID *ppv) {
DPRINTF(("DropTarget_QueryInterface\n"));
return E_NOINTERFACE;
}
STDMETHODIMP_(ULONG)DropTarget_AddRef(DropTarget *dt) {
DPRINTF(("DropTarget_AddRef\n"));
return ++dt->ref;
}
STDMETHODIMP_(ULONG)DropTarget_Release(DropTarget *dt) {
DPRINTF(("DropTarget_Release\n"));
dt->ref--;
if (dt->ref > 0) return dt->ref;
return 0;
}
void signalDropEnter(POINTL pt)
{
POINT winPt;
winPt.x = pt.x;
winPt.y = pt.y;
ScreenToClient(stWindow, &winPt);
recordDragDropEvent(stWindow, DragEnter, winPt.x, winPt.y, 0);
}
STDMETHODIMP DropTarget_DragEnter(DropTarget *dt,
IDataObject *ido,
DWORD keyState,
POINTL pt,
DWORD *effect) {
FORMATETC fmtetc;
HRESULT hRes;
DPRINTF(("DropTarget_DragEnter\n"));
#if 0
/* TODO: Enumerate formats and check if
there's anything interesting. Eventually,
convert graphical stuff into bitmaps and
pass them up to Squeak... */
{
IEnumFORMATETC *fmt;
hRes = ido->lpVtbl->EnumFormatEtc(ido, DATADIR_GET, &fmt);
if(hRes == S_OK) {
DPRINTF(("Enumerating formats\n"));
hRes = fmt->lpVtbl->Reset(fmt);
if(FAILED(hRes)) DPRINTF(("Reset() failed (errCode = %x)\n"));
do {
DWORD num;
FORMATETC fmtEtc[1];
FORMATETC *fmtRec = fmtEtc;
hRes = fmt->lpVtbl->Next(fmt, 1, fmtRec, &num);
if(hRes == S_OK) {
/* got it */
DPRINTF(("New format:\n"));
DPRINTF(("\tCLIPFORMAT: %d ", fmtRec->cfFormat));
switch(fmtRec->cfFormat) {
case CF_TEXT: DPRINTF(("(text)")); break;
case CF_BITMAP: DPRINTF(("(bitmap)")); break;
case CF_METAFILEPICT: DPRINTF(("(metafilepict)")); break;
case CF_SYLK: DPRINTF(("(symbolic link format)")); break;
case CF_DIF: DPRINTF(("(data interchange format)")); break;
case CF_TIFF: DPRINTF(("(tiff)")); break;
case CF_OEMTEXT: DPRINTF(("(oem text)")); break;
case CF_DIB: DPRINTF(("(DIB)")); break;
case CF_PALETTE: DPRINTF(("(palette)")); break;
case CF_PENDATA: DPRINTF(("(pendata)")); break;
case CF_RIFF: DPRINTF(("(RIFF data)")); break;
case CF_WAVE: DPRINTF(("(wave)")); break;
case CF_UNICODETEXT: DPRINTF(("(unicode text)")); break;
case CF_ENHMETAFILE: DPRINTF(("(enhanced metafile)")); break;
case CF_HDROP: DPRINTF(("(drop files)")); break;
case CF_LOCALE: DPRINTF(("(locale)")); break;
case CF_DSPTEXT: DPRINTF(("(private text)")); break;
case CF_DSPBITMAP: DPRINTF(("(private bitmap)")); break;
case CF_DSPMETAFILEPICT: DPRINTF(("(private metafilepict)")); break;
case CF_DSPENHMETAFILE: DPRINTF(("(private enhanced metafile)")); break;
}
DPRINTF(("\n"));
if(fmtRec->ptd) {
char *base = (char*) (fmtRec->ptd);
DPRINTF(("\tDriver name: %s\n",
base+(fmtRec->ptd->tdDriverNameOffset)));
DPRINTF(("\tDevice name: %s\n",
base+(fmtRec->ptd->tdDeviceNameOffset)));
DPRINTF(("\tPort name: %s\n",
base+(fmtRec->ptd->tdPortNameOffset)));
}
DPRINTF(("\tdwAspect: %d ",fmtRec->dwAspect));
if(fmtRec->dwAspect & DVASPECT_CONTENT) DPRINTF(("(content)"));
if(fmtRec->dwAspect & DVASPECT_THUMBNAIL) DPRINTF(("(thumbnail)"));
if(fmtRec->dwAspect & DVASPECT_ICON) DPRINTF(("(icon)"));
if(fmtRec->dwAspect & DVASPECT_DOCPRINT) DPRINTF(("(docprint)"));
}
DPRINTF(("\n"));
DPRINTF(("\tTYMED: %d ", fmtRec->tymed));
if(fmtRec->tymed & TYMED_HGLOBAL) DPRINTF(("(HGLOBAL)"));
if(fmtRec->tymed & TYMED_FILE) DPRINTF(("(FILE)"));
if(fmtRec->tymed & TYMED_ISTREAM) DPRINTF(("(IStream)"));
if(fmtRec->tymed & TYMED_ISTORAGE) DPRINTF(("(IStorage)"));
if(fmtRec->tymed & TYMED_GDI) DPRINTF(("(GDI)"));
if(fmtRec->tymed & TYMED_MFPICT) DPRINTF(("(MFPICT)"));
if(fmtRec->tymed & TYMED_ENHMF) DPRINTF(("(ENHMF)"));
DPRINTF(("\n"));
} while(hRes == S_OK);
if(FAILED(hRes)) {
DPRINTF(("Next() failed (errCode = %x)\n"));
}
hRes = fmt->lpVtbl->Release(fmt);
} else {
DPRINTF(("EnumFormatEtc failed (errCode = %x)\n", hRes));
}
}
#endif
fmtetc.cfFormat = 0;
fmtetc.ptd = NULL;
fmtetc.lindex = -1;
fmtetc.dwAspect = DVASPECT_CONTENT;
DPRINTF(("Looking for file...\n"));
fmtetc.cfFormat = CF_HDROP;
fmtetc.tymed = TYMED_HGLOBAL;
hRes = ido->lpVtbl->QueryGetData(ido, &fmtetc);
if(hRes == S_OK) {
DPRINTF(("That works.\n"));
*effect = DROPEFFECT_COPY; /* that's what we want */
signalDropEnter(pt);
return S_OK;
}
DPRINTF(("Looking for HDIB...\n"));
fmtetc.cfFormat = CF_DIB;
fmtetc.tymed = TYMED_HGLOBAL;
hRes = ido->lpVtbl->QueryGetData(ido, &fmtetc);
if(hRes == S_OK) {
DPRINTF(("That works.\n"));
*effect = DROPEFFECT_COPY; /* that's what we want */
signalDropEnter(pt);
return S_OK;
}
DPRINTF(("Looking for Bitmap...\n"));
fmtetc.cfFormat = CF_BITMAP;
fmtetc.tymed = TYMED_GDI;
hRes = ido->lpVtbl->QueryGetData(ido, &fmtetc);
if(hRes == S_OK) {
DPRINTF(("That works.\n"));
*effect = DROPEFFECT_COPY; /* that's what we want */
signalDropEnter(pt);
return S_OK;
}
DPRINTF(("Looking for ENHMF...\n"));
fmtetc.cfFormat = CF_ENHMETAFILE;
fmtetc.tymed = TYMED_ENHMF;
hRes = ido->lpVtbl->QueryGetData(ido, &fmtetc);
if(hRes == S_OK) {
DPRINTF(("That works.\n"));
*effect = DROPEFFECT_COPY; /* that's what we want */
signalDropEnter(pt);
return S_OK;
}
DPRINTF(("Not found...\n"));
*effect = DROPEFFECT_NONE;
return S_FALSE;
}
STDMETHODIMP DropTarget_DragOver(DropTarget *dt,
DWORD keyState,
POINTL pt,
DWORD *effect) {
DPRINTF(("DropTarget_DragOver\n"));
*effect = DROPEFFECT_COPY; /* that's what we want */
{
POINT winPt;
winPt.x = pt.x;
winPt.y = pt.y;
ScreenToClient(stWindow, &winPt);
recordDragDropEvent(stWindow, DragMove, winPt.x, winPt.y, 0);
}
return S_OK;
}
STDMETHODIMP DropTarget_DragLeave(DropTarget *dt) {
DPRINTF(("DropTarget_DragLeave\n"));
recordDragDropEvent(stWindow, DragLeave, 0, 0, 0);
return S_OK;
}
void signalDrop(POINTL pt)
{
POINT winPt;
winPt.x = pt.x;
winPt.y = pt.y;
ScreenToClient(stWindow, &winPt);
recordDragDropEvent(stWindow, DragDrop, winPt.x, winPt.y, numDropFiles);
}
STDMETHODIMP DropTarget_Drop(DropTarget *dt,
IDataObject *ido,
DWORD keyState,
POINTL pt,
DWORD *effect) {
STGMEDIUM medium;
FORMATETC fmtetc;
HRESULT hRes;
freeDropFiles();
DPRINTF(("DropTarget_Drop\n"));
fmtetc.cfFormat = CF_HDROP;
fmtetc.ptd = NULL;
fmtetc.lindex = -1;
fmtetc.dwAspect = DVASPECT_CONTENT;
fmtetc.tymed = TYMED_HGLOBAL;
DPRINTF(("Looking for file...\n"));
hRes = ido->lpVtbl->GetData(ido, &fmtetc, &medium);
if(hRes == S_OK) {
HGLOBAL hDrop = medium.hGlobal;
DWORD i;
DPRINTF(("Success\n"));
numDropFiles = DragQueryFile(hDrop, -1, NULL, 0);
dropFiles = calloc(numDropFiles, sizeof(char*));
for(i=0; i<numDropFiles; i++) {
int len = DragQueryFile(hDrop, i, NULL, 0);
dropFiles[i] = malloc(len+1);
DragQueryFile(hDrop, i, dropFiles[i], len+1);
DPRINTF(("File: %s\n", dropFiles[i]));
}
DragFinish(hDrop);
signalDrop(pt);
if(medium.pUnkForRelease == NULL) {
GlobalFree(hDrop);
} else {
medium.pUnkForRelease->lpVtbl->Release(medium.pUnkForRelease);
}
return S_OK;
}
if(FAILED(hRes)) {
DPRINTF(("GetData failed (errCode = %x)\n", hRes));
}
fmtetc.cfFormat = CF_DIB;
fmtetc.ptd = NULL;
fmtetc.lindex = -1;
fmtetc.dwAspect = DVASPECT_CONTENT;
fmtetc.tymed = TYMED_HGLOBAL;
DPRINTF(("Looking for HDIB...\n"));
hRes = ido->lpVtbl->GetData(ido, &fmtetc, &medium);
if(hRes == S_OK) {
TCHAR tmpName[MAX_PATH+1];
HANDLE hDib = medium.hGlobal;
DPRINTF(("Success\n"));
GetTempPath(MAX_PATH,tmpName);
strcat(tmpName,"$$squeak$$.bmp");
if(WriteDIB(tmpName, hDib)) {
numDropFiles = 1;
dropFiles = calloc(1, sizeof(void*));
dropFiles[0] = strdup(tmpName);
}
if(medium.pUnkForRelease == NULL) {
GlobalFree(hDib);
} else {
medium.pUnkForRelease->lpVtbl->Release(medium.pUnkForRelease);
}
signalDrop(pt);
return S_OK;
}
if(FAILED(hRes)) {
DPRINTF(("GetData failed (errCode = %x)\n", hRes));
}
fmtetc.cfFormat = CF_BITMAP;
fmtetc.ptd = NULL;
fmtetc.lindex = -1;
fmtetc.dwAspect = DVASPECT_CONTENT;
fmtetc.tymed = TYMED_HGLOBAL;
DPRINTF(("Looking for bitmap...\n"));
hRes = ido->lpVtbl->GetData(ido, &fmtetc, &medium);
if(hRes == S_OK) {
TCHAR tmpName[MAX_PATH+1];
HANDLE hDib;
HBITMAP hBM = medium.hBitmap;
DPRINTF(("Success\n"));
GetTempPath(MAX_PATH,tmpName);
strcat(tmpName,"$$squeak$$.bmp");
hDib = DibFromBitmap(hBM, BI_RGB, 0, NULL);
if(hDib) {
if(WriteDIB(tmpName, hDib)) {
numDropFiles = 1;
dropFiles = calloc(1, sizeof(void*));
dropFiles[0] = strdup(tmpName);
}
DeleteObject(hDib);
}
if(medium.pUnkForRelease == NULL) {
DeleteObject(hBM);
} else {
medium.pUnkForRelease->lpVtbl->Release(medium.pUnkForRelease);
}
signalDrop(pt);
return S_OK;
}
if(FAILED(hRes)) {
DPRINTF(("GetData failed (errCode = %x)\n", hRes));
}
fmtetc.cfFormat = CF_ENHMETAFILE;
fmtetc.ptd = NULL;
fmtetc.lindex = -1;
fmtetc.dwAspect = DVASPECT_CONTENT;
fmtetc.tymed = TYMED_ENHMF;
DPRINTF(("Looking for ENHMF...\n"));
hRes = ido->lpVtbl->GetData(ido, &fmtetc, &medium);
if(hRes == S_OK) {
TCHAR tmpName[MAX_PATH+1];
HANDLE hMF = medium.hGlobal;
HANDLE hDib;
BITMAPINFO bmi;
ENHMETAHEADER header;
int size;
DPRINTF(("Success\n"));
if(GetEnhMetaFileHeader(hMF, sizeof(header), &header) == 0) {
DPRINTF(("GetEnhMetaFileHeader failed\n"));
}
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 24;
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biWidth = header.rclBounds.right - header.rclBounds.left;
bmi.bmiHeader.biHeight = header.rclBounds.bottom - header.rclBounds.top;
DPRINTF(("w=%d\nh=%d\n", bmi.bmiHeader.biWidth, bmi.bmiHeader.biHeight));
{
HDC hDC, mDC;
HANDLE old, hBM;
RECT rect;
hDC = GetDC(stWindow);
if(!hDC) DPRINTF(("GetDC() failed\n"));
// hDib = CreateDIBitmap(hDC, &bmi, 0, NULL, &bmi, DIB_RGB_COLORS);
hBM = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, NULL, NULL, 0);
if(!hBM) DPRINTF(("CreateDIBSection() failed\n"));
mDC = CreateCompatibleDC(hDC);
if(!mDC) DPRINTF(("CreateCompatibleDC() failed\n"));
old = SelectObject(mDC, hBM);
rect.left = rect.top = 0;
rect.right = bmi.bmiHeader.biWidth;
rect.bottom = bmi.bmiHeader.biHeight;
if(!PlayEnhMetaFile(mDC, hMF, &rect))
DPRINTF(("PlayEnhMetaFile() failed\n"));
SelectObject(mDC, old);
DeleteDC(mDC);
ReleaseDC(stWindow, hDC);
hDib = DibFromBitmap(hBM, BI_RGB, 0, NULL);
DeleteObject(hBM);
}
GetTempPath(MAX_PATH,tmpName);
strcat(tmpName,"$$squeak$$.bmp");
if(WriteDIB(tmpName, hDib)) {
numDropFiles = 1;
dropFiles = calloc(1, sizeof(void*));
dropFiles[0] = strdup(tmpName);
}
GlobalFree(hDib);
if(medium.pUnkForRelease == NULL) {
DeleteObject(hMF);
} else {
medium.pUnkForRelease->lpVtbl->Release(medium.pUnkForRelease);
}
signalDrop(pt);
return S_OK;
}
if(FAILED(hRes)) {
DPRINTF(("GetData failed (errCode = %x)\n", hRes));
}
return S_OK;
}
static void *vtDropTarget[] = {
DropTarget_QueryInterface,
DropTarget_AddRef,
DropTarget_Release,
DropTarget_DragEnter,
DropTarget_DragOver,
DropTarget_DragLeave,
DropTarget_Drop
};
static int isInitialized = 0;
void SetupDragAndDrop(void) {
HRESULT hRes;
#if 0
return;
#endif
if(!isInitialized) {
stDropTarget.vtbl = vtDropTarget;
stDropTarget.ref = 0;
isInitialized = 1;
}
hRes = RegisterDragDrop(stWindow, (LPDROPTARGET)&stDropTarget);
if(hRes == S_OK) {
DPRINTF(("Registered drop target\n"));
} else {
DPRINTF(("Drop registration failed (errCode: %x)\n", hRes));
}
}
void ShutdownDragAndDrop(void) {
if(isInitialized) {
RevokeDragDrop(stWindow);
isInitialized = 0;
}
}
/***************************************************************************/
/***************************************************************************/
/* Squeak part of drop support */
/***************************************************************************/
/***************************************************************************/
int dropInit(void) {
SetupDragAndDrop();
return 1;
}
int dropShutdown(void) {
freeDropFiles();
ShutdownDragAndDrop();
return 1;
}
char *dropRequestFileName(int dropIndex) {
DPRINTF(("dropRequestFileName(%d)\n", dropIndex));
if(dropIndex < 1 || dropIndex > numDropFiles) return NULL;
return dropFiles[dropIndex-1];
}
int dropRequestFileHandle(int dropIndex) {
int fileHandle, wasBrowserMode;
char *dropName = dropRequestFileName(dropIndex);
if(!dropName)
return interpreterProxy->nilObject();
fileHandle = instantiateClassindexableSize(classByteArray(), fileRecordSize());
wasBrowserMode = fBrowserMode;
fBrowserMode = false;
sqFileOpen(fileValueOf(fileHandle),(int)dropName, strlen(dropName), 0);
fBrowserMode = wasBrowserMode;
return fileHandle;
}
|
|
From: Andreas R. <and...@us...> - 2002-05-04 23:20:30
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/AsynchFilePlugin In directory usw-pr-cvs1:/tmp/cvs-serv7733/plugins/AsynchFilePlugin Modified Files: sqWin32AsyncFilePrims.c Log Message: Update to 3.2.1 Index: sqWin32AsyncFilePrims.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/AsynchFilePlugin/sqWin32AsyncFilePrims.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 |
|
From: Andreas R. <and...@us...> - 2002-05-04 22:20:33
|
Update of /cvsroot/squeak/squeak/platforms/win32/release In directory usw-pr-cvs1:/tmp/cvs-serv28546/release Log Message: Directory /cvsroot/squeak/squeak/platforms/win32/release added to the repository |
|
From: Andreas R. <and...@us...> - 2002-05-04 22:13:27
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/Mpeg3Plugin In directory usw-pr-cvs1:/tmp/cvs-serv26843/Mpeg3Plugin Log Message: Directory /cvsroot/squeak/squeak/platforms/win32/plugins/Mpeg3Plugin added to the repository |
|
From: Andreas R. <and...@us...> - 2002-05-04 22:13:05
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/JPEGReadWriter2Plugin In directory usw-pr-cvs1:/tmp/cvs-serv26674/JPEGReadWriter2Plugin Log Message: Directory /cvsroot/squeak/squeak/platforms/win32/plugins/JPEGReadWriter2Plugin added to the repository |