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: Brenda L. <asp...@us...> - 2003-05-13 22:34:25
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-X11 In directory sc8-pr-cvs1:/tmp/cvs-serv24623/vm-display-X11 Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/vm-display-X11 added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:34:22
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-sound-Sun In directory sc8-pr-cvs1:/tmp/cvs-serv24623/vm-sound-Sun Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/vm-sound-Sun added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:34:21
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-null In directory sc8-pr-cvs1:/tmp/cvs-serv24623/vm-display-null Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/vm-display-null added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:34:21
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz In directory sc8-pr-cvs1:/tmp/cvs-serv24623/vm-display-Quartz Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:33:24
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SqueakFFIPrims In directory sc8-pr-cvs1:/tmp/cvs-serv21322/SqueakFFIPrims Modified Files: any-libffi.c x86-sysv.c Log Message: Ian Piumarta's release 3.5-1devel Index: any-libffi.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SqueakFFIPrims/any-libffi.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: x86-sysv.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SqueakFFIPrims/x86-sysv.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x86-sysv.c 12 May 2003 07:26:28 -0000 1.1 --- x86-sysv.c 13 May 2003 22:27:10 -0000 1.2 *************** *** 9,12 **** --- 9,16 ---- * All rights reserved. * + * You are NOT ALLOWED to distribute modified versions of this file + * under its original name. If you want to modify it and then make + * your modifications available publicly, rename the file first. + * * This file is part of Unix Squeak. * *************** *** 17,21 **** * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not --- 21,25 ---- * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following additional restrictions: * * 1. The origin of this software must not be misrepresented; you must not *************** *** 25,37 **** * would be appreciated but is not required. * ! * 2. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. - * - * You are not allowed to distribute a modified version of this file - * under its original name without explicit permission to do so. If - * you change it, rename it. * * BUGS: --- 29,40 ---- * would be appreciated but is not required. * ! * 2. You must not distribute (or make publicly available by any ! * means) a modified copy of this file unless you first rename it. ! * ! * 3. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. * * BUGS: |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:31:12
|
Update of /cvsroot/squeak/squeak/platforms/unix/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23266 Modified Files: squeak.1 Added Files: 3.5-1devel.RELEASE_NOTES Log Message: Ian Piumarta's release 3.5-1devel --- NEW FILE: 3.5-1devel.RELEASE_NOTES --- Major departures from 3.4: - MacOSX is now fully supported (Quartz window, audio input/output, drag&drop, etc.). X11 is also supported (if installed on the host machine). - Display and sound support code has been moved out of the main executable into runtime modules. The choice of display method (Quartz, X11, no display at all) and sound (MacOSX CoreAudio, OSS, NAS, Sun, no sound at all) can be changed via command-line options when staring the VM. - A new option `-nodisplay' has been added. It differs from `-headless' in that the former disables display entirely (making the memory footprint of the VM smaller) while the latter loads the display code but does not open the Window (but allowing the possibility of retroactively opening the window at a some later time). - A new option `-nosound' has been added and does for sound what `-nodisplay' does for the display. - Memory allocation for the heap is now dynamic, based on mmap(). The heap will grow and shrink as the image's memory requirements change over time. This can be disabled by giving the option `-memory <N>[nk]' which tells the VM to use a fixed-size heap. A new option `-mmap <N>[mk]' is provided to limit the size to which mmap() will dynamically grow the heap (the default is 1Gbyte or 75% of your available virtual memory, whichever is smaller). If both options are given then `-memory' has precedence (disabling the mmap()-based memory allocator). - The configure option `--with-audio=...' has been removed. configure will arrange to build as many sound modules for which it can find the required headers/libraries. - configure will also build as many window system support modules for which it can find headers/libraries. The options `--without-x' and `--without-quartz' are available to explicitly disable one or both. Index: squeak.1 =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/doc/squeak.1,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** squeak.1 12 May 2003 07:26:15 -0000 1.1 --- squeak.1 13 May 2003 22:31:09 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- .\" All rights reserved. .\" + .\" You are NOT ALLOWED to distribute modified versions of this file + .\" under its original name. If you want to modify it and then make + .\" your modifications available publicly, rename the file first. + .\" .\" This file is part of Unix Squeak. .\" *************** *** 13,17 **** .\" You may use and/or distribute this file ONLY as part of Squeak, under .\" the terms of the Squeak License as described in `LICENSE' in the base of ! .\" this distribution, subject to the following restrictions: .\" .\" 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- .\" You may use and/or distribute this file ONLY as part of Squeak, under .\" the terms of the Squeak License as described in `LICENSE' in the base of ! .\" this distribution, subject to the following additional restrictions: .\" .\" 1. The origin of this software must not be misrepresented; you must not *************** *** 21,25 **** .\" would be appreciated but is not required. .\" ! .\" 2. This notice must not be removed or altered in any source distribution. .\" .\" Using (or modifying this file for use) in any context other than Squeak --- 25,32 ---- .\" would be appreciated but is not required. .\" ! .\" 2. You must not distribute (or make publicly available by any ! .\" means) a modified copy of this file unless you first rename it. ! .\" ! .\" 3. This notice must not be removed or altered in any source distribution. .\" .\" Using (or modifying this file for use) in any context other than Squeak *************** *** 27,35 **** .\" directory `platforms/unix/doc' before proceeding with any such use. .\" ! .\" You are not allowed to distribute a modified version of this file ! .\" under its original name without explicit permission to do so. If ! .\" you change it, rename it. ! .\" ! .\" Last edited: 2002-10-16 15:23:18 by piumarta on emilia.inria.fr .\" .if @@\*(lq@ \{\ --- 34,38 ---- .\" directory `platforms/unix/doc' before proceeding with any such use. .\" ! .\" Last edited: 2003-03-02 22:22:14 by piumarta on emilia.inria.fr .\" .if @@\*(lq@ \{\ *************** *** 176,179 **** --- 179,196 ---- (the default behaviour) to find the name of the server to use. .TP + .BI "\-encoding " "enc" + specifies the internal character encoding to be used by Squeak. The correct value depends on + the way Squeak's internal fonts are encoded. Older images use + .B MacRoman + encoding within the image, newer images should use + .B ISO-8859-15 + (aka + .B Latin9\c + ). The correct value is + .B MacRoman + for image versions prior to 3.5, + .B ISO-8859-15 + for image versions 3.5 and later. + .TP .B \-fullscreen causes the Squeak window to occupy as much of the screen area as possible. *************** *** 240,243 **** --- 257,277 ---- \'. .TP + .BI "\-pathenc " "enc" + specifies the external character encoding to be used by Squeak when accessing the filesystem + (file and directory pathnames). The correct value depends on the local platform's characteristics. + If no encoding conversion should be performed then this should be set to the same encoding + as Squeak uses internally (see the + .I \-encoding + option). Otherwise + .B ISO-8859-15 + (aka + .B Latin9\c + ) might make sense on a filesystem with 8-bit names and + .B UTF-8 + for a filesystem that uses Unicode-based pathnames. The default is + .B UTF-8 + for version 3.5 and later of the VM (which is correct for at least MacOSX and RedHat 8, and + which in an ideal world will eventually be adopted by all Unix variants). + .TP .BI "-plugins " "path" specifies an alternative location for external plugins (collections *************** *** 274,277 **** --- 308,336 ---- buttons.) .TP + .BI "\-textenc " "enc" + specifies the external character encoding to be used by Squeak when exchanging clipboard + text with other applications that request/provide the selection converted to + .B STRING + data. The default is + .B UTF-8 + on MacOSX, and + .B ISO-8859-15 + (aka + .B Latin9\c + ) on other Unix systems. + Note that X11 applications requesting the selection converted to + .B STRING_UTF8 + data will (correctly) receive the clipboard text encoded as + .B UTF-8\c + , regardless of this setting. + + Squeak recognises a subset of the character set names defined by the IANA. + (If you prefer to use the international currency symbol + rather than the Euro symbol in external text then you might want to set this to + .B ISO-8859-1\c + , aka + .B Latin1\c + \&.) + .TP .B \-version prints three or more lines of version information, as follows: *************** *** 319,322 **** --- 378,386 ---- \' flag. (The value is ignored.) .TP + .B SQUEAK_ENCODING + the name of the internal character encoding used by Squeak. Equivalent to giving the \`\c + .B \-encoding\c + \' command-line option if set. + .TP .B SQUEAK_FULLSCREEN equivalent to \`\c *************** *** 370,373 **** --- 434,443 ---- \'. .TP + .B SQUEAK_PATHENC + the name of the character encoding used to construct file and directory names. + Equivalent to giving the \`\c + .B \-pathenc\c + \' command-line option if set. + .TP .B SQUEAK_PLUGINS see \`\c *************** *** 380,383 **** --- 450,459 ---- \' if set. .TP + .B SQUEAK_TEXTENC + the name of the character encoding used to copy/paste text from/to external applications. + Equivalent to giving the \`\c + .B \-textenc\c + \' command-line option if set. + .TP .B SQUEAK_XSHM equivalent to \`\c *************** *** 591,596 **** .RE .PP ! The latest version of Unix Squeak: .RS .B http://www-sor.inria.fr/~piumarta/squeak .RE --- 667,677 ---- .RE .PP ! The latest source and binary distributions of Unix Squeak: .RS .B http://www-sor.inria.fr/~piumarta/squeak + .RE + .PP + The list of IANA-registered character encoding names, of which a proper subset is recognised by Squeak: + .RS + .B http://www.iana.org/assignments/character-sets .RE |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:30:23
|
Update of /cvsroot/squeak/squeak/platforms/unix/config In directory sc8-pr-cvs1:/tmp/cvs-serv22148 Modified Files: Makefile.in Makefile.install acinclude.m4 aclocal.m4 config.h.in configure configure.ac gnuify make.cfg.in mkacinc mkconfig.in mkinstalldirs mkmf mktargets vmm.config Log Message: Ian Piumarta's release 3.5-1devel Index: Makefile.in =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.in 12 May 2003 07:26:14 -0000 1.1 --- Makefile.in 13 May 2003 22:30:08 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 13,17 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 21,25 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 25,32 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 27,37 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: ian...@in... # ! # Last edited: 2003-03-04 06:44:45 by piumarta on emilia.inria.fr @make_cfg@ --- 34,40 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: ian...@in... # ! # Last edited: 2003-03-01 19:27:38 by piumarta on emilia.inria.fr @make_cfg@ *************** *** 43,47 **** PLUGINS_LA = [plugins] ! squeak = squeak$(NOX) all : $(squeak) plugins squeak.1 $(npsqueak) --- 46,50 ---- PLUGINS_LA = [plugins] ! squeak = squeak all : $(squeak) plugins squeak.1 $(npsqueak) *************** *** 50,54 **** $(squeak) : config.sh $(SQLIBS) version.o ! $(LINK) $(squeak) $(SQLIBS) version.o $(LIBS) [plibs] size $(squeak) @echo --- 53,57 ---- $(squeak) : config.sh $(SQLIBS) version.o ! $(LINK) $(squeak) $(SQLIBS) version.o $(LIBS) [plibs] vm/vm.a size $(squeak) @echo *************** *** 87,91 **** @Makefile_dist@ @Makefile_rpm@ - @Makefile_deb@ # VMM configuration changes --- 90,93 ---- Index: Makefile.install =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/Makefile.install,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.install 12 May 2003 07:26:14 -0000 1.1 --- Makefile.install 13 May 2003 22:30:08 -0000 1.2 *************** *** 3,7 **** # Author: ian...@in... # ! # Last edited: Wed Nov 27 19:13:56 2002 by piumarta (Ian Piumarta) on xombul DOCFILES = COPYING COPYRIGHT LICENSE \ --- 3,7 ---- # Author: ian...@in... # ! # Last edited: 2002-12-25 19:48:44 by piumarta on emilia.inria.fr DOCFILES = COPYING COPYRIGHT LICENSE \ Index: acinclude.m4 =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/acinclude.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** acinclude.m4 12 May 2003 07:26:14 -0000 1.1 --- acinclude.m4 13 May 2003 22:30:08 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 13,17 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 21,25 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 25,32 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 27,37 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: Ian...@IN... # ! # Last edited: 2003-02-09 02:40:58 by piumarta on emilia.inria.fr AC_DEFUN(AC_CHECK_VMM_DIR,[ --- 34,40 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: Ian...@IN... # ! # Last edited: 2003-02-11 04:24:23 by piumarta on emilia.inria.fr AC_DEFUN(AC_CHECK_VMM_DIR,[ *************** *** 110,124 **** AC_DEFUN(AC_PROG_CC_WALL, [AC_PROG_CC ! test "$GCC" = yes && WFLAGS="-Wall" AC_SUBST(WFLAGS)]) AC_DEFUN(AC_GNU_OPT, ! [AC_MSG_CHECKING("for optimization flags") ac_optflags="no" if test "$GCC" = yes; then ! case $host in ! i?86-*) ac_optflags="-fomit-frame-pointer" ;; esac fi --- 113,130 ---- AC_DEFUN(AC_PROG_CC_WALL, [AC_PROG_CC ! test "$GCC" = yes && WFLAGS="-Wall -Wno-unknown-pragmas" AC_SUBST(WFLAGS)]) AC_DEFUN(AC_GNU_OPT, ! [AC_MSG_CHECKING([for $host_cpu optimization flags]) ac_optflags="no" if test "$GCC" = yes; then ! case $host_cpu in ! i?86) ac_optflags="-fomit-frame-pointer" ;; + powerpc|ppc) + ac_optflags="-O3 -mcpu=750 -funroll-loops" + ;; esac fi *************** *** 219,276 **** fi fi - - - AC_DEFUN(AC_HAVE_NAS,[AC_MSG_CHECKING([for Network Audio System]) - AC_TRY_COMPILE([#include <audio/audio.h>],[AuElementNotifyKindLowWater;], - ac_cv_nas="yes", ac_cv_nas="no") - AC_MSG_RESULT($ac_cv_nas)]) - - AC_DEFUN(AC_HAVE_OSS,[AC_MSG_CHECKING([for Open Sound System]) - AC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;], - ac_cv_oss="yes", ac_cv_oss="no") - AC_MSG_RESULT($ac_cv_oss)]) - - AC_DEFUN(AC_HAVE_SUN,[AC_MSG_CHECKING([for SunOS/Solaris audio]) - AC_TRY_COMPILE([#include <sys/audioio.h>],[AUDIO_SUNVTS;], - ac_cv_sun="yes" - AC_DEFINE_UNQUOTED(HAVE_SYS_AUDIOIO_H,1), - AC_TRY_COMPILE([#include <sun/audioio.h>],[AUDIO_SUNVTS;], - ac_cv_sun="yes" - AC_DEFINE_UNQUOTED(HAVE_SUN_AUDIOIO_H,1), - ac_cv_sun="no")) - AC_MSG_RESULT($ac_cv_sun)]) - - - AC_DEFUN(AC_CHECK_SOUND,[ - use_audio="" - AC_MSG_CHECKING([for audio support]) - AC_MSG_RESULT($with_audio) - if test "$with_audio" = "auto" -o "$with_audio" = "oss"; then - AC_HAVE_OSS - if test "$ac_cv_oss" = "yes"; then use_audio=oss; with_audio=oss; fi - fi - if test "$with_audio" = "auto" -o "$with_audio" = "sun"; then - AC_HAVE_SUN - if test "$ac_cv_sun" = "yes"; then use_audio=sun; with_audio=sun; fi - fi - if test "$with_audio" = "auto" -o "$with_audio" = "nas"; then - AC_HAVE_NAS - if test "$ac_cv_nas" = "yes"; then use_audio=nas; with_audio=nas; fi - fi - if test "$with_audio" = "none"; then use_audio=none; fi - if test "$use_audio" = ""; then - AC_MSG_RESULT([******** AUDIO DISABLED (no support found for: $with_audio)]) - use_audio=none - fi - case $use_audio in - nas) AC_DEFINE(USE_AUDIO_NAS,1) - LIBS="$LIBS -laudio -lXt" ;; - oss) AC_DEFINE(USE_AUDIO_OSS,1) ;; - sun) AC_DEFINE(USE_AUDIO_SUN,1) - AC_HAVE_HEADERS(sys/audioio.h) ;; - none) AC_DEFINE(USE_AUDIO_NONE,1) ;; - *) echo; echo "this cannot happen"; echo; exit 1 ;; - esac - ]) --- 225,228 ---- Index: aclocal.m4 =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/aclocal.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aclocal.m4 12 May 2003 07:26:14 -0000 1.1 --- aclocal.m4 13 May 2003 22:30:08 -0000 1.2 *************** *** 18,21 **** --- 18,25 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 26,30 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 30,34 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 34,38 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 38,45 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 40,50 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: Ian...@IN... # ! # Last edited: 2003-02-09 02:40:58 by piumarta on emilia.inria.fr AC_DEFUN(AC_CHECK_VMM_DIR,[ --- 47,53 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: Ian...@IN... # ! # Last edited: 2003-02-11 04:24:23 by piumarta on emilia.inria.fr AC_DEFUN(AC_CHECK_VMM_DIR,[ *************** *** 123,137 **** AC_DEFUN(AC_PROG_CC_WALL, [AC_PROG_CC ! test "$GCC" = yes && WFLAGS="-Wall" AC_SUBST(WFLAGS)]) AC_DEFUN(AC_GNU_OPT, ! [AC_MSG_CHECKING("for optimization flags") ac_optflags="no" if test "$GCC" = yes; then ! case $host in ! i?86-*) ac_optflags="-fomit-frame-pointer" ;; esac fi --- 126,143 ---- AC_DEFUN(AC_PROG_CC_WALL, [AC_PROG_CC ! test "$GCC" = yes && WFLAGS="-Wall -Wno-unknown-pragmas" AC_SUBST(WFLAGS)]) AC_DEFUN(AC_GNU_OPT, ! [AC_MSG_CHECKING([for $host_cpu optimization flags]) ac_optflags="no" if test "$GCC" = yes; then ! case $host_cpu in ! i?86) ac_optflags="-fomit-frame-pointer" ;; + powerpc|ppc) + ac_optflags="-O3 -mcpu=750 -funroll-loops" + ;; esac fi *************** *** 232,289 **** fi fi - - - AC_DEFUN(AC_HAVE_NAS,[AC_MSG_CHECKING([for Network Audio System]) - AC_TRY_COMPILE([#include <audio/audio.h>],[AuElementNotifyKindLowWater;], - ac_cv_nas="yes", ac_cv_nas="no") - AC_MSG_RESULT($ac_cv_nas)]) - - AC_DEFUN(AC_HAVE_OSS,[AC_MSG_CHECKING([for Open Sound System]) - AC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;], - ac_cv_oss="yes", ac_cv_oss="no") - AC_MSG_RESULT($ac_cv_oss)]) - - AC_DEFUN(AC_HAVE_SUN,[AC_MSG_CHECKING([for SunOS/Solaris audio]) - AC_TRY_COMPILE([#include <sys/audioio.h>],[AUDIO_SUNVTS;], - ac_cv_sun="yes" - AC_DEFINE_UNQUOTED(HAVE_SYS_AUDIOIO_H,1), - AC_TRY_COMPILE([#include <sun/audioio.h>],[AUDIO_SUNVTS;], - ac_cv_sun="yes" - AC_DEFINE_UNQUOTED(HAVE_SUN_AUDIOIO_H,1), - ac_cv_sun="no")) - AC_MSG_RESULT($ac_cv_sun)]) - - - AC_DEFUN(AC_CHECK_SOUND,[ - use_audio="" - AC_MSG_CHECKING([for audio support]) - AC_MSG_RESULT($with_audio) - if test "$with_audio" = "auto" -o "$with_audio" = "oss"; then - AC_HAVE_OSS - if test "$ac_cv_oss" = "yes"; then use_audio=oss; with_audio=oss; fi - fi - if test "$with_audio" = "auto" -o "$with_audio" = "sun"; then - AC_HAVE_SUN - if test "$ac_cv_sun" = "yes"; then use_audio=sun; with_audio=sun; fi - fi - if test "$with_audio" = "auto" -o "$with_audio" = "nas"; then - AC_HAVE_NAS - if test "$ac_cv_nas" = "yes"; then use_audio=nas; with_audio=nas; fi - fi - if test "$with_audio" = "none"; then use_audio=none; fi - if test "$use_audio" = ""; then - AC_MSG_RESULT([******** AUDIO DISABLED (no support found for: $with_audio)]) - use_audio=none - fi - case $use_audio in - nas) AC_DEFINE(USE_AUDIO_NAS,1) - LIBS="$LIBS -laudio -lXt" ;; - oss) AC_DEFINE(USE_AUDIO_OSS,1) ;; - sun) AC_DEFINE(USE_AUDIO_SUN,1) - AC_HAVE_HEADERS(sys/audioio.h) ;; - none) AC_DEFINE(USE_AUDIO_NONE,1) ;; - *) echo; echo "this cannot happen"; echo; exit 1 ;; - esac - ]) --- 238,241 ---- Index: config.h.in =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/config.h.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.h.in 12 May 2003 07:26:14 -0000 1.1 --- config.h.in 13 May 2003 22:30:09 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- * All rights reserved. * + * You are NOT ALLOWED to distribute modified versions of this file + * under its original name. If you want to modify it and then make + * your modifications available publicly, rename the file first. + * * This file is part of Unix Squeak. * *************** *** 13,17 **** * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following additional restrictions: * * 1. The origin of this software must not be misrepresented; you must not *************** *** 21,44 **** * would be appreciated but is not required. * ! * 2. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. - * - * You are not allowed to distribute a modified version of this file - * under its original name without explicit permission to do so. If - * you change it, rename it. */ /* Author: Ian...@IN... * ! * Last edited: 2002-11-30 16:00:59 by piumarta on calvin.inria.fr */ /* package options */ #undef USE_X11 #undef USE_RFB --- 25,52 ---- * would be appreciated but is not required. * ! * 2. You must not distribute (or make publicly available by any ! * means) a modified copy of this file unless you first rename it. ! * ! * 3. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. */ /* Author: Ian...@IN... * ! * Last edited: 2003-03-02 05:26:57 by piumarta on emilia.inria.fr */ + #ifndef __sq_config_h + #define __sq_config_h /* package options */ #undef USE_X11 + #undef USE_X11_GLX + #undef USE_QUARTZ + #undef USE_QUARTZ_CGL #undef USE_RFB *************** *** 48,52 **** --- 56,62 ---- #undef HAVE_LIBXEXT #undef HAVE_LIBDL + #undef HAVE_DYLD #undef HAVE_LIBFFI + #undef HAVE_ICONV #undef USE_AUDIO_NONE *************** *** 54,57 **** --- 64,68 ---- #undef USE_AUDIO_NAS #undef USE_AUDIO_OSS + #undef USE_AUDIO_MACOSX #undef OSS_DEVICE *************** *** 65,70 **** #undef HAVE_SYS_DIR_H #undef HAVE_NDIR_H - #undef HAVE_DLFCN_H #undef HAVE_SYS_TIME_H --- 76,81 ---- #undef HAVE_SYS_DIR_H #undef HAVE_NDIR_H #undef HAVE_DLFCN_H + #undef HAVE_ICONV_H #undef HAVE_SYS_TIME_H *************** *** 80,83 **** --- 91,97 ---- #undef HAVE_STROPTS_H + #undef HAVE_GL_GL_H + #undef HAVE_OPENGL_GL_H + #undef NEED_SUNOS_H *************** *** 94,99 **** --- 108,117 ---- #undef HAVE___SNPRINTF + #undef HAVE_MMAP + #undef HAVE_DYLD + #undef HAVE_LANGINFO_CODESET + /* structures */ *************** *** 136,137 **** --- 154,157 ---- #undef VM_MODULE_PREFIX #undef VM_DLSYM_PREFIX + + #endif /* __sq_config_h */ Index: configure =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/configure,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** configure 12 May 2003 07:26:14 -0000 1.1 --- configure 13 May 2003 22:30:09 -0000 1.2 *************** *** 262,265 **** --- 262,301 ---- ac_unique_file="config.h.in" + # Factoring default headers for most tests. + ac_includes_default="\ + #include <stdio.h> + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if HAVE_SYS_STAT_H [...10825 lines suppressed...] { (exit 1); exit 1; }; } --- 12058,12062 ---- else # /dev/null tree ! { { echo "$as_me:12060: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 11382,11386 **** if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:11384: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else --- 12175,12179 ---- if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:12177: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else Index: configure.ac =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** configure.ac 12 May 2003 07:26:14 -0000 1.1 --- configure.ac 13 May 2003 22:30:09 -0000 1.2 *************** *** 7,10 **** --- 7,14 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 15,19 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 19,23 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 23,27 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 27,34 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 29,43 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: Ian...@IN... # ! # Last edited: 2003-03-04 06:48:40 by piumarta on emilia.inria.fr AC_INIT([config.h.in]) ! AC_VM_VERSION(3,4,1, 3,4,5170) topdir=`cd ${srcdir}/../../..; pwd` --- 36,46 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: Ian...@IN... # ! # Last edited: 2003-02-10 20:17:06 by piumarta on emilia.inria.fr AC_INIT([config.h.in]) ! AC_VM_VERSION(3,5,1devel, 3,2t,369) topdir=`cd ${srcdir}/../../..; pwd` *************** *** 119,123 **** AC_ARG_WITH(gnu-as, [ --with-gnu-as assume that as is the GNU assembler [default=no]], ! [GAS="$withval"], [GAS="unknown"]) AC_PROG_MAKE_SET --- 122,127 ---- AC_ARG_WITH(gnu-as, [ --with-gnu-as assume that as is the GNU assembler [default=no]], ! [GAS="$withval"], ! [GAS="unknown"]) AC_PROG_MAKE_SET *************** *** 148,176 **** AC_SUBST(INCLUDES) - # Checks for X11 - - AC_ARG_WITH(x, - [ --without-x disable X Window System support [default=enabled]], - [ if test "$withval" = "no"; then have_x="no"; else have_x="yes"; fi ], - [ have_x="yes"] - ) - - if test "$have_x" = "yes"; then - AC_DEFINE(USE_X11,[1]) - NOX="" - AC_PATH_XTRA - LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS" - CFLAGS="$X_CFLAGS $CFLAGS" - if test "$x_includes" != ""; then - INCLUDES="${INCLUDES} -I${x_includes}" - fi - else - NOX="-nox" - CFLAGS="$CFLAGS -DHEADLESS" - with_npsqueak=no - fi - - AC_SUBST(NOX) - # Checks for header files. --- 152,155 ---- *************** *** 196,201 **** AC_ARG_WITH(rfb, [ --without-rfb disable Remote FrameBuffer support [default=enabled]], ! [[have_rfb=no]], ! [[have_rfb=yes]]) test $have_rfb = "yes" && AC_DEFINE(USE_RFB,[1]) --- 175,181 ---- AC_ARG_WITH(rfb, [ --without-rfb disable Remote FrameBuffer support [default=enabled]], ! [have_rfb="$withval"], ! [have_rfb="no"]) ! test $have_rfb = "yes" && AC_DEFINE(USE_RFB,[1]) *************** *** 204,225 **** AC_CHECK_LIB(nsl, yp_bind) AC_CHECK_LIB(socket, socket) - - AC_HAVE_HEADERS(dlfcn.h) - AC_CHECK_FUNC(dlopen, - [AC_DEFINE(HAVE_LIBDL,[1])], - [AC_CHECK_LIB(dl, dlopen, - [LIBS="-ldl $LIBS" - AC_DEFINE(HAVE_LIBDL,[1])], - [AC_CHECK_FUNC(_dyld_present,[AC_DEFINE(HAVE_DYLD,[1])])])]) - AC_CHECK_LIB(m, sin) ! if test "$have_x" = "yes"; then ! AC_CHECK_LIB(X11, XOpenDisplay) ! AC_CHECK_LIB(Xext, XShmAttach) ! fi AC_CHECK_FUNCS(snprintf __snprintf,[break]) #AC_ARG_ENABLE(jit, #[ --enable-jit enable J4 support [default=no]], --- 184,207 ---- AC_CHECK_LIB(nsl, yp_bind) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(m, sin) ! AC_HAVE_HEADERS(dlfcn.h) ! AC_CHECK_FUNC(dlopen, [ ! AC_DEFINE(HAVE_LIBDL,[1]) ! ],[ ! AC_CHECK_LIB(dl, dlopen, [ ! LIBS="-ldl $LIBS" ! AC_DEFINE(HAVE_LIBDL,[1]) ! ],[ ! AC_CHECK_FUNC(_dyld_present, [ ! AC_DEFINE(HAVE_DYLD,[1]) ! ]) ! ]) ! ]) AC_CHECK_FUNCS(snprintf __snprintf,[break]) + AC_FUNC_MMAP + #AC_ARG_ENABLE(jit, #[ --enable-jit enable J4 support [default=no]], *************** *** 229,242 **** #AC_SUBST(J_CFLAGS) - # Checks for sound support. - - AC_ARG_WITH(audio, - [ --with-audio=choice choose audio device [default=auto] - available devices: auto none oss sun nas], - [[]], - [[with_audio=auto]]) - - AC_CHECK_SOUND - # Checks for platform characteristics. --- 211,214 ---- *************** *** 270,275 **** AC_ARG_WITH(npsqueak, [ --without-npsqueak disable browser plugin support [default=enabled]], ! [[with_npsqueak=no]], ! [[with_npsqueak=yes]]) if test "$with_npsqueak" = "no"; then --- 242,247 ---- AC_ARG_WITH(npsqueak, [ --without-npsqueak disable browser plugin support [default=enabled]], ! [with_npsqueak="$withval"], ! [with_npsqueak="yes"]) if test "$with_npsqueak" = "no"; then *************** *** 310,319 **** Makefile_dist=${topdir}/util/Makefile.dist Makefile_rpm=${topdir}/util/Makefile.rpm - Makefile_deb=${topdir}/util/Makefile.deb AC_SUBST_FILE(Makefile_install) AC_SUBST_FILE(Makefile_dist) AC_SUBST_FILE(Makefile_rpm) ! AC_SUBST_FILE(Makefile_deb) # Configure plugins --- 282,297 ---- Makefile_dist=${topdir}/util/Makefile.dist Makefile_rpm=${topdir}/util/Makefile.rpm AC_SUBST_FILE(Makefile_install) AC_SUBST_FILE(Makefile_dist) AC_SUBST_FILE(Makefile_rpm) ! ! # Configure VM modules xxx MAKE INTERNAL WORK ! ! int_modules="vm" ! ext_modules="`cd ${topdir}/platforms/unix; echo vm-*`" ! ! AC_SUBST(int_modules) ! AC_SUBST(ext_modules) # Configure plugins *************** *** 323,329 **** sinclude(acplugins.m4) ! if test "$have_x" = "no"; then ! AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin) ! fi if test "${disabled_plugins}" != ""; then --- 301,313 ---- sinclude(acplugins.m4) ! # Plugins not generated by VMM must be listed here... ! int_plugins="" ! ext_plugins="ObjectiveCPlugin" ! AC_SUBST(int_plugins) ! AC_SUBST(ext_plugins) ! ! #if test "$have_x" = "no"; then ! # AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin) ! #fi if test "${disabled_plugins}" != ""; then Index: gnuify =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/gnuify,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gnuify 12 May 2003 07:26:14 -0000 1.1 --- gnuify 13 May 2003 22:30:09 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 13,17 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 21,37 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak # changes these copyright conditions. Read the file `COPYING' in the # directory `platforms/unix/doc' before proceeding with any such use. - # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. # Author: Ian...@IN... # ! # Last edited: 2002-09-07 03:28:53 by piumarta on emilia.inria.fr # Rewrite the interpreter source in $1 to use GNU C extensions, writing the --- 25,40 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak # changes these copyright conditions. Read the file `COPYING' in the # directory `platforms/unix/doc' before proceeding with any such use. # Author: Ian...@IN... # ! # Last edited: 2003-02-11 05:06:03 by piumarta on emilia.inria.fr # Rewrite the interpreter source in $1 to use GNU C extensions, writing the *************** *** 76,79 **** --- 79,85 ---- (stage == 1) && /^ char\* localSP;/ { print " register char* localSP SP_REG;"; + print "# ifdef GP_REG"; + print " register struct foo * foo GP_REG= &fum;"; + print "# endif"; next; } *************** *** 87,91 **** print "interpret: adding bytecode dispatch table" > "/dev/stderr"; print " JUMP_TABLE;\n"; - print " register void **jumpTablePtr JP_REG= jumpTable;"; print "interpret: rewriting case labels and outer breaks" > "/dev/stderr"; stage= 2; --- 93,96 ---- Index: make.cfg.in =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/make.cfg.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** make.cfg.in 12 May 2003 07:26:14 -0000 1.1 --- make.cfg.in 13 May 2003 22:30:09 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 13,17 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 21,37 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak # changes these copyright conditions. Read the file `COPYING' in the # directory `platforms/unix/doc' before proceeding with any such use. - # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. # Author: Ian...@in... # ! # Last edited: 2002-12-01 09:20:37 by piumarta on calvin.inria.fr MAKEFLAGS= --no-print-directory --- 25,40 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak # changes these copyright conditions. Read the file `COPYING' in the # directory `platforms/unix/doc' before proceeding with any such use. # Author: Ian...@in... # ! # Last edited: 2003-02-06 03:06:06 by piumarta on emilia.local. MAKEFLAGS= --no-print-directory *************** *** 99,104 **** LIBS= @LIBS@ ! INTERP= @INTERP@ ! NOX= @NOX@ FFI_DIR= @FFI_DIR@ --- 102,108 ---- LIBS= @LIBS@ ! X_CFLAGS= @X_CFLAGS@ ! X_INCLUDES= @X_INCLUDES@ ! X_LIBS= @X_LIBS@ FFI_DIR= @FFI_DIR@ *************** *** 107,110 **** --- 111,115 ---- FFI_O= @FFI_O@ + INTERP= @INTERP@ npsqueak= @npsqueak@ Index: mkacinc =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/mkacinc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkacinc 12 May 2003 07:26:14 -0000 1.1 --- mkacinc 13 May 2003 22:30:09 -0000 1.2 *************** *** 1,10 **** #!/bin/sh ! includes="`find ../plugins -name acinclude.m4`"; if test "${includes}" != ""; then for i in ${includes}; do echo " + $i" >&2 ! p=`echo $i | sed 's,../plugins/,,;s,/acinclude.m4,,'` cat <<EOF plugin="${p}" --- 1,10 ---- #!/bin/sh ! includes="`echo ../vm*/acinclude.m4 ../plugins/*/acinclude.m4`"; if test "${includes}" != ""; then for i in ${includes}; do echo " + $i" >&2 ! p=`echo $i | sed 's,../,,;s,plugins/,,;s,/acinclude.m4,,'` cat <<EOF plugin="${p}" Index: mkconfig.in =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/mkconfig.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkconfig.in 12 May 2003 07:26:14 -0000 1.1 --- mkconfig.in 13 May 2003 22:30:09 -0000 1.2 *************** *** 1,10 **** #!/bin/sh ! int_plugins="`tail -1 @vmmdir@/plugins.int | sed 's,.* =,,'`" ! ext_plugins="`tail -1 @vmmdir@/plugins.ext | sed 's,.* =,,'`" if test -f plugins.exc; then nlsp='tr \012\015 \040\040' spnl='tr \040\040 \012\012' int_plugins="`echo ${int_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`" ext_plugins="`echo ${ext_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`" --- 1,14 ---- #!/bin/sh ! int_modules="@int_modules@" ! ext_modules="@ext_modules@" ! int_plugins="@int_plugins@ `tail -1 @vmmdir@/plugins.int | sed 's,.* =,,'`" ! ext_plugins="@ext_plugins@ `tail -1 @vmmdir@/plugins.ext | sed 's,.* =,,'`" if test -f plugins.exc; then nlsp='tr \012\015 \040\040' spnl='tr \040\040 \012\012' + int_modules="`echo ${int_modules} | $spnl | fgrep -v -f plugins.exc | $nlsp`" + ext_modules="`echo ${ext_modules} | $spnl | fgrep -v -f plugins.exc | $nlsp`" int_plugins="`echo ${int_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`" ext_plugins="`echo ${ext_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`" *************** *** 29,32 **** --- 33,38 ---- cfgdir="@cfgdir@" + int_modules="${int_modules}" + ext_modules="${ext_modules}" int_plugins="${int_plugins}" ext_plugins="${ext_plugins}" Index: mkinstalldirs =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/mkinstalldirs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: mkmf =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/mkmf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkmf 12 May 2003 07:26:14 -0000 1.1 --- mkmf 13 May 2003 22:30:09 -0000 1.2 *************** *** 7,10 **** --- 7,14 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 15,19 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 19,23 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 23,27 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 27,34 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 29,39 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: ian...@in... # ! # Last edited: 2002-06-10 23:40:02 by piumarta on emilia.inria.fr . ./config.sh --- 36,42 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: ian...@in... # ! # Last edited: 2003-02-06 03:14:37 by piumarta on emilia.local. . ./config.sh *************** *** 87,92 **** fi srcs="${srcs} `findFiles .c ${dd}`" - srcs="${srcs} `findFiles .s ${dd}`" srcs="${srcs} `findFiles .S ${dd}`" hdrs="${hdrs} `findFiles .h ${dd}`" # override Makefile.in --- 90,95 ---- fi srcs="${srcs} `findFiles .c ${dd}`" srcs="${srcs} `findFiles .S ${dd}`" + srcs="${srcs} `findFiles .m ${dd}`" hdrs="${hdrs} `findFiles .h ${dd}`" # override Makefile.in *************** *** 105,109 **** if test "${srcs}" != ""; then for c in ${srcs}; do ! o=`basename ${c} | sed 's,\.[csS],$o,'` targets="${targets} ${o}" echo >> ${make_targets} --- 108,112 ---- if test "${srcs}" != ""; then for c in ${srcs}; do ! o=`basename ${c} | sed 's,\.c,$o,;s,\.m,$o,;s,\.S,$o,'` targets="${targets} ${o}" echo >> ${make_targets} *************** *** 150,154 **** } ! mkmf int vm ${vmi_dirs} if test "${int_plugins}" != ""; then --- 153,172 ---- } ! if test "${int_modules}" != ""; then ! for p in ${int_modules}; do ! mkmf int ${p} ${vmi_dirs} ! done ! fi ! ! if test "${ext_modules}" != ""; then ! for p in ${ext_modules}; do ! if test -f ${p}.lib; then ! plibs="`cat ${p}.lib`" ! else ! plibs="" ! fi ! mkmf ext ${p} ${vmi_dirs} ! done ! fi if test "${int_plugins}" != ""; then Index: mktargets =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/mktargets,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mktargets 12 May 2003 07:26:14 -0000 1.1 --- mktargets 13 May 2003 22:30:09 -0000 1.2 *************** *** 7,10 **** --- 7,14 ---- # All rights reserved. # + # You are NOT ALLOWED to distribute modified versions of this file + # under its original name. If you want to modify it and then make + # your modifications available publicly, rename the file first. + # # This file is part of Unix Squeak. # *************** *** 15,19 **** # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not --- 19,23 ---- # You may use and/or distribute this file ONLY as part of Squeak, under # the terms of the Squeak License as described in `LICENSE' in the base of ! # this distribution, subject to the following additional restrictions: # # 1. The origin of this software must not be misrepresented; you must not *************** *** 23,27 **** # would be appreciated but is not required. # ! # 2. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak --- 27,34 ---- # would be appreciated but is not required. # ! # 2. You must not distribute (or make publicly available by any ! # means) a modified copy of this file unless you first rename it. ! # ! # 3. This notice must not be removed or altered in any source distribution. # # Using (or modifying this file for use) in any context other than Squeak *************** *** 29,39 **** # directory `platforms/unix/doc' before proceeding with any such use. # - # You are not allowed to distribute a modified version of this file - # under its original name without explicit permission to do so. If - # you change it, rename it. - # # Author: ian...@in... # ! # Last edited: 2002-06-10 23:40:08 by piumarta on emilia.inria.fr --- 36,42 ---- # directory `platforms/unix/doc' before proceeding with any such use. # # Author: ian...@in... # ! # Last edited: 2003-02-06 03:19:36 by piumarta on emilia.local. *************** *** 48,53 **** plugins="" ! if test "${ext_plugins}" != ""; then ! for p in ${ext_plugins}; do plugins="${plugins} ${p}${la}" done --- 51,56 ---- plugins="" ! if test "${ext_modules}${ext_plugins}" != ""; then ! for p in ${ext_modules} ${ext_plugins}; do plugins="${plugins} ${p}${la}" done *************** *** 59,72 **** plibs="" ! for p in vm ${int_plugins}; do ! targets="${targets} ${p}/${p}$a" ! echo >> ${make_targets} ! echo "${p}/${p}$a : .force" >> ${make_targets} ! echo ' @$(SHELL) -ec '"'cd ${p}; "'$(MAKE) '"${p}$a'" >> ${make_targets} ! test -f ${p}.lib && plibs="${plibs} `cat ${p}.lib`" ! done ! if test "${ext_plugins}" != ""; then ! for p in ${ext_plugins}; do echo >> ${make_targets} echo "${p}${la} :" >> ${make_targets} --- 62,77 ---- plibs="" ! if test "${int_modules}${int_plugins}" != ""; then ! for p in ${int_modules} ${int_plugins}; do ! targets="${targets} ${p}/${p}$a" ! echo >> ${make_targets} ! echo "${p}/${p}$a : .force" >> ${make_targets} ! echo ' @$(SHELL) -ec '"'cd ${p}; "'$(MAKE) '"${p}$a'" >> ${make_targets} ! test -f ${p}.lib && plibs="${plibs} `cat ${p}.lib`" ! done ! fi ! if test "${ext_modules}${ext_plugins}" != ""; then ! for p in ${ext_modules} ${ext_plugins}; do echo >> ${make_targets} echo "${p}${la} :" >> ${make_targets} *************** *** 84,88 **** void *primitiveAddress; } sqExport; ! `for p in ${exc_plugins}; do echo "sqExport ${p}_exports[] = { 0, 0, 0 };"; done` EOF cat >> ${make_targets} <<EOF --- 89,93 ---- void *primitiveAddress; } sqExport; ! `for p in ${exc_plugins}; do echo "sqExport ${p}_exports[] = { 0, 0, 0 };"; done | sed 's/-/_/g'` EOF cat >> ${make_targets} <<EOF Index: vmm.config =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/vmm.config,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsUzUekf and /tmp/cvsoVqvok differ |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:30:17
|
Update of /cvsroot/squeak/squeak/platforms/unix/config/autom4te.cache
In directory sc8-pr-cvs1:/tmp/cvs-serv22148/autom4te.cache
Modified Files:
output.0 output.1 traces.0 traces.1
Log Message:
Ian Piumarta's release 3.5-1devel
Index: output.0
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/config/autom4te.cache/output.0,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** output.0 12 May 2003 07:26:15 -0000 1.1
--- output.0 13 May 2003 22:30:09 -0000 1.2
***************
*** 16,20 ****
*) lt_cv_sys_path_separator=':' ;;
esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
fi
--- 16,19 ----
***************
*** 83,87 ****
# So, first we look for a working echo in the user's PATH.
! IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
--- 82,86 ----
# So, first we look for a working echo in the user's PATH.
! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH /usr/ucb; do
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
***************
*** 1372,1380 ****
VM_MAJOR=3
! VM_MINOR=4
! VM_RELEASE=1
SQ_MAJOR=3
! SQ_MINOR=4
! SQ_UPDATE=5170
--- 1371,1379 ----
VM_MAJOR=3
! VM_MINOR=2
! VM_RELEASE=6
SQ_MAJOR=3
! SQ_MINOR=4a
! SQ_UPDATE=5125
***************
*** 1573,1580 ****
GAWK="$withval"
else
! case $host_os in
! darwin*) GAWK="yes";;
! *) GAWK="unknown";;
! esac
fi;
--- 1572,1576 ----
GAWK="$withval"
else
! GAWK="unknown"
fi;
***************
*** 2377,2380 ****
--- 2373,2377 ----
test "$GCC" = yes && WFLAGS="-Wall"
+ # AC_PROG_CXX -- not needed in this release
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
***************
*** 2580,2594 ****
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
- # Find the correct PATH separator. Usually this is `:', but
- # DJGPP uses `;' like DOS.
- if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
- fi
-
echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
--- 2577,2580 ----
***************
*** 2600,2604 ****
lt_cv_path_NM="$NM"
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
--- 2586,2590 ----
lt_cv_path_NM="$NM"
else
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
***************
*** 2990,2994 ****
else
if test -z "$LD"; then
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
--- 2976,2980 ----
else
if test -z "$LD"; then
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
***************
*** 3076,3080 ****
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
! # 'file_magic [[regex]]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
--- 3062,3066 ----
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
! # ['file_magic [regex]'] -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
***************
*** 3140,3146 ****
;;
! irix5* | irix6* | nonstopux*)
case $host_os in
! irix5* | nonstopux*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
--- 3126,3132 ----
;;
! irix5* | irix6*)
case $host_os in
! irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
***************
*** 3163,3167 ****
# This must be Linux ELF.
linux-gnu*)
! lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
--- 3149,3159 ----
# This must be Linux ELF.
linux-gnu*)
! case $host_cpu in
! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
! lt_cv_deplibs_check_method=pass_all ;;
! *)
! # glibc up to 2.1.1 does not perform some relocations on ARM
! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
! esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
***************
*** 3282,3286 ****
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
! irix* | nonstopux*)
symcode='[BCDEGRST]'
;;
--- 3274,3278 ----
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
! irix*)
symcode='[BCDEGRST]'
;;
***************
*** 4514,4518 ****
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
! beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
--- 4506,4510 ----
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
! beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
***************
*** 4557,4561 ****
;;
! irix5* | irix6* | nonstopux*)
lt_cv_prog_cc_wl='-Wl,'
lt_cv_prog_cc_static='-non_shared'
--- 4549,4553 ----
;;
! irix5* | irix6*)
lt_cv_prog_cc_wl='-Wl,'
lt_cv_prog_cc_static='-non_shared'
***************
*** 5127,5131 ****
if test "x$lt_cv_need_dllmain" = "xyes"; then
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
else
--- 5119,5123 ----
if test "x$lt_cv_need_dllmain" = "xyes"; then
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
else
***************
*** 5383,5389 ****
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
! # yet detect zsh echo's removal of \ escapes. Also zsh mangles
! # `"' quotes if we put them in here... so don't!
! archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
--- 5375,5380 ----
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
! # yet detect zsh echo's removal of \ escapes.
! archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
***************
*** 5437,5441 ****
;;
! irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
--- 5428,5432 ----
;;
! irix5* | irix6*)
if test "$GCC" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
***************
*** 5534,5566 ****
solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim...@pa...>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [12].*)
- cat <<EOF 1>&2
-
- *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
- *** create self contained shared libraries on Solaris systems, without
- *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
- *** -no-undefined support, which will at least allow you to build shared
- *** libraries. However, you may find that when you link such libraries
- *** into an application without using GCC, you have to manually add
- *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
- *** upgrade to a newer version of GCC. Another option is to rebuild your
- *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
- EOF
- no_undefined_flag=
- ;;
- esac
- fi
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
--- 5525,5529 ----
***************
*** 5758,5770 ****
# development snapshots of GCC prior to 3.0.
case $host_os in
! aix4 | aix4.[01] | aix4.[01].*)
! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
! echo ' yes '
! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
! :
! else
! can_build_shared=no
! fi
! ;;
esac
# AIX (on Power*) has no versioning support, so currently we can
--- 5721,5733 ----
# development snapshots of GCC prior to 3.0.
case $host_os in
! aix4 | aix4.[01] | aix4.[01].*)
! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
! echo ' yes '
! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
! :
! else
! can_build_shared=no
! fi
! ;;
esac
# AIX (on Power*) has no versioning support, so currently we can
***************
*** 5915,5923 ****
;;
! irix5* | irix6* | nonstopux*)
! case $host_os in
! nonstopux*) version_type=nonstopux ;;
! *) version_type=irix ;;
! esac
need_lib_prefix=no
need_version=no
--- 5878,5883 ----
;;
! irix5* | irix6*)
! version_type=irix
need_lib_prefix=no
need_version=no
***************
*** 5925,5929 ****
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
case $host_os in
! irix5* | nonstopux*)
libsuff= shlibsuff=
;;
--- 5885,5889 ----
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
case $host_os in
! irix5*)
libsuff= shlibsuff=
;;
***************
*** 6029,6033 ****
version_type=osf
need_version=no
- need_lib_prefix=no
soname_spec='${libname}${release}.so'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
--- 5989,5992 ----
***************
*** 7440,7444 ****
if test "${with_x+set}" = set; then
withval="$with_x"
! if test "$withval" = "no"; then have_x="no"; else have_x="yes"; fi
else
have_x="yes"
--- 7399,7403 ----
if test "${with_x+set}" = set; then
withval="$with_x"
! have_x="no"
else
have_x="yes"
***************
*** 8905,8909 ****
! for ac_header in sys/time.h sys/filio.h sys/select.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--- 8864,8869 ----
!
! for ac_header in sys/time.h sys/filio.h sys/select.h dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
***************
*** 10022,10140 ****
fi
-
-
- for ac_header in dlfcn.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
- else
- # Is the header compilable?
- echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
- #include "confdefs.h"
- $ac_includes_default
- @%:@include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6
-
- # Is the header present?
- echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
- #include "confdefs.h"
- @%:@include <$ac_header>
- _ACEOF
- if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
- else
- ac_cpp_err=yes
- fi
- if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6
-
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc in
- yes:no )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
- no:yes )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
- esac
- echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-
- fi
-
- done
-
echo "$as_me:$LINENO: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
--- 9982,9985 ----
***************
*** 10207,10211 ****
else
! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
--- 10052,10057 ----
else
!
! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
***************
*** 10263,10342 ****
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
! LIBS="-ldl $LIBS"
! cat >>confdefs.h <<\_ACEOF
@%:@define HAVE_LIBDL 1
_ACEOF
! else
! echo "$as_me:$LINENO: checking for _dyld_present" >&5
! echo $ECHO_N "checking for _dyld_present... $ECHO_C" >&6
! if test "${ac_cv_func__dyld_present+set}" = set; then
! echo $ECHO_N "(cached) $ECHO_C" >&6
! else
! cat >conftest.$ac_ext <<_ACEOF
! #line $LINENO "configure"
! #include "confdefs.h"
! /* System header to define __stub macros and hopefully few prototypes,
! which can conflict with char _dyld_present (); below. */
! #include <assert.h>
! /* Override any gcc2 internal prototype to avoid an error. */
! #ifdef __cplusplus
! extern "C"
! #endif
! /* We use char because int might match the return type of a gcc2
! builtin and then its argument prototype would still apply. */
! char _dyld_present ();
! char (*f) ();
!
! #ifdef F77_DUMMY_MAIN
! # ifdef __cplusplus
! extern "C"
! # endif
! int F77_DUMMY_MAIN() { return 1; }
! #endif
! int
! main ()
! {
! /* The GNU C library defines this for functions which it implements
! to always fail with ENOSYS. Some functions are actually named
! something starting with __ and the normal name is an alias. */
! #if defined (__stub__dyld_present) || defined (__stub____dyld_present)
! choke me
! #else
! f = _dyld_present;
! #endif
!
! ;
! return 0;
! }
! _ACEOF
! rm -f conftest.$ac_objext conftest$ac_exeext
! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
! (eval $ac_link) 2>&5
! ac_status=$?
! echo "$as_me:$LINENO: \$? = $ac_status" >&5
! (exit $ac_status); } &&
! { ac_try='test -s conftest$ac_exeext'
! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
! (eval $ac_try) 2>&5
! ac_status=$?
! echo "$as_me:$LINENO: \$? = $ac_status" >&5
! (exit $ac_status); }; }; then
! ac_cv_func__dyld_present=yes
! else
! echo "$as_me: failed program was:" >&5
! cat conftest.$ac_ext >&5
! ac_cv_func__dyld_present=no
! fi
! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
! fi
! echo "$as_me:$LINENO: result: $ac_cv_func__dyld_present" >&5
! echo "${ECHO_T}$ac_cv_func__dyld_present" >&6
! if test $ac_cv_func__dyld_present = yes; then
! cat >>confdefs.h <<\_ACEOF
! @%:@define HAVE_DYLD 1
! _ACEOF
!
! fi
fi
--- 10109,10117 ----
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
! cat >>confdefs.h <<_ACEOF
@%:@define HAVE_LIBDL 1
_ACEOF
! LIBS="-ldl $LIBS"
fi
***************
*** 10345,10349 ****
-
echo "$as_me:$LINENO: checking for sin in -lm" >&5
echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
--- 10120,10123 ----
***************
*** 10410,10414 ****
fi
-
if test "$have_x" = "yes"; then
--- 10184,10187 ----
***************
*** 11031,11044 ****
case "$GAWK" in
no) ;;
! yes) AWK=awk; GAWK=yes ;;
! gawk) AWK=gawk; GAWK=yes ;;
! *) if test -x /usr/bin/gawk; then
! GAWK=yes
! AWK=gawk
! else
! if $AWK --version /dev/null </dev/null 2>&1 | fgrep -i gnu >/dev/null
! then GAWK=yes
! else GAWK=no
! fi
fi ;;
esac
--- 10804,10811 ----
case "$GAWK" in
no) ;;
! yes|gawk) AWK=gawk; GAWK=yes ;;
! *) if $AWK --version /dev/null </dev/null 2>&1 | fgrep -i gnu >/dev/null
! then GAWK=yes
! else GAWK=no
fi ;;
esac
***************
*** 11379,11390 ****
case $host_os in
darwin*)
- cat >>confdefs.h <<\_ACEOF
- @%:@define DARWIN 1
- _ACEOF
-
CFLAGS="-no-cpp-precomp $CFLAGS"
with_npsqueak=no
! ;;
! *)
;;
esac
--- 11146,11155 ----
case $host_os in
darwin*)
CFLAGS="-no-cpp-precomp $CFLAGS"
with_npsqueak=no
! cat >>confdefs.h <<_ACEOF
! @%:@define VM_DLSYM_PREFIX "_"
! _ACEOF
!
;;
esac
***************
*** 11448,11453 ****
Makefile_dist=${topdir}/util/Makefile.dist
Makefile_rpm=${topdir}/util/Makefile.rpm
- Makefile_deb=${topdir}/util/Makefile.deb
-
--- 11213,11216 ----
***************
*** 12013,12031 ****
plibs=""
rm -f SqueakFFIPrims.sub SqueakFFIPrims.lib
! echo "$as_me:$LINENO: checking for FFI support" >&5
! echo $ECHO_N "checking for FFI support... $ECHO_C" >&6
!
! FFI_DIR=${topdir}/platforms/unix/plugins/SqueakFFIPrims
!
! ffi_cpu_abi=`${FFI_DIR}/ffi-config ${cfgdir} ${FFI_DIR} -cpu-abi`
!
! if test "${ffi_cpu_abi}" != "any-libffi"; then
! echo "$as_me:$LINENO: result: ${ffi_cpu_abi}" >&5
! echo "${ECHO_T}${ffi_cpu_abi}" >&6
! else
! echo "$as_me:$LINENO: result: requires libffi" >&5
! echo "${ECHO_T}requires libffi" >&6
! ffi_cpu_abi=any-libffi
! if test "${ac_cv_header_ffi_h+set}" = set; then
echo "$as_me:$LINENO: checking for ffi.h" >&5
echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6
--- 11776,11780 ----
plibs=""
rm -f SqueakFFIPrims.sub SqueakFFIPrims.lib
! if test "${ac_cv_header_ffi_h+set}" = set; then
echo "$as_me:$LINENO: checking for ffi.h" >&5
echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6
***************
*** 12204,12217 ****
- fi
-
- FFI_C=${ffi_cpu_abi}
- FFI_S=${ffi_cpu_abi}-asm
- FFI_O="${FFI_C}\$o ${FFI_S}\$o"
-
-
-
-
-
if test "${plibs}"; then
llibs="${LIBS}"
--- 11953,11956 ----
***************
*** 12892,12901 ****
/@Makefile_rpm@/r $Makefile_rpm
s,@Makefile_rpm@,,;t t
- /@Makefile_deb@/r $Makefile_deb
- s,@Makefile_deb@,,;t t
- s,@FFI_DIR@,$FFI_DIR,;t t
- s,@FFI_C@,$FFI_C,;t t
- s,@FFI_S@,$FFI_S,;t t
- s,@FFI_O@,$FFI_O,;t t
CEOF
--- 12631,12634 ----
Index: output.1
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/config/autom4te.cache/output.1,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** output.1 12 May 2003 07:26:15 -0000 1.1
--- output.1 13 May 2003 22:30:10 -0000 1.2
***************
*** 465,469 ****
#endif"
! ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS topdir cfgdir vmmdir blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S ECHO STRIP ac_ct_STRIP CPP EGREP LIBTOOL INCLUDES X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS NOX INTERP AWK npsqueak install_nps uninstall_nps SQ_LIBDIR LIB@&t@OBJS LTLIBOBJS'
ac_subst_files='make_cfg make_int make_ext make_prg Makefile_install Makefile_dist Makefile_rpm'
--- 465,469 ----
#endif"
! ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS topdir cfgdir vmmdir blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S ECHO STRIP ac_ct_STRIP CPP EGREP LIBTOOL INCLUDES X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS WINDOW INTERP AWK npsqueak install_nps uninstall_nps SQ_LIBDIR LIB@&t@OBJS LTLIBOBJS'
ac_subst_files='make_cfg make_int make_ext make_prg Makefile_install Makefile_dist Makefile_rpm'
***************
*** 1019,1022 ****
--- 1019,1023 ----
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-pic try to use only PIC/non-PIC objects default=use both
+ --with-quartz enable Quartz (Mac OS X) window support
--without-x disable X Window System support default=enabled
--with-x use the X Window System
***************
*** 7482,7486 ****
! # Checks for X11
--- 7483,7513 ----
! # Check for which window system to use
!
! WINDOW="unset";
!
!
! # Check whether --with-quartz or --without-quartz was given.
! if test "${with_quartz+set}" = set; then
! withval="$with_quartz"
! have_quartz="yes"
! else
! have_quartz="no"
!
! fi;
!
! if test "$have_quartz" = "yes"; then
! case $host in
! *-*-darwin*)
! WINDOW="Quartz"
! cat >>confdefs.h <<\_ACEOF
! @%:@define USE_QUARTZ 1
! _ACEOF
!
! LIBS="$LIBS -framework Cocoa"
! with_npsqueak=no
! ;;
! esac
! fi
***************
*** 7494,7504 ****
fi;
! if test "$have_x" = "yes"; then
! cat >>confdefs.h <<\_ACEOF
@%:@define USE_X11 1
_ACEOF
! NOX=""
! echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6
--- 7521,7532 ----
fi;
! if test "$WINDOW" = "unset"; then
! if test "$have_x" = "yes"; then
! WINDOW="X11"
! cat >>confdefs.h <<\_ACEOF
@%:@define USE_X11 1
_ACEOF
! echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6
***************
*** 8575,8586 ****
fi
! LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS"
! CFLAGS="$X_CFLAGS $CFLAGS"
! if test "$x_includes" != ""; then
! INCLUDES="${INCLUDES} -I${x_includes}"
fi
! else
! NOX="-nox"
! CFLAGS="$CFLAGS -DHEADLESS"
with_npsqueak=no
fi
--- 8603,8616 ----
fi
! LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS"
! CFLAGS="$X_CFLAGS $CFLAGS"
! if test "$x_includes" != ""; then
! INCLUDES="${INCLUDES} -I${x_includes}"
! fi
fi
! fi
!
! if test "$WINDOW" = "unset"; then
! WINDOW="None"
with_npsqueak=no
fi
***************
*** 11429,11435 ****
for l in ${plibs}; do
llibs="${llibs} -l${l}"
- if test -f /usr/lib/lib${l}.la; then
- llibs="${llibs} -dlopen /usr/lib/lib${l}.la"
- fi
done
echo ${llibs} > ${plugin}.lib
--- 11459,11462 ----
***************
*** 11464,11470 ****
for l in ${plibs}; do
llibs="${llibs} -l${l}"
- if test -f /usr/lib/lib${l}.la; then
- llibs="${llibs} -dlopen /usr/lib/lib${l}.la"
- fi
done
echo ${llibs} > ${plugin}.lib
--- 11491,11494 ----
***************
*** 11763,11769 ****
for l in ${plibs}; do
llibs="${llibs} -l${l}"
- if test -f /usr/lib/lib${l}.la; then
- llibs="${llibs} -dlopen /usr/lib/lib${l}.la"
- fi
done
echo ${llibs} > ${plugin}.lib
--- 11787,11790 ----
***************
*** 11947,11953 ****
for l in ${plibs}; do
llibs="${llibs} -l${l}"
- if test -f /usr/lib/lib${l}.la; then
- llibs="${llibs} -dlopen /usr/lib/lib${l}.la"
- fi
done
echo ${llibs} > ${plugin}.lib
--- 11968,11971 ----
***************
*** 12637,12641 ****
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
! s,@NOX@,$NOX,;t t
s,@INTERP@,$INTERP,;t t
s,@AWK@,$AWK,;t t
--- 12655,12659 ----
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
! s,@WINDOW@,$WINDOW,;t t
s,@INTERP@,$INTERP,;t t
s,@AWK@,$AWK,;t t
Index: traces.0
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/config/autom4te.cache/traces.0,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** traces.0 12 May 2003 07:26:15 -0000 1.1
--- traces.0 13 May 2003 22:30:10 -0000 1.2
***************
*** 1,4 ****
! m4trace:aclocal.m4:60: -1- AC_SUBST([NM])
! m4trace:aclocal.m4:61: -1- AC_SUBST([LD])
m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:11: -1- m4_pattern_forbid([_AC_])
--- 1,4 ----
! m4trace:aclocal.m4:61: -1- AC_SUBST([NM])
! m4trace:aclocal.m4:62: -1- AC_SUBST([LD])
m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:11: -1- m4_pattern_forbid([_AC_])
***************
*** 85,124 ****
m4trace:configure.ac:74: -1- AC_DEFINE_TRACE_LITERAL([VM_HOST_OS])
m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([VM_HOST_CPU])
! m4trace:configure.ac:95: -1- AC_PROG_MAKE_SET
! m4trace:configure.ac:95: -1- AC_SUBST([SET_MAKE])
! m4trace:configure.ac:96: -1- AC_PROG_CC
! m4trace:configure.ac:96: -1- AC_SUBST([CC])
! m4trace:configure.ac:96: -1- AC_SUBST([CFLAGS])
! m4trace:configure.ac:96: -1- AC_SUBST([LDFLAGS])
! m4trace:configure.ac:96: -1- AC_SUBST([CPPFLAGS])
! m4trace:configure.ac:96: -1- AC_SUBST([CC])
! m4trace:configure.ac:96: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:96: -1- AC_SUBST([CC])
! m4trace:configure.ac:96: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:96: -1- AC_SUBST([CC])
! m4trace:configure.ac:96: -1- AC_SUBST([CC])
! m4trace:configure.ac:96: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:96: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
! m4trace:configure.ac:96: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
! m4trace:configure.ac:96: -1- AC_SUBST([WFLAGS])
! m4trace:configure.ac:97: -1- AC_SUBST([AS])
! m4trace:configure.ac:98: -1- AC_PROG_RANLIB
! m4trace:configure.ac:98: -1- AC_SUBST([RANLIB])
! m4trace:configure.ac:98: -1- AC_SUBST([ac_ct_RANLIB])
! m4trace:configure.ac:99: -1- AC_PROG_INSTALL
! m4trace:configure.ac:99: -1- AC_SUBST([INSTALL_PROGRAM])
! m4trace:configure.ac:99: -1- AC_SUBST([INSTALL_SCRIPT])
! m4trace:configure.ac:99: -1- AC_SUBST([INSTALL_DATA])
! m4trace:configure.ac:102: -1- AC_SUBST([LN])
! m4trace:configure.ac:109: -1- AC_DEFINE_TRACE_LITERAL([squeakInt64])
! m4trace:configure.ac:114: -1- AC_PROG_LIBTOOL
! m4trace:configure.ac:114: -1- AC_PROG_LN_S
! m4trace:configure.ac:114: -1- AC_SUBST([LN_S], [$as_ln_s])
! m4trace:configure.ac:114: -1- AC_SUBST([ECHO])
! m4trace:configure.ac:114: -1- AC_SUBST([RANLIB])
! m4trace:configure.ac:114: -1- AC_SUBST([ac_ct_RANLIB])
! m4trace:configure.ac:114: -1- AC_SUBST([STRIP])
! m4trace:configure.ac:114: -1- AC_SUBST([ac_ct_STRIP])
! m4trace:configure.ac:114: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
--- 85,124 ----
m4trace:configure.ac:74: -1- AC_DEFINE_TRACE_LITERAL([VM_HOST_OS])
m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([VM_HOST_CPU])
! m4trace:configure.ac:91: -1- AC_PROG_MAKE_SET
! m4trace:configure.ac:91: -1- AC_SUBST([SET_MAKE])
! m4trace:configure.ac:92: -1- AC_PROG_CC
! m4trace:configure.ac:92: -1- AC_SUBST([CC])
! m4trace:configure.ac:92: -1- AC_SUBST([CFLAGS])
! m4trace:configure.ac:92: -1- AC_SUBST([LDFLAGS])
! m4trace:configure.ac:92: -1- AC_SUBST([CPPFLAGS])
! m4trace:configure.ac:92: -1- AC_SUBST([CC])
! m4trace:configure.ac:92: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:92: -1- AC_SUBST([CC])
! m4trace:configure.ac:92: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:92: -1- AC_SUBST([CC])
! m4trace:configure.ac:92: -1- AC_SUBST([CC])
! m4trace:configure.ac:92: -1- AC_SUBST([ac_ct_CC])
! m4trace:configure.ac:92: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
! m4trace:configure.ac:92: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
! m4trace:configure.ac:92: -1- AC_SUBST([WFLAGS])
! m4trace:configure.ac:94: -1- AC_SUBST([AS])
! m4trace:configure.ac:95: -1- AC_PROG_RANLIB
! m4trace:configure.ac:95: -1- AC_SUBST([RANLIB])
! m4trace:configure.ac:95: -1- AC_SUBST([ac_ct_RANLIB])
! m4trace:configure.ac:96: -1- AC_PROG_INSTALL
! m4trace:configure.ac:96: -1- AC_SUBST([INSTALL_PROGRAM])
! m4trace:configure.ac:96: -1- AC_SUBST([INSTALL_SCRIPT])
! m4trace:configure.ac:96: -1- AC_SUBST([INSTALL_DATA])
! m4trace:configure.ac:99: -1- AC_SUBST([LN])
! m4trace:configure.ac:106: -1- AC_DEFINE_TRACE_LITERAL([squeakInt64])
! m4trace:configure.ac:111: -1- AC_PROG_LIBTOOL
! m4trace:configure.ac:111: -1- AC_PROG_LN_S
! m4trace:configure.ac:111: -1- AC_SUBST([LN_S], [$as_ln_s])
! m4trace:configure.ac:111: -1- AC_SUBST([ECHO])
! m4trace:configure.ac:111: -1- AC_SUBST([RANLIB])
! m4trace:configure.ac:111: -1- AC_SUBST([ac_ct_RANLIB])
! m4trace:configure.ac:111: -1- AC_SUBST([STRIP])
! m4trace:configure.ac:111: -1- AC_SUBST([ac_ct_STRIP])
! m4trace:configure.ac:111: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
***************
*** 132,136 ****
])
])
! m4trace:configure.ac:114: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
--- 132,136 ----
])
])
! m4trace:configure.ac:111: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
***************
*** 138,317 ****
])
])
! m4trace:configure.ac:114: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
! m4trace:configure.ac:114: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
! m4trace:configure.ac:114: -1- AC_CHECK_HEADERS([dlfcn.h])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H])
! m4trace:configure.ac:114: -1- AC_HEADER_STDC
! m4trace:configure.ac:114: -1- AC_PROG_CPP
! m4trace:configure.ac:114: -1- AC_SUBST([CPP])
! m4trace:configure.ac:114: -1- AC_SUBST([CPPFLAGS])
! m4trace:configure.ac:114: -1- AC_SUBST([CPP])
! m4trace:configure.ac:114: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
! m4trace:configure.ac:114: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
! m4trace:configure.ac:114: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
! m4trace:configure.ac:114: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
! m4trace:configure.ac:114: -1- AC_SUBST([LIBTOOL])
! m4trace:configure.ac:120: -1- AC_SUBST([INCLUDES])
! m4trace:configure.ac:131: -1- AC_DEFINE_TRACE_LITERAL([USE_X11])
! m4trace:configure.ac:133: -1- AC_PATH_X
! m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([X_DISPLAY_MISSING])
! m4trace:configure.ac:133: -1- AH_OUTPUT([X_DISPLAY_MISSING], [/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([dnet], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([dnet_stub], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([nsl], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([bsd], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([socket], [connect], [X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"], [], [$X_EXTRA_LIBS])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([posix], [remove], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([ipc], [shmat], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"])
! m4trace:configure.ac:133: -1- AC_CHECK_LIB([ICE], [IceConnectionNumber], [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], [], [$X_EXTRA_LIBS])
! m4trace:configure.ac:133: -1- AC_SUBST([X_CFLAGS])
! m4trace:configure.ac:133: -1- AC_SUBST([X_PRE_LIBS])
! m4trace:configure.ac:133: -1- AC_SUBST([X_LIBS])
! m4trace:configure.ac:133: -1- AC_SUBST([X_EXTRA_LIBS])
! m4trace:configure.ac:145: -1- AC_SUBST([NOX])
! m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([NEED_SUNOS_H])
! m4trace:configure.ac:151: -1- AC_HEADER_STDC([])
! m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
! m4trace:configure.ac:151: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
! m4trace:configure.ac:152: -1- AC_CHECK_HEADERS([unistd.h string.h fcntl.h sys/file.h sys/param.h])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_SYS_FILE_H], [/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H])
! m4trace:configure.ac:153: -1- AC_CHECK_HEADERS([sys/time.h sys/filio.h sys/select.h])
! m4trace:configure.ac:153: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H])
! m4trace:configure.ac:153: -1- AH_OUTPUT([HAVE_SYS_FILIO_H], [/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H])
! m4trace:configure.ac:153: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H])
! m4trace:configure.ac:154: -1- AC_HEADER_TIME
! m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
! m4trace:configure.ac:154: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME])
! m4trace:configure.ac:155: -1- AC_HEADER_DIRENT
! m4trace:configure.ac:155: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines \`DIR'.
*/
#undef HAVE_DIRENT_H])
! m4trace:configure.ac:155: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines \`DIR'.
*/
#undef HAVE_SYS_NDIR_H])
! m4trace:configure.ac:155: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines \`DIR'.
*/
#undef HAVE_SYS_DIR_H])
! m4trace:configure.ac:155: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines \`DIR'. */
#undef HAVE_NDIR_H])
! m4trace:configure.ac:157: -1- AC_STRUCT_TIMEZONE
! m4trace:configure.ac:157: -1- AC_STRUCT_TM
! m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
! m4trace:configure.ac:157: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares \`struct tm'. */
#undef TM_IN_SYS_TIME])
! m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
! m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if \`tm_zone' is member of \`struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE])
! m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
! m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your \`struct tm' has \`tm_zone'. Deprecated, use
\`HAVE_STRUCT_TM_TM_ZONE' instead. */
#undef HAVE_TM_ZONE])
! m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
! m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don't have \`tm_zone' but do have the external array
\`tzname'. */
#undef HAVE_TZNAME])
! m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([socklen_t])
! m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([AT_EXIT])
! m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZSET])
! m4trace:configure.ac:162: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_GMTOFF])
! m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIMEZONE])
! m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([NEED_GETHOSTNAME_P])
! m4trace:configure.ac:172: -1- AC_DEFINE_TRACE_LITERAL([USE_RFB])
! m4trace:configure.ac:176: -1- AC_CHECK_LIB([nsl], [yp_bind])
! m4trace:configure.ac:176: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the \`nsl' library (-lnsl). */
#undef HAVE_LIBNSL])
! m4trace:configure.ac:176: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
! m4trace:configure.ac:177: -1- AC_CHECK_LIB([socket], [socket])
! m4trace:configure.ac:177: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the \`socket' library (-lsocket). */
#undef HAVE_LIBSOCKET])
! m4trace:configure.ac:177: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
! m4trace:configure.ac:179: -1- AC_CHECK_HEADERS([dlfcn.h])
! m4trace:configure.ac:179: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
! #undef HAVE_DLFCN_H])
! m4trace:configure.ac:185: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
! m4trace:configure.ac:185: -1- AC_CHECK_LIB([dl], [dlopen], [LIBS="-ldl $LIBS"
! AC_DEFINE(HAVE_LIBDL,[1])], [AC_CHECK_FUNC(_dyld_present,[AC_DEFINE(HAVE_DYLD,[1])])])
! m4trace:configure.ac:185: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
! m4trace:configure.ac:185: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DYLD])
! m4trace:configure.ac:187: -1- AC_CHECK_LIB([m], [sin])
! m4trace:configure.ac:187: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the \`m' library (-lm). */
#undef HAVE_LIBM])
! m4trace:configure.ac:187: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM])
! m4trace:configure.ac:190: -1- AC_CHECK_LIB([X11], [XOpenDisplay])
! m4trace:configure.ac:190: -1- AH_OUTPUT([HAVE_LIBX11], [/* Define to 1 if you have the \`X11' library (-lX11). */
#undef HAVE_LIBX11])
! m4trace:configure.ac:190: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBX11])
! m4trace:configure.ac:191: -1- AC_CHECK_LIB([Xext], [XShmAttach])
! m4trace:configure.ac:191: -1- AH_OUTPUT([HAVE_LIBXEXT], [/* Define to 1 if you have the \`Xext' library (-lXext). */
#undef HAVE_LIBXEXT])
! m4trace:configure.ac:191: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXEXT])
! m4trace:configure.ac:194: -1- AC_CHECK_FUNCS([snprintf __snprintf], [break])
! m4trace:configure.ac:194: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the \`snprintf' function. */
#undef HAVE_SNPRINTF])
! m4trace:configure.ac:194: -1- AH_OUTPUT([HAVE___SNPRINTF], [/* Define to 1 if you have the \`__snprintf' function. */
#undef HAVE___SNPRINTF])
! m4trace:configure.ac:211: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_AUDIOIO_H])
! m4trace:configure.ac:211: -3- AC_DEFINE_TRACE_LITERAL([HAVE_SUN_AUDIOIO_H])
! m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_NAS])
! m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_OSS])
! m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_SUN])
! m4trace:configure.ac:211: -1- AC_CHECK_HEADERS([sys/audioio.h])
! m4trace:configure.ac:211: -1- AH_OUTPUT([HAVE_SYS_AUDIOIO_H], [/* Define to 1 if you have the <sys/audioio.h> header file. */
#undef HAVE_SYS_AUDIOIO_H])
! m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_NONE])
! m4trace:configure.ac:216: -1- AC_SUBST([INTERP])
! m4trace:configure.ac:216: -1- AC_PROG_AWK
! m4trace:configure.ac:216: -1- AC_SUBST([AWK])
! m4trace:configure.ac:217: -1- AC_DEFINE_TRACE_LITERAL([VM_MODULE_PREFIX])
! m4trace:configure.ac:222: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
! m4trace:configure.ac:222: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN])
! m4trace:configure.ac:223: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_WORD_ALIGNMENT])
! m4trace:configure.ac:224: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_WORD_ORDER])
! m4trace:configure.ac:228: -1- AC_DEFINE_TRACE_LITERAL([DARWIN])
! m4trace:configure.ac:238: -1- AC_SUBST([npsqueak])
! m4trace:configure.ac:239: -1- AC_SUBST([install_nps])
! m4trace:configure.ac:240: -1- AC_SUBST([uninstall_nps])
! m4trace:configure.ac:265: -1- AC_SUBST([SQ_LIBDIR])
! m4trace:configure.ac:266: -1- AC_DEFINE_TRACE_LITERAL([SQ_LIBDIR])
! m4trace:configure.ac:267: -1- AC_DEFINE_TRACE_LITERAL([VM_LIBDIR])
m4trace:acplugins.m4:17: -1- AC_CHECK_LIB([GL], [glIsEnabled], [AC_PLUGIN_USE_LIB(GL)], [unset ac_cv_lib_GL_glIsEnabled # stupid moronic pathetic autoconf
AC_CHECK_LIB(GL,glIsEnabled,
--- 138,316 ----
])
])
! m4trace:configure.ac:111: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
! m4trace:configure.ac:111: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
! m4trace:configure.ac:111: -1- AC_CHECK_HEADERS([dlfcn.h])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H])
! m4trace:configure.ac:111: -1- AC_HEADER_STDC
! m4trace:configure.ac:111: -1- AC_PROG_CPP
! m4trace:configure.ac:111: -1- AC_SUBST([CPP])
! m4trace:configure.ac:111: -1- AC_SUBST([CPPFLAGS])
! m4trace:configure.ac:111: -1- AC_SUBST([CPP])
! m4trace:configure.ac:111: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
! m4trace:configure.ac:111: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
! m4trace:configure.ac:111: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
! m4trace:configure.ac:111: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
! m4trace:configure.ac:111: -1- AC_SUBST([LIBTOOL])
! m4trace:configure.ac:117: -1- AC_SUBST([INCLUDES])
! m4trace:configure.ac:128: -1- AC_DEFINE_TRACE_LITERAL([USE_X11])
! m4trace:configure.ac:130: -1- AC_PATH_X
! m4trace:configure.ac:130: -1- AC_DEFINE_TRACE_LITERAL([X_DISPLAY_MISSING])
! m4trace:configure.ac:130: -1- AH_OUTPUT([X_DISPLAY_MISSING], [/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([dnet], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([dnet_stub], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([nsl], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([bsd], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([socket], [connect], [X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"], [], [$X_EXTRA_LIBS])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([posix], [remove], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([ipc], [shmat], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"])
! m4trace:configure.ac:130: -1- AC_CHECK_LIB([ICE], [IceConnectionNumber], [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], [], [$X_EXTRA_LIBS])
! m4trace:configure.ac:130: -1- AC_SUBST([X_CFLAGS])
! m4trace:configure.ac:130: -1- AC_SUBST([X_PRE_LIBS])
! m4trace:configure.ac:130: -1- AC_SUBST([X_LIBS])
! m4trace:configure.ac:130: -1- AC_SUBST([X_EXTRA_LIBS])
! m4trace:configure.ac:142: -1- AC_SUBST([NOX])
! m4trace:configure.ac:146: -1- AC_DEFINE_TRACE_LITERAL([NEED_SUNOS_H])
! m4trace:configure.ac:148: -1- AC_HEADER_STDC([])
! m4trace:configure.ac:148: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
! m4trace:configure.ac:148: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
! m4trace:configure.ac:149: -1- AC_CHECK_HEADERS([unistd.h string.h fcntl.h sys/file.h sys/param.h])
! m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
! m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
! m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H])
! m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_SYS_FILE_H], [/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H])
! m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H])
! m4trace:configure.ac:150: -1- AC_CHECK_HEADERS([sys/time.h sys/filio.h sys/select.h dlfcn.h])
! m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H])
! m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_SYS_FILIO_H], [/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H])
! m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H])
! m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
! #undef HAVE_DLFCN_H])
! m4trace:configure.ac:151: -1- AC_HEADER_TIME
! m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
! m4trace:configure.ac:151: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME])
! m4trace:configure.ac:152: -1- AC_HEADER_DIRENT
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines \`DIR'.
*/
#undef HAVE_DIRENT_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines \`DIR'.
*/
#undef HAVE_SYS_NDIR_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines \`DIR'.
*/
#undef HAVE_SYS_DIR_H])
! m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines \`DIR'. */
#undef HAVE_NDIR_H])
! m4trace:configure.ac:154: -1- AC_STRUCT_TIMEZONE
! m4trace:configure.ac:154: -1- AC_STRUCT_TM
! m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
! m4trace:configure.ac:154: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares \`struct tm'. */
#undef TM_IN_SYS_TIME])
! m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
! m4trace:configure.ac:154: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if \`tm_zone' is member of \`struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE])
! m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
! m4trace:configure.ac:154: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your \`struct tm' has \`tm_zone'. Deprecated, use
\`HAVE_STRUCT_TM_TM_ZONE' instead. */
#undef HAVE_TM_ZONE])
! m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
! m4trace:configure.ac:154: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don't have \`tm_zone' but do have the external array
\`tzname'. */
#undef HAVE_TZNAME])
! m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([socklen_t])
! m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([AT_EXIT])
! m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZSET])
! m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_GMTOFF])
! m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIMEZONE])
! m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([NEED_GETHOSTNAME_P])
! m4trace:configure.ac:169: -1- AC_DEFINE_TRACE_LITERAL([USE_RFB])
! m4trace:configure.ac:173: -1- AC_CHECK_LIB([nsl], [yp_bind])
! m4trace:configure.ac:173: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the \`nsl' library (-lnsl). */
#undef HAVE_LIBNSL])
! m4trace:configure.ac:173: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
! m4trace:configure.ac:174: -1- AC_CHECK_LIB([socket], [socket])
! m4trace:configure.ac:174: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the \`socket' library (-lsocket). */
#undef HAVE_LIBSOCKET])
! m4trace:configure.ac:174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
! m4trace:configure.ac:175: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
! m4trace:configure.ac:176: -2- AC_CHECK_LIB([dl], [dlopen])
! m4trace:configure.ac:176: -2- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the \`dl' library (-ldl). */
! #undef HAVE_LIBDL])
! m4trace:configure.ac:176: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
! m4trace:configure.ac:177: -1- AC_CHECK_LIB([m], [sin])
! m4trace:configure.ac:177: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the \`m' library (-lm). */
#undef HAVE_LIBM])
! m4trace:configure.ac:177: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM])
! m4trace:configure.ac:179: -1- AC_CHECK_LIB([X11], [XOpenDisplay])
! m4trace:configure.ac:179: -1- AH_OUTPUT([HAVE_LIBX11], [/* Define to 1 if you have the \`X11' library (-lX11). */
#undef HAVE_LIBX11])
! m4trace:configure.ac:179: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBX11])
! m4trace:configure.ac:180: -1- AC_CHECK_LIB([Xext], [XShmAttach])
! m4trace:configure.ac:180: -1- AH_OUTPUT([HAVE_LIBXEXT], [/* Define to 1 if you have the \`Xext' library (-lXext). */
#undef HAVE_LIBXEXT])
! m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXEXT])
! m4trace:configure.ac:183: -1- AC_CHECK_FUNCS([snprintf __snprintf], [break])
! m4trace:configure.ac:183: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the \`snprintf' function. */
#undef HAVE_SNPRINTF])
! m4trace:configure.ac:183: -1- AH_OUTPUT([HAVE___SNPRINTF], [/* Define to 1 if you have the \`__snprintf' function. */
#undef HAVE___SNPRINTF])
! m4trace:configure.ac:200: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_AUDIOIO_H])
! m4trace:configure.ac:200: -3- AC_DEFINE_TRACE_LITERAL([HAVE_SUN_AUDIOIO_H])
! m4trace:configure.ac:200: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_NAS])
! m4trace:configure.ac:200: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_OSS])
! m4trace:configure.ac:200: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_SUN])
! m4trace:configure.ac:200: -1- AC_CHECK_HEADERS([sys/audioio.h])
! m4trace:configure.ac:200: -1- AH_OUTPUT([HAVE_SYS_AUDIOIO_H], [/* Define to 1 if you have the <sys/audioio.h> header file. */
#undef HAVE_SYS_AUDIOIO_H])
! m4trace:configure.ac:200: -1- AC_DEFINE_TRACE_LITERAL([USE_AUDIO_NONE])
! m4trace:configure.ac:205: -1- AC_SUBST([INTERP])
! m4trace:configure.ac:205: -1- AC_PROG_AWK
! m4trace:configure.ac:205: -1- AC_SUBST([AWK])
! m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([VM_MODULE_PREFIX])
! m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
! m4trace:configure.ac:211: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN])
! m4trace:configure.ac:212: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_WORD_ALIGNMENT])
! m4trace:configure.ac:213: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_WORD_ORDER])
! m4trace:configure.ac:219: -1- AC_DEFINE_TRACE_LITERAL([VM_DLSYM_PREFIX])
! m4trace:configure.ac:225: -1- AC_SUBST([npsqueak])
! m4trace:configure.ac:226: -1- AC_SUBST([install_nps])
! m4trace:configure.ac:227: -1- AC_SUBST([uninstall_nps])
! m4trace:configure.ac:252: -1- AC_SUBST([SQ_LIBDIR])
! m4trace:configure.ac:253: -1- AC_DEFINE_TRACE_LITERAL([SQ_LIBDIR])
! m4trace:configure.ac:254: -1- AC_DEFINE_TRACE_LITERAL([VM_LIBDIR])
m4trace:acplugins.m4:17: -1- AC_CHECK_LIB([GL], [glIsEnabled], [AC_PLUGIN_USE_LIB(GL...
[truncated message content] |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:26
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv21322/SocketPlugin Modified Files: sqUnixSocket.c Log Message: Ian Piumarta's release 3.5-1devel Index: sqUnixSocket.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sqUnixSocket.c 12 May 2003 07:39:04 -0000 1.5 --- sqUnixSocket.c 13 May 2003 22:27:10 -0000 1.6 *************** *** 5,8 **** --- 5,12 ---- * All rights reserved. * + * You are NOT ALLOWED to distribute modified versions of this file + * under its original name. If you want to modify it and then make + * your modifications available publicly, rename the file first. + * * This file is part of Unix Squeak. * *************** *** 13,17 **** * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following additional restrictions: * * 1. The origin of this software must not be misrepresented; you must not *************** *** 21,38 **** * would be appreciated but is not required. * ! * 2. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. - * - * You are not allowed to distribute a modified version of this file - * under its original name without explicit permission to do so. If - * you change it, rename it. */ /* Author: Ian...@in... * ! * Last edited: 2003-01-31 12:02:24 by piumarta on emilia.local. * * Support for BSD-style "accept" primitives contributed by: --- 25,41 ---- * would be appreciated but is not required. * ! * 2. You must not distribute (or make publicly available by any ! * means) a modified copy of this file unless you first rename it. ! * ! * 3. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. */ /* Author: Ian...@in... * ! * Last edited: 2003-02-27 19:51:04 by piumarta on emilia.inria.fr * * Support for BSD-style "accept" primitives contributed by: *************** *** 142,145 **** --- 145,150 ---- #define ThisEndClosed 4 + #define LINGER_SECS 1 + static int thisNetSession= 0; static int one= 1; *************** *** 241,244 **** --- 246,256 ---- /*** miscellaneous sundries ***/ + /* set linger on a connected stream */ + + static void setLinger(int fd, int flag) + { + struct linger linger= { flag, flag * LINGER_SECS }; + setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&linger, sizeof(linger)); + } /* answer the hostname for the given IP address */ *************** *** 361,366 **** { pss->sockState= Connected; ! ! if (pss->multiListen) { --- 373,377 ---- { pss->sockState= Connected; ! setLinger(newSock, 1); if (pss->multiListen) { *************** *** 407,410 **** --- 418,422 ---- { pss->sockState= Connected; + setLinger(pss->s, 1); } } *************** *** 606,610 **** PSP(s)->multiListen= (backlogSize > 1); ! FPRINTF((stderr, "listenOnPortBacklogSize(%d)\n", SOCKET(s))); memset(&saddr, 0, sizeof(saddr)); saddr.sin_family= AF_INET; --- 618,622 ---- PSP(s)->multiListen= (backlogSize > 1); ! FPRINTF((stderr, "listenOnPortBacklogSize(%d, %d)\n", SOCKET(s), backlogSize)); memset(&saddr, 0, sizeof(saddr)); saddr.sin_family= AF_INET; *************** *** 659,662 **** --- 671,675 ---- SOCKETSTATE(s)= Connected; notify(PSP(s), CONN_NOTIFY); + setLinger(SOCKET(s), 1); } else *************** *** 764,767 **** --- 777,781 ---- SOCKETERROR(s)= errno; notify(PSP(s), CONN_NOTIFY); + perror("closeConnection"); } else if (0 == result) *************** *** 769,772 **** --- 783,787 ---- /* close completed synchronously */ SOCKETSTATE(s)= Unconnected; + FPRINTF((stderr, "closeConnection: disconnected\n")); SOCKET(s)= 0; } *************** *** 776,779 **** --- 791,795 ---- SOCKETSTATE(s)= ThisEndClosed; aioHandle(SOCKET(s), closeHandler, AIO_RWX); /* => close() done */ + FPRINTF((stderr, "closeConnection: deferred [aioHandle is set]\n")); } } *************** *** 784,794 **** void sqSocketAbortConnection(SocketPtr s) { - struct linger linger= { 0, 0 }; - FPRINTF((stderr, "abortConnection(%d)\n", SOCKET(s))); if (!socketValid(s)) return; ! ! setsockopt(SOCKET(s), SOL_SOCKET, SO_LINGER, (char *)&linger, sizeof(linger)); sqSocketCloseConnection(s); } --- 800,807 ---- void sqSocketAbortConnection(SocketPtr s) { FPRINTF((stderr, "abortConnection(%d)\n", SOCKET(s))); if (!socketValid(s)) return; ! setLinger(SOCKET(s), 0); sqSocketCloseConnection(s); } |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:20
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/UnixOSProcessPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv21322/UnixOSProcessPlugin Added Files: acinclude.m4 Log Message: Ian Piumarta's release 3.5-1devel --- NEW FILE: acinclude.m4 --- # Require X11 AC_CHECK_LIB(X11,XOpenDisplay, [AC_PLUGIN_USE_LIB(X11)], [AC_PLUGIN_DISABLE]) |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:20
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/zzz
In directory sc8-pr-cvs1:/tmp/cvs-serv21322/B3DAcceleratorPlugin/zzz
Added Files:
sqUnixOpenGL.OSX sqUnixOpenGL.X11
Log Message:
Ian Piumarta's release 3.5-1devel
--- NEW FILE: sqUnixOpenGL.OSX ---
/* sqUnixOpenGLOSX.c -- accelerated 3D rendering on Mac OS X using CoreGL -*- C -*-
*
* Author: Ian...@in...
*
* Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
* as listed elsewhere in this file.
* All rights reserved.
*
* You are NOT ALLOWED to distribute modified versions of this file
* under its original name. If you want to modify it and then make
* your modifications available publicly, rename the file first.
*
* This file is part of Unix Squeak.
*
* This file 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.
*
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
* this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment to the original author(s) (and any
* other contributors mentioned herein) in the product documentation
* would be appreciated but is not required.
*
* 2. You must not distribute (or make publicly available by any
* means) a modified copy of this file unless you first rename it.
*
* 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*
* Last edited: 2003-01-31 21:53:21 by piumarta on emilia.local.
*/
#include <sys/types.h>
#include "sqVirtualMachine.h"
#include "sqPlatformSpecific.h"
#include "B3DAcceleratorPlugin.h"
#if defined (B3DX_GL)
#include "sqUnixOpenGL.h"
#include "sqOpenGLRenderer.h"
#include <stdio.h>
extern void *ioGLcreateView(int x, int y, int w, int h, int flags);
extern void *ioGLcreateContext(void *drawable);
extern int ioGLsetCurrentContext(void *ctx);
extern int ioGLdestroyContext(void *ctx);
extern int ioGLdestroyView(void *drawable);
extern int ioGLflushBuffer(void *drawable, void *ctx);
int verboseLevel= 1;
extern struct VirtualMachine *interpreterProxy;
static glRenderer *current= 0;
static glRenderer renderers[MAX_RENDERER];
static float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };
#define TRACE() fprintf(stderr, "--- %s\n", __PRETTY_FUNCTION__)
int glInitialize(void)
{
int i;
TRACE();
for (i= 0; i < MAX_RENDERER; ++i)
renderers[i].used= 0;
return 1;
}
int glShutdown(void) { TRACE(); }
int glMakeCurrentRenderer(glRenderer *renderer)
{
GLboolean ok;
GLint err;
//dprintf("glMakeCurrentRenderer(%p)\n", renderer);
if (current == renderer)
return 1;
if (renderer && ((!renderer->used) || (!renderer->context)))
return 0;
ok= ioGLsetCurrentContext(renderer ? renderer->context : 0);
if ((err= glGetError()) != GL_NO_ERROR)
fprintf(stderr, "glMakeCurrentRenderer: %s\n", CGLErrorString(err));
if (!ok)
{
fprintf(stderr, "glMakeCurrentRenderer: glSetCurrentContext failed\n");
return 0;
}
current= renderer;
return 1;
}
int glCreateRendererFlags(int x, int y, int w, int h, int flags)
{
void *drawable= 0;
void *context= 0;
glRenderer *renderer= 0;
int i;
//printf("glCreateRendererFlags(%d, %d, %d, %d, 0x%x)\n", x, y, w, h, flags);
for (i= 0; i < MAX_RENDERER; ++i)
if (!renderers[i].used)
break;
if (i == MAX_RENDERER)
{
fprintf(stderr, "glCreateRenderer: too many renderers\n");
return -1;
}
renderer= renderers+i;
//printf(" renderer = %p handle %d\n", renderer, i);
drawable= ioGLcreateView(x, y, w, h, flags);
//printf(" drawable = %p\n", drawable);
if (!drawable)
return -1;
context= ioGLcreateContext(drawable);
//printf(" context = %p\n", context);
if (!context)
{
ioGLdestroyView(drawable);
return -1;
}
renderer->context= context;
renderer->drawable= drawable;
renderer->used= 1;
#if 0
renderer->finished = 0;
#endif
renderer->bufferRect[0] = x;
renderer->bufferRect[1] = y;
renderer->bufferRect[2] = w;
renderer->bufferRect[3] = h;
glMakeCurrentRenderer(renderer);
//dprintf(" vendor: %s\n", glGetString(GL_VENDOR));
//dprintf(" renderer: %s\n", glGetString(GL_RENDERER));
//dprintf(" version: %s\n", glGetString(GL_VERSION));
//dprintf(" extensions: %s\n", glGetString(GL_EXTENSIONS));
ERROR_CHECK;
//dprintf(" renderer created, handle = %d\n", i);
/* setup user context */
glDisable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glEnable(GL_DITHER);
glEnable(GL_DEPTH_TEST);
glEnable(GL_NORMALIZE);
glDepthFunc(GL_LEQUAL);
glClearDepth(1.0);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glShadeModel(GL_SMOOTH);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);
ERROR_CHECK;
return i;
}
glRenderer *glRendererFromHandle(int handle)
{
if ((handle < 0) || (handle >= MAX_RENDERER))
{
fprintf(stderr, "GL: illegal handle: %d\n", handle);
return 0;
}
return renderers+0;
}
int glDestroyRenderer(int handle)
{
glRenderer *renderer= glRendererFromHandle(handle);
TRACE();
if (!renderer)
return 1; /* already destroyed */
if (!glMakeCurrentRenderer(0))
return 0;
ioGLdestroyContext(renderer->context);
ioGLdestroyView(renderer->drawable);
renderer->context= 0;
renderer->used= 0;
return 1;
}
int glIsOverlayRenderer(int handle)
{
TRACE();
return 1;
}
int glSwapBuffers(glRenderer *renderer)
{
ioGLflushBuffer(renderer->drawable, renderer->context);
}
int glSetBufferRect(int handle, int x, int y, int w, int h)
{
glRenderer *renderer= 0;
printf("glSetBufferRect(%d, %d, %d, %d, %d)\n", handle, x, y, w, h);
renderer= glRendererFromHandle(handle);
if (!renderer || !glMakeCurrentRenderer(renderer))
return 0;
if (w < 1 || h < 1)
return 0;
renderer->bufferRect[0]= x;
renderer->bufferRect[1]= y;
renderer->bufferRect[2]= w;
renderer->bufferRect[3]= h;
ioGLsetBufferRect(renderer->context);
return 1;
}
int glSetVerboseLevel(int level) { TRACE(); /*exit(1);*/ }
int glGetIntPropertyOS(int handle, int prop) { TRACE(); exit(1); }
int glSetIntPropertyOS(int handle, int prop, int value) { TRACE(); exit(1); }
#endif /* defined(B3DX_GL) */
--- NEW FILE: sqUnixOpenGL.X11 ---
/* sqUnixOpenGLX11.c -- support for accelerated 3D rendering under X11 -*- C -*-
*
* Author: Bert Freudenberg <be...@is...>
*
* Based on Andreas Raab's sqWin32OpenGL.c
*
* Last edited: 2003-01-31 22:40:39 by piumarta on emilia.local.
*
* History
* Nov 02: added TGraphicsTest conformant log support
* Oct 02: added Tea initialization support w/ stencil
* May 01: initial revision
*/
#include <sys/types.h>
#include "sqVirtualMachine.h"
#include "sqConfig.h"
#include "sqPlatformSpecific.h"
#include "B3DAcceleratorPlugin.h"
#if defined (B3DX_GL)
#include "sqUnixOpenGL.h"
#include <X11/X.h>
#include <stdio.h>
#include "sqOpenGLRenderer.h"
/* Plugin refs */
extern struct VirtualMachine *interpreterProxy;
static void printVisual(XVisualInfo* visinfo);
static void listVisuals();
static Display *stDisplay= NULL; /* Squeak's display */
static Window stWindow= 0; /* Squeak's main window */
static glRenderer *current= NULL;
static glRenderer allRenderer[MAX_RENDERER];
static int visualAttributes[]= {
GLX_STENCIL_SIZE, 0, /* filled in later - must be first item! */
GLX_ALPHA_SIZE, 1, /* filled in later - must be second item! */
GLX_RGBA, /* no indexed colors */
GLX_DOUBLEBUFFER, /* will swap */
GLX_LEVEL, 0, /* frame buffer, not overlay */
GLX_DEPTH_SIZE, 16, /* decent depth */
GLX_AUX_BUFFERS, 0, /* no aux buffers */
GLX_ACCUM_RED_SIZE, 0, /* no accumulation */
GLX_ACCUM_GREEN_SIZE, 0,
GLX_ACCUM_BLUE_SIZE, 0,
GLX_ACCUM_ALPHA_SIZE, 0,
None
};
static float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };
/* Verbose level for debugging purposes:
0 - print NO information ever
1 - print critical debug errors
2 - print debug warnings
3 - print extra information
4 - print extra warnings
5 - print information about primitive execution
10 - print information about each vertex and face
*/
int verboseLevel= 1;
/*** create / destroy a renderer ***/
int glCreateRendererFlags(int x, int y, int w, int h, int flags)
{
glRenderer *renderer;
XVisualInfo* visinfo= 0;
int index= -1;
if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))
{
DPRINTF(1, (fp, "ERROR: Unsupported renderer flags (%d)\r", flags));
return -1;
}
if (flags & B3D_STENCIL_BUFFER)
visualAttributes[1]= 1;
else
visualAttributes[1]= 0;
/* find unused renderer */
{
int i;
for (i= 0; i < MAX_RENDERER; i++)
{
if (!allRenderer[i].used)
{
index= i;
break;
}
}
}
if (index == -1)
{
DPRINTF(1, (fp, "ERROR: Maximum number of renderers (%d) exceeded\r", MAX_RENDERER));
return 0;
}
renderer= &allRenderer[index];
renderer->used= True;
renderer->window= 0;
renderer->context= NULL;
DPRINTF(3, (fp, "---- Creating new renderer ----\r\r"));
/* sanity checks */
if (w < 0 || h < 0)
{
DPRINTF(1, (fp, "Negative extent (%i@%i)!\r", w, h));
goto FAILED;
}
/* choose visual and create context */
if (verboseLevel >= 3)
listVisuals();
{
visinfo= glXChooseVisual(stDisplay,
DefaultScreen(stDisplay),
visualAttributes);
if (!visinfo)
{
/* retry without alpha */
visualAttributes[3]= 0;
visinfo= glXChooseVisual(stDisplay,
DefaultScreen(stDisplay),
visualAttributes);
}
if (!visinfo)
{
DPRINTF(1, (fp, "No OpenGL visual found!\r"));
goto FAILED;
}
DPRINTF(3, (fp, "\r#### Selected GLX visual ID 0x%lx ####\r",
visinfo->visualid));
if (verboseLevel >= 3)
printVisual(visinfo);
renderer->context= glXCreateContext(stDisplay, visinfo, 0, GL_TRUE);
if (!renderer->context)
{
DPRINTF(1, (fp, "Creating GLX context failed!\r"));
goto FAILED;
}
DPRINTF(3, (fp, "\r#### Created GLX context ####\r" ));
/* create window */
{
XSetWindowAttributes attributes;
unsigned long valuemask= 0;
attributes.colormap= XCreateColormap(stDisplay,
DefaultRootWindow(stDisplay),
visinfo->visual,
AllocNone);
valuemask|= CWColormap;
attributes.background_pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));
valuemask|= CWBackPixel;
renderer->window= XCreateWindow(stDisplay, stWindow, x, y, w, h, 0,
visinfo->depth, InputOutput, visinfo->visual,
valuemask, &attributes);
if (!renderer->window)
{
DPRINTF(1, (fp, "Failed to create client window\r"));
goto FAILED;
}
XMapWindow(stDisplay, renderer->window);
}
DPRINTF(3, (fp, "\r#### Created window ####\r" ));
XFree(visinfo);
visinfo= 0;
}
/* Make the context current */
if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))
{
DPRINTF(1, (fp, "Failed to make context current\r"));
goto FAILED;
}
renderer->bufferRect[0]= x;
renderer->bufferRect[1]= y;
renderer->bufferRect[2]= w;
renderer->bufferRect[3]= h;
DPRINTF(3, (fp, "\r### Renderer created! ###\r"));
/* setup user context */
glDisable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glEnable(GL_DITHER);
glEnable(GL_DEPTH_TEST);
glEnable(GL_NORMALIZE);
glDepthFunc(GL_LEQUAL);
glClearDepth(1.0);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glShadeModel(GL_SMOOTH);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);
ERROR_CHECK;
return index;
FAILED:
/* do necessary cleanup */
DPRINTF(1, (fp, "OpenGL initialization failed\r"));
if (visinfo)
XFree(visinfo);
if (renderer->context)
glXDestroyContext(stDisplay, renderer->context);
if (renderer->window)
XDestroyWindow(stDisplay, renderer->window);
return -1;
}
int glDestroyRenderer(int handle)
{
glRenderer *renderer= glRendererFromHandle(handle);
DPRINTF(3, (fp, "\r--- Destroying renderer ---\r"));
if (!renderer)
return 1; /* already destroyed */
if (!glMakeCurrentRenderer(NULL))
return 0;
glXDestroyContext(stDisplay, renderer->context);
XDestroyWindow(stDisplay, renderer->window);
renderer->window= 0;
renderer->context= NULL;
renderer->used= False;
return 1;
}
/*** helpers ***/
glRenderer *glRendererFromHandle(int handle)
{
DPRINTF(7, (fp, "Looking for renderer id: %i\r", handle));
if (handle < 0 || handle >= MAX_RENDERER)
return NULL;
if (allRenderer[handle].used)
return allRenderer+handle;
return NULL;
}
int glIsOverlayRenderer(int handle)
{
/* we always use overlay renderers */
return 1;
}
int glSwapBuffers(glRenderer *renderer)
{
if (!renderer || !renderer->used)
return 0;
glXSwapBuffers(stDisplay, renderer->window);
return 1;
}
int glMakeCurrentRenderer(glRenderer *renderer)
{
if (current == renderer)
return 1;
if (renderer && !renderer->used)
return 0;
if (renderer)
{
if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))
{
DPRINTF(1, (fp, "Failed to make context current\r"));
return 0;
}
}
else
{
glXMakeCurrent(stDisplay, 0, NULL);
}
current= renderer;
return 1;
}
int glSetBufferRect(int handle, int x, int y, int w, int h)
{
glRenderer *renderer= glRendererFromHandle(handle);
if (!renderer || !glMakeCurrentRenderer(renderer))
return 0;
if (w < 1 || h < 1)
return 0;
XMoveResizeWindow(stDisplay, renderer->window, x, y, w, h);
renderer->bufferRect[0]= x;
renderer->bufferRect[1]= y;
renderer->bufferRect[2]= w;
renderer->bufferRect[3]= h;
return 1;
}
int glSetVerboseLevel(int level)
{
verboseLevel= level;
return 1;
}
int glGetIntPropertyOS(int handle, int prop)
{
GLint v;
glRenderer *renderer= glRendererFromHandle(handle);
if (!renderer || !glMakeCurrentRenderer(renderer))
return 0;
switch(prop) {
case 1: /* backface culling */
if (!glIsEnabled(GL_CULL_FACE)) return 0;
glGetIntegerv(GL_FRONT_FACE, &v);
if (v == GL_CW) return 1;
if (v == GL_CCW) return -1;
return 0;
case 2: /* polygon mode */
glGetIntegerv(GL_POLYGON_MODE, &v);
ERROR_CHECK;
return v;
case 3: /* point size */
glGetIntegerv(GL_POINT_SIZE, &v);
ERROR_CHECK;
return v;
case 4: /* line width */
glGetIntegerv(GL_LINE_WIDTH, &v);
ERROR_CHECK;
return v;
}
return 0;
}
int glSetIntPropertyOS(int handle, int prop, int value)
{
glRenderer *renderer= glRendererFromHandle(handle);
if (!renderer || !glMakeCurrentRenderer(renderer))
return 0;
switch(prop) {
case 1: /* backface culling */
if (!value) {
glDisable(GL_CULL_FACE);
ERROR_CHECK;
return 1;
}
glEnable(GL_CULL_FACE);
glFrontFace(value == 1 ? GL_CCW : GL_CW);
ERROR_CHECK;
return 1;
case 2: /* polygon mode */
if (value == 0) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
else if (value == 1) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else if (value == 2) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
else return 0;
ERROR_CHECK;
return 1;
case 3: /* point size */
glPointSize(value);
ERROR_CHECK;
return 1;
case 4: /* line width */
glLineWidth(value);
ERROR_CHECK;
return 1;
}
return 0;
}
/* GLX_CONFIG_CAVEAT might not be supported */
/* but the test below is worded so it does not matter */
#ifndef GLX_CONFIG_CAVEAT
# define GLX_CONFIG_CAVEAT 0x20
# define GLX_SLOW_CONFIG 0x8001
#endif
static void printVisual(XVisualInfo* visinfo)
{
int isOpenGL;
glXGetConfig(stDisplay, visinfo, GLX_USE_GL, &isOpenGL);
if (isOpenGL)
{
int slow= 0;
int red, green, blue, alpha, stencil, depth;
glXGetConfig(stDisplay, visinfo, GLX_CONFIG_CAVEAT, &slow);
glXGetConfig(stDisplay, visinfo, GLX_RED_SIZE, &red);
glXGetConfig(stDisplay, visinfo, GLX_GREEN_SIZE, &green);
glXGetConfig(stDisplay, visinfo, GLX_BLUE_SIZE, &blue);
glXGetConfig(stDisplay, visinfo, GLX_ALPHA_SIZE, &alpha);
glXGetConfig(stDisplay, visinfo, GLX_STENCIL_SIZE, &stencil);
glXGetConfig(stDisplay, visinfo, GLX_DEPTH_SIZE, &depth);
if (slow != GLX_SLOW_CONFIG)
DPRINTF(3, (fp,"===> OpenGL visual\r"))
else
DPRINTF(3, (fp,"---> slow OpenGL visual\r"));
DPRINTF(3, (fp,"rgbaBits = %i+%i+%i+%i\r", red, green, blue, alpha));
DPRINTF(3, (fp,"stencilBits = %i\r", stencil));
DPRINTF(3, (fp,"depthBits = %i\r", depth));
}
}
static void listVisuals()
{
XVisualInfo* visinfo;
int nvisuals, i;
visinfo= XGetVisualInfo(stDisplay, VisualNoMask, NULL, &nvisuals);
for (i= 0; i < nvisuals; i++)
{
DPRINTF(3, (fp,"#### Checking pixel format (visual ID 0x%lx)\r", visinfo[i].visualid));
printVisual(&visinfo[i]);
}
XFree(visinfo);
}
/*** Module initializers ***/
int glInitialize(void)
{
int i, p;
int fn;
fn= interpreterProxy->ioLoadFunctionFrom("ioGetDisplay", NULL);
stDisplay= (fn ? ((Display *(*)(void))fn)() : 0);
if (!stDisplay)
{
DPRINTF(1,(fp,"ERROR: Failed to look up stDisplay\r"));
return 0;
}
fn= interpreterProxy->ioLoadFunctionFrom("ioGetWindow", NULL);
stWindow= (fn ? ((Window (*)(void))fn)() : 0);
if (!stWindow)
{
DPRINTF(1,(fp,"ERROR: Failed to look up stWindow\r"));
return 0;
}
for (i= 0; i < MAX_RENDERER; i++)
{
allRenderer[i].used= False;
}
return 1;
}
int glShutdown(void)
{
int i;
for (i=0; i< MAX_RENDERER; i++)
{
if (allRenderer[i].used)
{
glDestroyRenderer(i);
}
}
return 1;
}
#endif /* defined(B3DX_GL) */
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:20
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/FilePlugin In directory sc8-pr-cvs1:/tmp/cvs-serv21322/FilePlugin Modified Files: sqUnixFile.c Log Message: Ian Piumarta's release 3.5-1devel Index: sqUnixFile.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/FilePlugin/sqUnixFile.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sqUnixFile.c 12 May 2003 07:39:03 -0000 1.6 --- sqUnixFile.c 13 May 2003 22:27:10 -0000 1.7 *************** *** 5,8 **** --- 5,12 ---- * All rights reserved. * + * You are NOT ALLOWED to distribute modified versions of this file + * under its original name. If you want to modify it and then make + * your modifications available publicly, rename the file first. + * * This file is part of Unix Squeak. * *************** *** 13,17 **** * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not --- 17,21 ---- * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following additional restrictions: * * 1. The origin of this software must not be misrepresented; you must not *************** *** 21,42 **** * would be appreciated but is not required. * ! * 2. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. - * - * You are not allowed to distribute a modified version of this file - * under its original name without explicit permission to do so. If - * you change it, rename it. */ /* Author: Ian...@IN... * ! * Last edited: 2003-02-06 16:29:22 by piumarta on emilia.local. */ #include "sq.h" #include "FilePlugin.h" #ifdef HAVE_DIRENT_H --- 25,46 ---- * would be appreciated but is not required. * ! * 2. You must not distribute (or make publicly available by any ! * means) a modified copy of this file unless you first rename it. ! * ! * 3. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. */ /* Author: Ian...@IN... * ! * Last edited: 2003-03-02 21:07:51 by piumarta on emilia.inria.fr */ #include "sq.h" #include "FilePlugin.h" + #include "sqUnixCharConv.h" #ifdef HAVE_DIRENT_H *************** *** 95,100 **** extern time_t convertToSqueakTime(time_t unixTime); - int maybeOpenDir(char *unixPath); - int dir_Create(char *pathString, int pathStringLength) { --- 99,102 ---- *************** *** 105,111 **** if (pathStringLength >= MAXPATHLEN) return false; ! for (i = 0; i < pathStringLength; i++) ! name[i] = pathString[i]; ! name[i] = 0; /* string terminator */ return mkdir(name, 0777) == 0; /* rwxrwxrwx & ~umask */ } --- 107,112 ---- if (pathStringLength >= MAXPATHLEN) return false; ! if (!sq2uxPath(pathString, pathStringLength, name, MAXPATHLEN, 1)) ! return false; return mkdir(name, 0777) == 0; /* rwxrwxrwx & ~umask */ } *************** *** 118,126 **** if (pathStringLength >= MAXPATHLEN) return false; ! for (i= 0; i < pathStringLength; ++i) ! name[i]= pathString[i]; ! if (!strcmp(lastPath, name)) ! lastPathValid= false; ! name[i]= '\0'; /* string terminator */ return rmdir(name) == 0; } --- 119,124 ---- if (pathStringLength >= MAXPATHLEN) return false; ! if (!sq2uxPath(pathString, pathStringLength, name, MAXPATHLEN, 1)) ! return false; return rmdir(name) == 0; } *************** *** 131,134 **** --- 129,153 ---- } + static int maybeOpenDir(char *unixPath) + { + /* if the last opendir was to the same directory, re-use the directory + pointer from last time. Otherwise close the previous directory, + open the new one, and save its name. Return true if the operation + was successful, false if not. */ + if (!lastPathValid || strcmp(lastPath, unixPath)) + { + /* invalidate the old, open the new */ + if (lastPathValid) + closedir(openDir); + lastPathValid= false; + strcpy(lastPath, unixPath); + if ((openDir= opendir(unixPath)) == 0) + return false; + lastPathValid= true; + lastIndex= 0; /* first entry is index 1 */ + } + return true; + } + int dir_Lookup(char *pathString, int pathStringLength, int index, /* outputs: */ char *name, int *nameLength, int *creationDate, int *modificationDate, *************** *** 159,174 **** if ((pathStringLength == 0)) strcpy(unixPath, "."); ! else ! { ! for (i= 0; i < pathStringLength; i++) ! unixPath[i]= pathString[i]; ! unixPath[i]= 0; ! } /* get file or directory info */ if (!maybeOpenDir(unixPath)) ! { ! return BAD_PATH; ! } if (++lastIndex == index) --- 178,187 ---- if ((pathStringLength == 0)) strcpy(unixPath, "."); ! else if (!sq2uxPath(pathString, pathStringLength, unixPath, MAXPATHLEN, 1)) ! return BAD_PATH; /* get file or directory info */ if (!maybeOpenDir(unixPath)) ! return BAD_PATH; if (++lastIndex == index) *************** *** 201,206 **** } ! strncpy(name, dirEntry->d_name, nameLen); ! *nameLength= nameLen; { --- 214,218 ---- } ! *nameLength= ux2sqPath(dirEntry->d_name, nameLen, name, MAXPATHLEN, 0); { *************** *** 231,255 **** } - int maybeOpenDir(char *unixPath) - { - /* if the last opendir was to the same directory, re-use the directory - pointer from last time. Otherwise close the previous directory, - open the new one, and save its name. Return true if the operation - was successful, false if not. */ - if (!lastPathValid || strcmp(lastPath, unixPath)) - { - /* invalidate the old, open the new */ - if (lastPathValid) - closedir(openDir); - lastPathValid= false; - strcpy(lastPath, unixPath); - if ((openDir= opendir(unixPath)) == 0) - return false; - lastPathValid= true; - lastIndex= 0; /* first entry is index 1 */ - } - return true; - } - int dir_SetMacFileTypeAndCreator(char *filename, int filenameSize, char *fType, char *fCreator) --- 243,246 ---- *************** *** 265,266 **** --- 256,294 ---- return true; } + + + #if defined(SQ_STDIO_UTF8) + + /* Intercept stdio functions to convert pathnames to UTF-8. + * (HFS+ also imposes Unicode2.1 canonically-decomposed UTF-8 encoding on all path elements; + * calling sq2uxPath() on OSX performs the required normalisation on the output path.) + * see sqUnixCharConv.c for gory details. + */ + + # undef fopen + # undef delete + # undef remove + + FILE *sq_fopen(char *path, const char *mode) + { + char normalised[MAXPATHLEN]; + sq2uxPath(path, strlen(path), normalised, MAXPATHLEN, 1); + return fopen(normalised, mode); + } + + int sq_remove(char *path) + { + char normalised[MAXPATHLEN]; + sq2uxPath(path, strlen(path), normalised, MAXPATHLEN, 1); + return remove(normalised); + } + + int sq_rename(char *from, char *to) + { + char normalisedFrom[MAXPATHLEN], normalisedTo[MAXPATHLEN]; + sq2uxPath(from, strlen(from), normalisedFrom, MAXPATHLEN, 1); + sq2uxPath(to, strlen(to), normalisedTo, MAXPATHLEN, 1); + return rename(normalisedFrom, normalisedTo); + } + + #endif /* defined(SQ_UTF8_STDIO) */ |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:19
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SoundPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv21322/SoundPlugin Modified Files: sqUnixSound.c Log Message: Ian Piumarta's release 3.5-1devel Index: sqUnixSound.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SoundPlugin/sqUnixSound.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sqUnixSound.c 12 May 2003 07:39:07 -0000 1.5 --- sqUnixSound.c 13 May 2003 22:27:10 -0000 1.6 *************** *** 1,7 **** /* sqUnixSound.c -- sound support for various Unix sound systems * ! * Authors: Ian...@in... and Lex Spoon <le...@cc...> * ! * Last edited: 2002-10-26 14:37:22 by piumarta on emilia.inria.fr * * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors --- 1,7 ---- /* sqUnixSound.c -- sound support for various Unix sound systems * ! * Author: Ian...@in... * ! * Last edited: 2003-02-09 18:15:00 by piumarta on emilia.inria.fr * * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors *************** *** 9,12 **** --- 9,16 ---- * All rights reserved. * + * You are NOT ALLOWED to distribute modified versions of this file + * under its original name. If you want to modify it and then make + * your modifications available publicly, rename the file first. + * * This file is part of Unix Squeak. * *************** *** 17,21 **** * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not --- 21,25 ---- * You may use and/or distribute this file ONLY as part of Squeak, under * the terms of the Squeak License as described in `LICENSE' in the base of ! * this distribution, subject to the following additional restrictions: * * 1. The origin of this software must not be misrepresented; you must not *************** *** 25,37 **** * would be appreciated but is not required. * ! * 2. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. - * - * You are not allowed to distribute a modified version of this file - * under its original name without explicit permission to do so. If - * you change it, rename it. * * NOTE: The real sound support code is in one of the following files according --- 29,40 ---- * would be appreciated but is not required. * ! * 2. You must not distribute (or make publicly available by any ! * means) a modified copy of this file unless you first rename it. ! * ! * 3. This notice must not be removed or altered in any source distribution. * * Using (or modifying this file for use) in any context other than Squeak * changes these copyright conditions. Read the file `COPYING' in the * directory `platforms/unix/doc' before proceeding with any such use. * * NOTE: The real sound support code is in one of the following files according *************** *** 41,58 **** * sqUnixSoundNAS.c (Network Audio System) * sqUnixSoundSun.c (SunOS/Solaris) ! * sqUnixSoundNone.c (no sound support) */ #include "sq.h" #include "SoundPlugin.h" extern int snd_Stop(void); - /*** module initialisation/shutdown ***/ int soundInit(void) { return 1; } --- 44,89 ---- * sqUnixSoundNAS.c (Network Audio System) * sqUnixSoundSun.c (SunOS/Solaris) ! * sqUnixSoundMacOSX.c (Mac OS 10 CoreAudio) ! * sqUnixSoundNull.c (sound disabled) */ #include "sq.h" #include "SoundPlugin.h" + #include "SqModule.h" + #include "SqSound.h" extern int snd_Stop(void); /*** module initialisation/shutdown ***/ + extern struct SqModule *soundModule; + extern struct SqModule *loadModule(char *type, char *name); + + static struct SqSound *snd= 0; int soundInit(void) { + if (!soundModule + && !(soundModule= getenv("SQUEAK_SOUND_OSS") ? loadModule("sound", "OSS") : 0) + && !(soundModule= getenv("SQUEAK_SOUND_NAS") ? loadModule("sound", "NAS") : 0) + && !(soundModule= getenv("SQUEAK_SOUND_SUN") ? loadModule("sound", "Sun") : 0) + && !(soundModule= getenv("SQUEAK_SOUND_MACOSX") ? loadModule("sound", "MacOSX") : 0) + && !(soundModule= getenv("AUDIOSERVER") ? loadModule("sound", "NAS") : 0) + && !(soundModule= loadModule("sound", "OSS")) + && !(soundModule= loadModule("sound", "Sun")) + && !(soundModule= loadModule("sound", "MacOSX")) + && !(soundModule= loadModule("sound", "null"))) + { + fprintf(stderr, "could not find any sound module\n"); + abort(); + } + printf("soundModule %p %s\n", soundModule, soundModule->name); + snd= (struct SqSound *)soundModule->makeInterface(); + if (SqSoundVersion != snd->version) + { + fprintf(stderr, "module %s interface version %x does not have required version %x\n", + soundModule->name, snd->version, SqSoundVersion); + abort(); + } return 1; } *************** *** 61,65 **** int soundShutdown(void) { ! snd_Stop(); return 1; } --- 92,157 ---- int soundShutdown(void) { ! if (snd) snd->snd_Stop(); return 1; } + + + /* output */ + + int snd_AvailableSpace(void) + { + return snd->snd_AvailableSpace(); + } + + int snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime) + { + return snd->snd_InsertSamplesFromLeadTime(frameCount, srcBufPtr, samplesOfLeadTime); + } + + int snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex) + { + return snd->snd_PlaySamplesFromAtLength(frameCount, arrayIndex, startIndex); + } + + int snd_PlaySilence(void) + { + return snd->snd_PlaySilence(); + } + + int snd_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex) + { + return snd->snd_Start(frameCount, samplesPerSec, stereo, semaIndex); + } + + int snd_Stop(void) + { + return snd->snd_Stop(); + } + + /* input */ + + int snd_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex) + { + return snd->snd_StartRecording(desiredSamplesPerSec, stereo, semaIndex); + } + + int snd_StopRecording(void) + { + return snd->snd_StopRecording(); + } + + double snd_GetRecordingSampleRate(void) + { + return snd->snd_GetRecordingSampleRate(); + } + + int snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes) + { + return snd->snd_RecordSamplesIntoAtLength(buf, startSliceIndex, bufferSizeInBytes); + } + + /* mixer */ + + void snd_Volume(double *left, double *right) { snd->snd_Volume(left, right); } + void snd_SetVolume(double left, double right) { snd->snd_SetVolume(left, right); } + int snd_SetRecordLevel(int level) { return snd->snd_SetRecordLevel(level); } |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:19
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/ObjectiveCPlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv21322/ObjectiveCPlugin
Added Files:
Makefile.inc acinclude.m4 sqUnixObjC.m
Log Message:
Ian Piumarta's release 3.5-1devel
--- NEW FILE: Makefile.inc ---
PLIBS= -Wl,-framework -Wl,Foundation
--- NEW FILE: acinclude.m4 ---
# -*- sh -*-
AC_MSG_CHECKING([for Objective C support])
case $host_os in
darwin*)
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
AC_PLUGIN_DISABLE
;;
esac
--- NEW FILE: sqUnixObjC.m ---
/* SqueakObjcBridge.m created by marcel on Sat 05-Dec-1998 */
#import "sqVirtualMachine.h"
#import <Foundation/Foundation.h>
//#import <AppKit/AppKit.h>
/* Default EXPORT macro that does nothing (see comment in sq.h): */
#define EXPORT(returnType) returnType
static NSAutoreleasePool *pool;
static char *moduleName = "ObjectiveCPlugin";
/* Note: This is hardcoded so it can be run from Squeak.
The module name is used for validating a module *after*
it is loaded to check if it does really contain the module
we're thinking it contains. This is important! */
EXPORT(const char*) getModuleName(void)
{
return moduleName;
}
/* Note: This is coded so that is can be run from Squeak. */
EXPORT(int) setInterpreter(struct VirtualMachine* anInterpreter)
{
int ok;
if (anInterpreter->majorVersion() != VM_PROXY_MAJOR) {
return 0;
}
ok = anInterpreter->minorVersion() >= VM_PROXY_MINOR;
return ok;
}
EXPORT(int) initialiseModule(void)
{
pool = [[NSAutoreleasePool alloc] init];
return TRUE;
}
EXPORT(int) shutdownModule(void)
{
[pool release];
return TRUE;
}
#define longAt(i) (*((int *) (i)))
@interface NSString(SqueakValue)
-(NSString*)encodeAsSqueakValue;
-(NSRect)asNSRect;
@end
static VirtualMachine *vm()
{
static VirtualMachine *vm=NULL;
if ( vm == NULL ) {
vm=sqGetInterpreterProxy();
}
return vm;
}
static int lengthOf( unsigned int stringOop )
{
return vm()->byteSizeOf( stringOop );
}
static unsigned char *byteOf( unsigned int strinOop )
{
return (unsigned char*)strinOop+4;
}
extern int stackPointer;
extern int specialObjectsOop;
EXPORT(int) printString(void)
{
int name = longAt(stackPointer);
int length = lengthOf(name);
char *str = byteOf(name);
if (length>4) {
length=4;
}
NSLog(@"should print string (max 4 bytes of %d): '%.*s'",lengthOf(name),length,str);
stackPointer-=4;
return 0;
}
NSString *stringFromSqueakString( int squeakString )
{
int length = vm()->stSizeOf(squeakString);
char *str = byteOf(squeakString);
return [NSString stringWithCString:str length:length];
}
NSData *dataFromSqueakString( int squeakString )
{
int length = vm()->stSizeOf(squeakString);
char *str = byteOf(squeakString);
return [NSData dataWithBytes:str length:length];
}
NSArray *NSArrayFromSqueakArray( int squeakArray )
{
return nil;
}
EXPORT(int) getObjcClass(void)
{
int name = longAt(stackPointer);
int length = lengthOf(name);
char *str = byteOf(name);
id className=[NSString stringWithCString:str length:length];
Class class=NSClassFromString(className);
unsigned int intClass =(unsigned int)class;
// NSLog(@"got class: %x from string %@",intClass,className);
if ( class ) {
// NSLog(@"class is %@",class);
}
intClass>>=2;
// NSLog(@"modifed class ptr: %x/%d from string %@",intClass,intClass,className);
stackPointer-=4;
vm()->pushInteger( intClass ); //
return 0;
}
#if 0
static void writeObj( id stream, int obj )
{
if ( vm()->isIntegerObject( obj ) ) {
[stream printf:@" %d ",vm()->integerValueOf( obj )];
} else if ( vm()->isFloatObject( obj ) ) {
double temp;
temp=vm()->floatValueOf( obj );
[stream printf:@" %g ",temp];
} else if ( vm()->fetchClassOf( obj ) == vm()->classString() ) {
[stream appendBytes:vm()->firstIndexableField( obj ) length:vm()->stSizeOf(obj)];
} else if ( vm()->fetchClassOf( obj ) == vm()->classCharacter() ) {
[stream appendBytes:vm()->firstIndexableField( obj ) length:vm()->stSizeOf(obj)];
} else {
}
}
NSData *dataFromArrayOrString( int obj )
{
int class = vm()->fetchClassOf( obj );
if ( class == vm()->classString() ) {
return dataFromSqueakString( obj );
} else if ( class == vm()->classArray() ) {
int i,max;
id stream = [MPWByteStream stream];
for (i=1, max=vm()->stSizeOf(obj); i<=max;i++ ) {
writeObj( stream, vm()->stObjectat( obj, i ));
}
return [stream target];
} else {
NSLog(@"invalid object class for conversion");
return [NSData data];
}
}
void drawPS()
{
id pool = [[NSAutoreleasePool alloc] init];
id data = dataFromArrayOrString( longAt(stackPointer) );
// [(id)get_sq_view() drawPS:data];
stackPointer-=4;
vm()->pushInteger(0);
[pool release];
}
#endif
void flushPS()
{
#if 0
float x = vm()->floatValueOf(longAt( stackPointer - 12 ));
float y = vm()->floatValueOf(longAt( stackPointer - 8 ));
float width = vm()->floatValueOf(longAt( stackPointer - 4 ));
float height = vm()->floatValueOf(longAt( stackPointer ));
NSRect r = { { x,y }, { width,height }};
[(id)get_sq_view() flushRect:r];
#endif
}
id objPointerFromSqueakObjectId( int obj_id )
{
return (id)(vm()->integerValueOf( obj_id )<<2);
}
int squeakObjIdFromObjPointer( id obj_id )
{
return (((int)obj_id)>>2);
}
EXPORT(int) convertNSData(void)
{
unsigned int obj_id = longAt(stackPointer);
unsigned int result=0;
NSLog(@"convert nsdata");
if ( vm()->isIntegerObject( obj_id )) {
id nsdata;
int length;
NSLog(@"we got a proxy");
nsdata = objPointerFromSqueakObjectId( obj_id );
length = [nsdata length];
NSLog(@"length: %d",length);
result = vm()->instantiateClassindexableSize(longAt(
((((char *) specialObjectsOop)) + 4) + (6 << 2)), length );
[nsdata getBytes:(char*)result+4 length:length];
}
stackPointer-=8;
vm()->push(result);
return 0;
}
void getSqueakView()
{
int viewId;
stackPointer-=4;
// viewId = squeakObjIdFromObjPointer( get_sq_view());
NSLog(@"view id = %x",viewId);
vm()->pushInteger( viewId );
}
EXPORT(int) forwardNoArgMsg(void)
{
id selectorName=stringFromSqueakString( longAt(stackPointer) );
SEL sel=NSSelectorFromString(selectorName);
unsigned int obj_id = longAt(stackPointer-4);
unsigned int result=0;
if ( vm()->isIntegerObject( obj_id )) {
id obj;
obj = objPointerFromSqueakObjectId( obj_id );
// NSLog(@"sending selector %@ to obj %x, squeak obj id = %x",NSStringFromSelector(sel),obj,obj_id);
NS_DURING
//NSLog(@"sending selector %@ to obj %@",NSStringFromSelector(sel),obj);
if(![NSStringFromSelector(sel) isEqualToString: @"release"])
result = (int)[obj performSelector:sel];
else
NSLog(@"Faking out a release, probably non-existant.\n");
// NSLog(@"primitive returned:%d",result);
NS_HANDLER
NSLog(@"exception during message construction or forwarding %@",localException);
NS_ENDHANDLER
} else {
NSLog(@"handle not a SmallInteger");
}
stackPointer-=8;
vm()->push(result);
return 0;
}
EXPORT(int) forwardByteArrayArgMsg(void)
{
id selectorName=stringFromSqueakString( longAt(stackPointer-4) );
id arglist=stringFromSqueakString( longAt(stackPointer) );
SEL sel=NSSelectorFromString(selectorName);
unsigned int obj_id = longAt(stackPointer-8);
unsigned int result=0;
stackPointer-=12;
//NSLog(@"bridge sends msg to object %x",obj_id);
if ( vm()->isIntegerObject( obj_id ) ) {
id obj,signature;
NSInvocation *invocation;
int i;
obj = objPointerFromSqueakObjectId( obj_id );
// NSLog(@"sending selector %@ to obj %x of class %@",selectorName,obj,[obj class]);
signature = [obj methodSignatureForSelector:sel];
if ( signature && ( invocation = [NSInvocation invocationWithMethodSignature:signature] )) {
id argListPList; // we can't type this since it could be NSString, NSData, NSArray or NSDictionary
NS_DURING
// NSLog(@"arg-list %@",arglist);
argListPList = [arglist propertyList];
// NSLog(@"argListPList %@, count = %d\n", argListPList, [argListPList count]);
for (i = 0; i < [argListPList count]; i++) {
id arg = [argListPList objectAtIndex: i];
NSRect rectarg; float floatarg; double doublearg; char chararg;
const char *argtype=[[invocation methodSignature] getArgumentTypeAtIndex:i+2];
// NSLog(@"arg[%d] type = %s %@\n", i, argtype, arg);
if ( argtype && arg ) {
void *argbuffer=&arg;
switch ( *argtype ) {
case '@':
if ( [arg isKindOfClass:[NSString class]] ) {
if ( [arg cString][0] =='_') {
arg=(id)[[arg substringFromIndex:1] intValue];
} else if ( [arg cString][0] =='"' && [arg cStringLength]>=2) {
NSRange range = { 1,[arg cStringLength]-1 };
arg = [arg substringWithRange:range];
} else if([arg intValue] != 0) {
arg = (id) ([arg intValue] << 2);
// NSLog(@"We have an id, I do believe: %x\n", arg);
}
}
break;
case '#':
arg=NSClassFromString( arg );
break;
case ':':
arg=(id)NSSelectorFromString( arg );
break;
case 'i': case 'I': case 'l': case 'L':
arg=(id)[arg intValue];
break;
case 'c': case 'C':
chararg = (char) [arg intValue];
argbuffer = &chararg;
break;
case 'f':
floatarg = [arg floatValue];
argbuffer = &floatarg;
break;
case 'd':
doublearg = [arg floatValue];
argbuffer = &doublearg;
break;
default:
if ( !strcmp( argtype, "{?={?=ff}{?=ff}}") ) {
rectarg=[arg asNSRect];
argbuffer=&rectarg;
} else {
NSLog(@"unsupported argument type: '%s'",argtype);
}
}
[invocation setArgument:argbuffer atIndex:i+2];
} else {
}
}
[invocation setTarget:obj];
[invocation setSelector:sel];
[invocation invoke];
{
const char *argtype = [[invocation methodSignature] methodReturnType];
// NSLog(@"return argtype = %s\n", argtype);
if ( argtype ) {
if (*argtype != 'v' ) {
char resultbuf[200];
id encoded=nil;
// char *secondaryResult;
// int resultLen = [[invocation methodSignature] methodReturnLength];
id temp=nil;
[invocation getReturnValue:resultbuf];
switch ( argtype[strlen(argtype)-1])
{
case 'i': case 'I': case 'l': case 'L': case 'c': case 'C':
result = ((*(int*)resultbuf)<<1) + 1;
break;
case '*':
temp = [NSString stringWithCString:*(char**)resultbuf];
break;
case '@':
temp = *(id*)resultbuf;
break;
case 'd':
temp = [NSNumber numberWithDouble:*(double*)resultbuf];
break;
case 'f':
temp = [NSNumber numberWithFloat:*(float*)resultbuf];
break;
default:
if ( !strcmp( argtype, "{?={?=ff}{?=ff}}") ) {
NSRect r=*(NSRect*)resultbuf;
encoded=temp=[@"R" stringByAppendingString:[NSString stringWithFormat:@"%g @ %g extent:%g @ %g",
r.origin.x,r.origin.y,r.size.width,r.size.height]];
} else {
NSLog(@"unsupported return type: '%s'",argtype);
}
}
if ( temp ) {
if (!encoded) {
encoded = [temp encodeAsSqueakValue];
}
result = vm()->instantiateClassindexableSize( vm()->classString(), [encoded cStringLength] );
[encoded getCString:(char*)result+4 maxLength:[encoded cStringLength]];
}
}
}
}
NS_HANDLER
NSLog(@"exception during message construction or forwarding %@",localException);
NS_ENDHANDLER
} else {
NSLog(@"couldn't get message signature or invocation");
}
} else {
NSLog(@"address passed is not an integer!");
}
if ( result == 0 ) {
result=1; // SmallInteger 0
}
vm()->push(result);
return 0;
}
void forwardDirectArgMsg( )
{
id selectorName=stringFromSqueakString( longAt(stackPointer-4) );
id arglist=NSArrayFromSqueakArray( longAt(stackPointer) );
SEL sel=NSSelectorFromString(selectorName);
unsigned int obj_id = longAt(stackPointer-8);
unsigned int result=0;
stackPointer-=12;
if ( vm()->isIntegerObject( obj_id ) ) {
id obj,signature,invocation;
int i;
obj = objPointerFromSqueakObjectId( obj_id );
NSLog(@"sending selector %@ to obj %x of class %@",selectorName,obj,[obj class]);
signature = [obj methodSignatureForSelector:sel];
if ( signature && ( invocation = [NSInvocation invocationWithMethodSignature:signature] )) {
NS_DURING
// NSLog(@"arg-list %@",arglist);
arglist = [arglist propertyList];
for (i=0;i<[arglist count];i++) {
id arg = [arglist objectAtIndex:i];
NSRect rectarg; float floatarg; double doublearg;
const char *argtype=[[invocation methodSignature] getArgumentTypeAtIndex:i+2];
if ( argtype && arg ) {
void *argbuffer=&arg;
switch ( *argtype ) {
case '@':
if ( [arg isKindOfClass:[NSString class]] ) {
if ( [arg cString][0] =='_') {
arg=(id)[[arg substringFromIndex:1] intValue];
} else if ( [arg cString][0] =='"' && [arg cStringLength]>=2) {
NSRange range = { 1,[arg cStringLength]-1 };
arg = [arg substringWithRange:range];
}
}
break;
case '#':
arg=NSClassFromString( arg );
break;
case ':':
arg=(id)NSSelectorFromString( arg );
break;
case 'i': case 'I': case 'l': case 'L': case 'c': case 'C':
arg=(id)[arg intValue];
break;
case 'f':
floatarg = [arg floatValue];
argbuffer = &floatarg;
break;
case 'd':
doublearg = [arg floatValue];
argbuffer = &doublearg;
break;
default:
if ( !strcmp( argtype, "{?={?=ff}{?=ff}}") ) {
rectarg=[arg asNSRect];
argbuffer=&rectarg;
} else {
NSLog(@"unsupported argument type: '%s'",argtype);
}
}
[invocation setArgument:argbuffer atIndex:i+2];
} else {
}
}
[invocation setTarget:obj];
[invocation setSelector:sel];
[invocation invoke];
{
const char *argtype = [[invocation methodSignature] methodReturnType];
if ( argtype ) {
if (*argtype != 'v' ) {
char resultbuf[200];
// char *secondaryResult;
// int resultLen = [[invocation methodSignature] methodReturnLength];
id temp=nil;
[invocation getReturnValue:resultbuf];
switch ( argtype[strlen(argtype)-1])
{
case 'i': case 'I': case 'l': case 'L':
result = ((*(int*)resultbuf)<<1) + 1;
break;
case '*':
temp = [NSString stringWithCString:*(char**)resultbuf];
break;
case '@':
temp = *(id*)resultbuf;
break;
case 'd':
temp = [NSNumber numberWithDouble:*(double*)resultbuf];
break;
case 'f':
temp = [NSNumber numberWithFloat:*(float*)resultbuf];
break;
default:
if ( !strcmp( argtype, "{?={?=ff}{?=ff}}") ) {
temp=[@"R" stringByAppendingString:NSStringFromRect( *(NSRect*)resultbuf)];
} else {
NSLog(@"unsupported return type: '%s'",argtype);
}
}
if ( temp ) {
temp = [temp encodeAsSqueakValue];
result = vm()->instantiateClassindexableSize(longAt(((((char *) specialObjectsOop)) + 4) + (6 << 2)), [temp cStringLength] );
[temp getCString:(char*)result+4 maxLength:[temp cStringLength]];
}
}
}
}
NS_HANDLER
NSLog(@"exception during message construction or forwarding %@",localException);
NS_ENDHANDLER
} else {
NSLog(@"couldn't get message signature or invocation");
}
} else {
NSLog(@"passed obj-address is not an integer");
}
if ( result == 0 ) {
result=1; // SmallInteger 0
}
vm()->push(result);
}
@implementation NSObject(SqueakValue)
-(NSString*)encodeAsSqueakValue
{
return [@"@" stringByAppendingString:[NSString stringWithFormat:@"%d",(int)(self)>>2]];
}
-next
{
return [self nextObject];
}
@end
@implementation NSString(SqueakValue)
-(NSString*)encodeAsSqueakValue
{
return [@"*" stringByAppendingString:self];
}
-(NSRect)asNSRect
{
return NSRectFromString( self );
}
@end
@implementation NSNumber(SqueakValue)
-(NSString*)encodeAsSqueakValue
{
return [@"N" stringByAppendingString:[self stringValue]];
}
@end
@implementation NSDictionary(SqueakValue)
-(NSRect)asNSRect
{
NSRect result;
result.origin.x = [[self objectForKey:@"x"] floatValue];
result.origin.y = [[self objectForKey:@"x"] floatValue];
result.size.width = [[self objectForKey:@"width"] floatValue];
result.size.height = [[self objectForKey:@"height"] floatValue];
return result;
}
@end
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:19
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SoundPlugin/zzz
In directory sc8-pr-cvs1:/tmp/cvs-serv21322/SoundPlugin/zzz
Added Files:
Buffer.h DoubleBuffer.h Fifo.h ring.h
Log Message:
Ian Piumarta's release 3.5-1devel
--- NEW FILE: Buffer.h ---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
enum {
Block_Free;
Block_Busy;
Block_Full;
Block_Done;
};
typedef struct
{
int state;
int capacity;
int size;
char *data;
} Block;
Block *Block_new(int size)
{
size &= ~(4 * sizeof(double) - 1);
Block *b= (Block *)calloc(1, sizeof(Block));
if (b)
{
b->state= Block_Free;
b->capacity= size;
if ((b->data= (char *)calloc(1, size)))
return b;
free(b);
}
return 0;
}
void Block_delete(Block *b)
{
free(b->data);
free(b);
}
void Block_reset(Block *b)
{
b->state= Block_Free;
b->size= 0;
}
typedef struct
{
Block *input;
Block *output;
} Buffer;
Buffer *Buffer_new(int size)
{
Buffer *b= (Buffer *)calloc(1, sizeof(Buffer));
if (b)
{
if ((b->input= Block_new(size)))
{
if ((b->output= Block_new(size)))
return b;
Buffer_delete(b->input);
}
free(b);
}
return 0;
}
void Buffer_delete(Buffer *b)
{
Block_delete(b->input);
Block_delete(b->output);
delete(b);
}
int Buffer_swap(Buffer *b)
{
if (input->state == Block_Full)
{
Block *b= input;
Block_reset(b->output);
b->input= b->output;
b->output= b->input;
return 1;
}
output->state= Block_done;
return 0;
}
--- NEW FILE: DoubleBuffer.h ---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
enum {
Buffer_Free,
Buffer_Busy,
Buffer_Full,
Buffer_Done
};
typedef struct
{
int state;
int size;
int iptr;
int optr; // 0 <= optr <= iptr <= size
char *data;
} Buffer;
Buffer *Buffer_new(int size)
{
Buffer *b= (Buffer *)calloc(1, sizeof(Buffer));
if (b)
{
b->state= Buffer_Free;
b->size= size;
if ((b->data= (char *)calloc(1, size)))
return b;
free(b);
}
return 0;
}
void Buffer_delete(Buffer *b)
{
assert(b && b->data);
free(b->data);
free(b);
}
void Buffer_reset(Buffer *b)
{
b->state= Buffer_Free;
b->iptr= b->optr= 0;
}
int Buffer_avail(Buffer *b)
{
return b->iptr - b->optr;
}
int Buffer_free(Buffer *b)
{
return b->size - b->iptr;
}
typedef struct
{
Buffer *input;
Buffer *output;
} DBuffer;
DBuffer *DBuffer_new(int size)
{
DBuffer *d= (DBuffer *)calloc(1, sizeof(DBuffer));
if (d)
{
if ((d->input= Buffer_new(size)))
{
if ((d->output= Buffer_new(size)))
return d;
Buffer_delete(d->input);
}
free(d);
}
return 0;
}
void DBuffer_delete(DBuffer *d)
{
assert(d && d->input && d->output);
Buffer_delete(d->input);
Buffer_delete(d->output);
free(d);
}
int DBuffer_swap(DBuffer *d)
{
if (d->input->state == Buffer_Full)
{
Buffer *i= d->output;
Buffer *o= d->input;
d->input= i;
d->output= o;
Buffer_reset(i);
return 1;
}
d->output->state= Buffer_done;
return 0;
}
--- NEW FILE: Fifo.h ---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// NOTE: requires the client to define min and max on ints
typedef struct
{
char *data;
int size;
int avail;
int iptr;
int optr;
} Buffer;
Buffer *Buffer_new(int size)
{
Buffer *b= (Buffer *)malloc(sizeof(Buffer));
if (!b)
return 0;
if (!(b->data= (char *)malloc(size)))
{
free(b);
return 0;
}
b->size= size;
b->avail= 0;
b->iptr= 0;
b->optr= 0;
return b;
}
void Buffer_delete(Buffer *b)
{
assert(b && b->data);
free(b->data);
free(b);
}
inline int Buffer_avail(Buffer *b)
{
assert(!(b->avail & 3));
return b->avail;
}
inline int Buffer_free(Buffer *b)
{
return b->size - Buffer_avail(b);
}
inline void Buffer_getOutputPointers(Buffer *b, char **p1, int *n1, char **p2, int *n2)
{
int optr= b->optr;
int avail= Buffer_avail(b);
int headroom= b->size - optr;
if (avail == 0)
{
*p1= *p2= 0;
*n1= *n2= 0;
}
else if (avail <= headroom)
{
*p1= b->data + optr; *p2= 0;
*n1= avail; *n2= 0;
}
else
{
*p1= b->data + optr; *p2= b->data;
*n1= headroom; *n2= avail - headroom;
}
assert(!(*n1 & 3));
assert(!(*n2 & 3));
}
inline int Buffer_getOutputPointer(Buffer *b, char **ptr)
{
int optr= b->optr;
int avail= Buffer_avail(b);
int headroom= b->size - optr;
if (headroom < avail) avail= headroom;
assert((optr + avail) <= b->size);
*ptr= b->data + optr;
return avail;
}
inline int Buffer_getInputPointer(Buffer *b, char **ptr)
{
int iptr= b->iptr;
int free= Buffer_free(b);
int headroom= b->size - iptr;
if (headroom < free) free= headroom;
assert((iptr + free) <= b->size);
*ptr= b->data + iptr;
return free;
}
inline void Buffer_advanceOutputPointer(Buffer *b, int size)
{
int optr= b->optr;
int avail= b->avail;
assert(!(size & 3));
optr+= size;
avail-= size;
assert(optr <= b->size);
assert(avail >= 0);
if (optr == b->size) optr= 0;
b->optr= optr;
b->avail= avail;
}
inline void Buffer_advanceInputPointer(Buffer *b, int size)
{
int iptr= b->iptr;
assert(!(size & 3));
{
int free= Buffer_free(b);
free-= size;
assert(free >= 0);
}
iptr += size;
assert(iptr <= b->size);
if (iptr == b->size) iptr= 0;
b->iptr= iptr;
b->avail += size;
}
inline void Buffer_prefill(Buffer *b, int bytes)
{
char *ptr;
int size= Buffer_getInputPointer(b, &ptr);
assert(!(bytes & 3));
assert(bytes <= size);
memset(ptr, 0, size);
Buffer_advanceInputPointer(b, bytes);
}
inline int Buffer_write(Buffer *b, char *buf, int nbytes)
{
int iptr= b->iptr;
int bytesToCopy= min(nbytes, Buffer_free(b));
int headroom= b->size - iptr;
int bytesCopied= 0;
assert(!(nbytes & 3));
if (bytesToCopy >= headroom)
{
memcpy(b->data + iptr, buf, headroom);
iptr= 0;
bytesToCopy -= headroom;
bytesCopied += headroom;
if (bytesToCopy)
{
memcpy(b->data, buf + bytesCopied, bytesToCopy);
iptr= bytesToCopy;
bytesCopied += bytesToCopy;
}
}
else
{
memcpy(b->data + iptr, buf, bytesToCopy);
iptr += bytesToCopy;
bytesCopied= bytesToCopy;
}
b->iptr= iptr;
b->avail += bytesCopied;
return bytesCopied;
}
inline int Buffer_read(Buffer *b, char *buf, int nbytes)
{
int optr= b->optr;
int bytesToCopy= min(nbytes, Buffer_avail(b));
int headroom= b->size - optr;
int bytesCopied= 0;
assert(!(nbytes & 3));
if (bytesToCopy >= headroom)
{
memcpy(buf, b->data + optr, headroom);
optr= 0;
bytesToCopy -= headroom;
bytesCopied += headroom;
if (bytesToCopy)
{
memcpy(buf + bytesCopied, b->data, bytesToCopy);
optr= bytesToCopy;
bytesCopied += bytesToCopy;
}
}
else
{
memcpy(buf, b->data + optr, bytesToCopy);
optr += bytesToCopy;
bytesCopied= bytesToCopy;
}
b->optr= optr;
b->avail -= bytesCopied;
return bytesCopied;
}
--- NEW FILE: ring.h ---
// ring.h -- lightweight ring buffers for sound i/o
//
// Author: Ian...@IN...
//
// Last edited:
//
// Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
// as listed elsewhere in this file.
// All rights reserved.
//
// You are NOT ALLOWED to distribute modified versions of this file
// under its original name. If you want to modify it and then make
// your modifications available publicly, rename the file first.
//
// This file is part of Unix Squeak.
//
// This file 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.
//
// You may use and/or distribute this file ONLY as part of Squeak, under
// the terms of the Squeak License as described in `LICENSE' in the base of
// this distribution, subject to the following additional restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment to the original author(s) (and any
// other contributors mentioned herein) in the product documentation
// would be appreciated but is not required.
//
// 2. You must not distribute (or make publicly available by any
// means) a modified copy of this file unless you first rename it.
//
// 3. This notice must not be removed or altered in any source distribution.
//
// Using (or modifying this file for use) in any context other than Squeak
// changes these copyright conditions. Read the file `COPYING' in the
// directory `platforms/unix/doc' before proceeding with any such use.
typedef struct _ring
{
char **bufs;
int bufCount;
int bufSize;
int iBuf;
int oBuf;
int nBufs;
} ring;
static ring *ring_new(int bufCount, int bufSize)
{
ring *r= (ring *)malloc(sizeof(ring));
if (r)
{
if ((r->bufs= (char **)malloc(bufCount * sizeof(char *))))
{
// Would there be any advantage to allocating wired memory
// via mmap() and mlock()?
int i;
for (i= 0; i < bufCount; ++i)
if (!(r->bufs[i]= (char *)malloc(bufSize)))
goto fail;
r->bufCount = bufCount;
r->bufSize = bufSize;
r->iBuf = 0;
r->oBuf = 0;
r->nBufs = 0;
return r;
fail:
printf("sound: could not allocate ring buffer memory\n");
while (i--)
free(r->bufs[i]);
free(r->bufs);
}
free(r);
}
return 0;
}
static void ring_delete(ring *r)
{
int i;
assert(r);
assert(r->bufs);
for (i= 0; i < r->bufCount; ++i)
{
assert(r->bufs[i]);
free(r->bufs[i]);
}
free(r->bufs);
free(r);
}
// counting the number of filled buffers saves an awful lot of tedious
// logic involving the front and back pointers, which in turn saves an
// awful lot of tedious locking of mutexes. the incr/decrs are
// effectively atomic and races will always fail conservatively (no
// data for input when 1 buffer has just been filled by the ioproc, no
// space for output when 1 buffer was just emptied by the ioproc) and
// cause an immediate retry (since the reader/writer is always the
// image -- the ioproc chugs along happily irrespective of the
// apparent buffer state).
static inline int ring_isEmpty(ring *r) { return r->nBufs == 0; }
static inline int ring_freeBufs(ring *r) { return r->bufCount - r->nBufs; }
static inline int ring_availBufs(ring *r) { return r->nBufs; }
static inline int ring_freeBytes(ring *r) { return ring_freeBufs(r) * r->bufSize; }
static inline int ring_availBytes(ring *r) { return ring_availBufs(r) * r->bufSize; }
static inline void ring_oAdvance(ring *r)
{
assert(r->nBufs > 0);
r->oBuf= (r->oBuf + 1) % r->bufCount;
r->nBufs--;
}
static inline void ring_iAdvance(ring *r)
{
assert(r->nBufs < r->bufCount);
r->iBuf= (r->iBuf + 1) % r->bufCount;
r->nBufs++;
}
static inline char *ring_inputPointer(ring *r)
{
return r->bufs[r->iBuf];
}
#if 0
static int ring_copyIn(ring *r, char *bytes, int size)
{
int freeBufs= ring_freeBufs(r);
char *in= bytes;
while (freeBufs-- && (size >= r->bufSize))
{
memcpy(r->bufs[r->iBuf], bytes, r->bufSize);
in += r->bufSize;
size -= r->bufSize;
ring_iAdvance(r);
}
return in - bytes;
}
#endif
static int ring_copyOut(ring *r, char *bytes, int size)
{
int availBufs= ring_availBufs(r);
char *out= bytes;
while (availBufs-- && (size >= r->bufSize))
{
memcpy(out, r->bufs[r->oBuf], r->bufSize);
out += r->bufSize;
size -= r->bufSize;
ring_oAdvance(r);
}
return out - bytes;
}
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:14
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv21322/B3DAcceleratorPlugin
Modified Files:
acinclude.m4 sqUnixOpenGL.c sqUnixOpenGL.h
Added Files:
Makefile.inc
Log Message:
Ian Piumarta's release 3.5-1devel
--- NEW FILE: Makefile.inc ---
XCFLAGS=$(WFLAGS) $(X_CFLAGS) $(X_INCLUDES)
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/acinclude.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** acinclude.m4 12 May 2003 07:26:18 -0000 1.1
--- acinclude.m4 13 May 2003 22:27:09 -0000 1.2
***************
*** 1,14 ****
! # Require OpenGL
! # (Note: some broken distribs [mandrake] require explicit -lpthread)
!
! AC_CHECK_LIB(GL,glIsEnabled,
! [AC_PLUGIN_USE_LIB(GL)],
! [unset ac_cv_lib_GL_glIsEnabled # stupid moronic pathetic autoconf
! AC_CHECK_LIB(GL,glIsEnabled,
! [AC_PLUGIN_USE_LIB(GL)],
! [unset ac_cv_lib_GL_glIsEnabled # stupid moronic pathetic autoconf
! AC_CHECK_LIB(GL,glIsEnabled,
! [AC_PLUGIN_USE_LIB(GL)
! AC_PLUGIN_USE_LIB(pthread)],
! [AC_PLUGIN_DISABLE],
! [-lpthread])])])
--- 1,3 ----
! if test "${have_gl}" != "yes"; then
! AC_PLUGIN_DISABLE
! fi
Index: sqUnixOpenGL.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqUnixOpenGL.c 12 May 2003 07:39:02 -0000 1.2
--- sqUnixOpenGL.c 13 May 2003 22:27:09 -0000 1.3
***************
*** 1,81 ****
/* sqUnixOpenGL.c -- support for accelerated 3D rendering
! *
* Author: Bert Freudenberg <be...@is...>
*
! * Based on Andreas Raab's sqWin32OpenGL.c
*
! * Last edited: Mon 11 Nov 2002 15:43:31 by bert on balloon
! *
! * History
! * Nov 02: added TGraphicsTest conformant log support
! * Oct 02: added Tea initialization support w/ stencil
! * May 01: initial revision
*/
! #include <sys/types.h>
! #include "sqVirtualMachine.h"
! #include "sqConfig.h"
! #include "sqPlatformSpecific.h"
#include "B3DAcceleratorPlugin.h"
- #if defined (B3DX_GL)
-
- #include <GL/gl.h>
- #include <GL/glx.h>
- #include <X11/X.h>
#include <stdio.h>
- #include "sqOpenGLRenderer.h"
-
- /* Plugin refs */
extern struct VirtualMachine *interpreterProxy;
! static void printVisual(XVisualInfo* visinfo);
! static void listVisuals();
! static Display *stDisplay= NULL; /* Squeak's display */
! static Window stWindow= 0; /* Squeak's main window */
! static glRenderer *current= NULL;
! static glRenderer allRenderer[MAX_RENDERER];
! static int visualAttributes[]= {
! GLX_STENCIL_SIZE, 0, /* filled in later - must be first item! */
! GLX_ALPHA_SIZE, 1, /* filled in later - must be second item! */
! GLX_RGBA, /* no indexed colors */
! GLX_DOUBLEBUFFER, /* will swap */
! GLX_LEVEL, 0, /* frame buffer, not overlay */
! GLX_DEPTH_SIZE, 16, /* decent depth */
! GLX_AUX_BUFFERS, 0, /* no aux buffers */
! GLX_ACCUM_RED_SIZE, 0, /* no accumulation */
! GLX_ACCUM_GREEN_SIZE, 0,
! GLX_ACCUM_BLUE_SIZE, 0,
! GLX_ACCUM_ALPHA_SIZE, 0,
! None
! };
- static float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };
! /* Verbose level for debugging purposes:
! 0 - print NO information ever
! 1 - print critical debug errors
! 2 - print debug warnings
! 3 - print extra information
! 4 - print extra warnings
! 5 - print information about primitive execution
! 10 - print information about each vertex and face
! */
! int verboseLevel= 1;
- /*** create / destroy a renderer ***/
int glCreateRendererFlags(int x, int y, int w, int h, int flags)
{
! glRenderer *renderer;
! XVisualInfo* visinfo= 0;
! int index= -1;
if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))
--- 1,115 ----
/* sqUnixOpenGL.c -- support for accelerated 3D rendering
! *
* Author: Bert Freudenberg <be...@is...>
+ *
+ * Modified to work with both GLX and Quartz by: Ian...@IN...
*
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
! * All rights reserved.
! *
! * You are NOT ALLOWED to distribute modified versions of this file
! * under its original name. If you want to modify it and then make
! * your modifications available publicly, rename the file first.
*
! * This file is part of Unix Squeak.
! *
! * This file 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.
! *
! * You may use and/or distribute this file ONLY as part of Squeak, under
! * the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
! *
! * 1. The origin of this software must not be misrepresented; you must not
! * claim that you wrote the original software. If you use this software
! * in a product, an acknowledgment to the original author(s) (and any
! * other contributors mentioned herein) in the product documentation
! * would be appreciated but is not required.
! *
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
! *
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
! *
! * Last edited: 2003-02-03 18:52:50 by piumarta on emilia.local.
! *
! * Note: the os-specific parts (ioGL* functions) are defined in
! * sqUnixX11.c (for X11/GLX on Unix) and
! * sqUnixQuartz.m (for Quartz/CoreGL on MacOSX).
*/
! #include "sq.h"
#include "B3DAcceleratorPlugin.h"
+ #include "sqOpenGLRenderer.h"
+ #include "SqDisplay.h"
#include <stdio.h>
+ #include <sys/types.h>
extern struct VirtualMachine *interpreterProxy;
+ static struct SqDisplay *dpy= 0;
! static glRenderer *current= 0;
! static glRenderer renderers[MAX_RENDERER];
! static float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };
!
! int glInitialize(void)
! {
! int i;
! for (i= 0; i < MAX_RENDERER; ++i)
! renderers[i].used= 0;
! if (!(dpy= ioGetDisplayModule()))
! return 0;
! dpy->ioGLinitialise();
! return 1;
! }
! int glShutdown(void)
! {
! int i;
! for (i= 0; i < MAX_RENDERER; ++i)
! if (renderers[i].used)
! glDestroyRenderer(i);
! dpy= 0;
! return 1;
! }
! int glMakeCurrentRenderer(glRenderer *renderer)
! {
! if (current == renderer)
! return 1;
! if (renderer)
! {
! if (!renderer->used)
! return 0;
! if (!dpy->ioGLmakeCurrentRenderer(renderer))
! {
! DPRINTF(1, (fp, "glMakeCurrentRenderer failed\n"));
! return 0;
! }
! }
! else
! dpy->ioGLmakeCurrentRenderer(0);
+ current= renderer;
+ return 1;
+ }
int glCreateRendererFlags(int x, int y, int w, int h, int flags)
{
! glRenderer *renderer= 0;
! int index;
if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))
***************
*** 85,327 ****
}
! if (flags & B3D_STENCIL_BUFFER)
! visualAttributes[1]= 1;
! else
! visualAttributes[1]= 0;
!
! /* find unused renderer */
! {
! int i;
! for (i= 0; i < MAX_RENDERER; i++)
! {
! if (!allRenderer[i].used)
! {
! index= i;
! break;
! }
! }
! }
! if (index == -1)
{
DPRINTF(1, (fp, "ERROR: Maximum number of renderers (%d) exceeded\r", MAX_RENDERER));
! return 0;
}
!
! renderer= &allRenderer[index];
! renderer->used= True;
! renderer->window= 0;
! renderer->context= NULL;
!
DPRINTF(3, (fp, "---- Creating new renderer ----\r\r"));
! /* sanity checks */
!
! if (w < 0 || h < 0)
{
DPRINTF(1, (fp, "Negative extent (%i@%i)!\r", w, h));
! goto FAILED;
}
!
! /* choose visual and create context */
!
! if (verboseLevel >= 3)
! listVisuals();
!
! {
! visinfo= glXChooseVisual(stDisplay,
! DefaultScreen(stDisplay),
! visualAttributes);
!
! if (!visinfo)
! {
! /* retry without alpha */
! visualAttributes[3]= 0;
! visinfo= glXChooseVisual(stDisplay,
! DefaultScreen(stDisplay),
! visualAttributes);
! }
!
! if (!visinfo)
{
! DPRINTF(1, (fp, "No OpenGL visual found!\r"));
! goto FAILED;
! }
!
! DPRINTF(3, (fp, "\r#### Selected GLX visual ID 0x%lx ####\r",
! visinfo->visualid));
! if (verboseLevel >= 3)
! printVisual(visinfo);
!
! renderer->context= glXCreateContext(stDisplay, visinfo, 0, GL_TRUE);
! if (!renderer->context)
! {
! DPRINTF(1, (fp, "Creating GLX context failed!\r"));
! goto FAILED;
}
! DPRINTF(3, (fp, "\r#### Created GLX context ####\r" ));
!
! /* create window */
! {
! XSetWindowAttributes attributes;
! unsigned long valuemask= 0;
!
! attributes.colormap= XCreateColormap(stDisplay,
! DefaultRootWindow(stDisplay),
! visinfo->visual,
! AllocNone);
! valuemask|= CWColormap;
!
! attributes.background_pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));
! valuemask|= CWBackPixel;
!
! renderer->window= XCreateWindow(stDisplay, stWindow, x, y, w, h, 0,
! visinfo->depth, InputOutput, visinfo->visual,
! valuemask, &attributes);
! if (!renderer->window)
! {
! DPRINTF(1, (fp, "Failed to create client window\r"));
! goto FAILED;
! }
!
! XMapWindow(stDisplay, renderer->window);
!
! }
!
! DPRINTF(3, (fp, "\r#### Created window ####\r" ));
!
! XFree(visinfo);
! visinfo= 0;
! }
!
! /* Make the context current */
! if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))
! {
! DPRINTF(1, (fp, "Failed to make context current\r"));
! goto FAILED;
! }
!
! renderer->bufferRect[0]= x;
! renderer->bufferRect[1]= y;
! renderer->bufferRect[2]= w;
! renderer->bufferRect[3]= h;
!
! DPRINTF(3, (fp, "\r### Renderer created! ###\r"));
!
! /* setup user context */
! glDisable(GL_LIGHTING);
! glDisable(GL_COLOR_MATERIAL);
! glDisable(GL_BLEND);
! glDisable(GL_ALPHA_TEST);
! glEnable(GL_DITHER);
! glEnable(GL_DEPTH_TEST);
! glEnable(GL_NORMALIZE);
! glDepthFunc(GL_LEQUAL);
! glClearDepth(1.0);
! glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
! glShadeModel(GL_SMOOTH);
! glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);
! ERROR_CHECK;
! return index;
!
! FAILED:
! /* do necessary cleanup */
DPRINTF(1, (fp, "OpenGL initialization failed\r"));
-
- if (visinfo)
- XFree(visinfo);
- if (renderer->context)
- glXDestroyContext(stDisplay, renderer->context);
- if (renderer->window)
- XDestroyWindow(stDisplay, renderer->window);
-
return -1;
}
- int glDestroyRenderer(int handle)
- {
- glRenderer *renderer= glRendererFromHandle(handle);
-
- DPRINTF(3, (fp, "\r--- Destroying renderer ---\r"));
-
- if (!renderer)
- return 1; /* already destroyed */
-
- if (!glMakeCurrentRenderer(NULL))
- return 0;
-
- glXDestroyContext(stDisplay, renderer->context);
- XDestroyWindow(stDisplay, renderer->window);
-
- renderer->window= 0;
- renderer->context= NULL;
- renderer->used= False;
-
- return 1;
- }
-
-
-
- /*** helpers ***/
-
-
glRenderer *glRendererFromHandle(int handle)
{
DPRINTF(7, (fp, "Looking for renderer id: %i\r", handle));
!
! if (handle < 0 || handle >= MAX_RENDERER)
! return NULL;
!
! if (allRenderer[handle].used)
! return allRenderer+handle;
!
! return NULL;
}
! int glIsOverlayRenderer(int handle)
{
! /* we always use overlay renderers */
return 1;
}
! int glSwapBuffers(glRenderer *renderer)
{
- if (!renderer || !renderer->used)
- return 0;
-
- glXSwapBuffers(stDisplay, renderer->window);
-
return 1;
}
! int glMakeCurrentRenderer(glRenderer *renderer)
{
! if (current == renderer)
! return 1;
!
! if (renderer && !renderer->used)
! return 0;
!
! if (renderer)
! {
! if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))
! {
! DPRINTF(1, (fp, "Failed to make context current\r"));
! return 0;
! }
! }
! else
! {
! glXMakeCurrent(stDisplay, 0, NULL);
! }
!
! current= renderer;
return 1;
}
--- 119,217 ----
}
! for (index= 0; index < MAX_RENDERER; ++index)
! if (!renderers[index].used)
! break;
! if (index == MAX_RENDERER)
{
DPRINTF(1, (fp, "ERROR: Maximum number of renderers (%d) exceeded\r", MAX_RENDERER));
! return -1;
}
! renderer= renderers + index;
! renderer->drawable= 0;
! renderer->context= 0;
!
DPRINTF(3, (fp, "---- Creating new renderer ----\r\r"));
! if ((w < 0) || (h < 0))
{
DPRINTF(1, (fp, "Negative extent (%i@%i)!\r", w, h));
! goto fail;
}
! else
! if (dpy->ioGLcreateRenderer(renderer, x, y, w, h, flags))
{
! renderer->used = 1;
! renderer->bufferRect[0] = x;
! renderer->bufferRect[1] = y;
! renderer->bufferRect[2] = w;
! renderer->bufferRect[3] = h;
! if (!glMakeCurrentRenderer(renderer))
! {
! DPRINTF(1, (fp, "Failed to make context current\r"));
! glDestroyRenderer(index);
! return -1;
! }
! DPRINTF(3, (fp, "\r### Renderer created! ###\r"));
! glDisable(GL_LIGHTING);
! glDisable(GL_COLOR_MATERIAL);
! glDisable(GL_BLEND);
! glDisable(GL_ALPHA_TEST);
! glEnable(GL_DITHER);
! glEnable(GL_DEPTH_TEST);
! glEnable(GL_NORMALIZE);
! glDepthFunc(GL_LEQUAL);
! glClearDepth(1.0);
! glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
! glShadeModel(GL_SMOOTH);
! glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);
! glErrorCheck();
! return index;
}
! fail:
DPRINTF(1, (fp, "OpenGL initialization failed\r"));
return -1;
}
glRenderer *glRendererFromHandle(int handle)
{
DPRINTF(7, (fp, "Looking for renderer id: %i\r", handle));
! if ((handle >= 0) && (handle < MAX_RENDERER) && renderers[handle].used)
! return renderers + handle;
! return 0;
}
! int glDestroyRenderer(int handle)
{
! glRenderer *renderer= glRendererFromHandle(handle);
! DPRINTF(3, (fp, "\r--- Destroying renderer ---\r"));
! if (renderer)
! {
! if (!glMakeCurrentRenderer(0))
! return 0;
! dpy->ioGLdestroyRenderer(renderer);
! renderer->drawable = 0;
! renderer->context = 0;
! renderer->used = 0;
! }
return 1;
}
! int glIsOverlayRenderer(int handle)
{
return 1;
}
! int glSwapBuffers(glRenderer *renderer)
{
! if (renderer && renderer->used)
! dpy->ioGLswapBuffers(renderer);
return 1;
}
***************
*** 332,354 ****
glRenderer *renderer= glRendererFromHandle(handle);
! if (!renderer || !glMakeCurrentRenderer(renderer))
! return 0;
!
! if (w < 1 || h < 1)
! return 0;
!
!
! XMoveResizeWindow(stDisplay, renderer->window,
! x, y, w, h);
!
! renderer->bufferRect[0]= x;
! renderer->bufferRect[1]= y;
! renderer->bufferRect[2]= w;
! renderer->bufferRect[3]= h;
!
! return 1;
}
int glSetVerboseLevel(int level)
{
--- 222,248 ----
glRenderer *renderer= glRendererFromHandle(handle);
! if (renderer && glMakeCurrentRenderer(renderer) && (w > 0) && (h > 0))
! {
! renderer->bufferRect[0]= x;
! renderer->bufferRect[1]= y;
! renderer->bufferRect[2]= w;
! renderer->bufferRect[3]= h;
! dpy->ioGLsetBufferRect(renderer, x, y, w, h);
! return 1;
! }
! return 0;
}
+ /* Verbose level for debugging purposes:
+ 0 - print NO information ever
+ 1 - print critical debug errors
+ 2 - print debug warnings
+ 3 - print extra information
+ 4 - print extra warnings
+ 5 - print information about primitive execution
+ ...
+ 10 - print information about each vertex and face
+ */
int glSetVerboseLevel(int level)
{
***************
*** 362,527 ****
GLint v;
glRenderer *renderer= glRendererFromHandle(handle);
- if (!renderer || !glMakeCurrentRenderer(renderer))
- return 0;
! switch(prop) {
! case 1: /* backface culling */
! if (!glIsEnabled(GL_CULL_FACE)) return 0;
! glGetIntegerv(GL_FRONT_FACE, &v);
! if (v == GL_CW) return 1;
! if (v == GL_CCW) return -1;
! return 0;
! case 2: /* polygon mode */
! glGetIntegerv(GL_POLYGON_MODE, &v);
! ERROR_CHECK;
! return v;
! case 3: /* point size */
! glGetIntegerv(GL_POINT_SIZE, &v);
! ERROR_CHECK;
! return v;
! case 4: /* line width */
! glGetIntegerv(GL_LINE_WIDTH, &v);
! ERROR_CHECK;
! return v;
! }
! return 0;
! }
! int glSetIntPropertyOS(int handle, int prop, int value)
! {
! glRenderer *renderer= glRendererFromHandle(handle);
! if (!renderer || !glMakeCurrentRenderer(renderer))
! return 0;
! switch(prop) {
! case 1: /* backface culling */
! if (!value) {
! glDisable(GL_CULL_FACE);
! ERROR_CHECK;
! return 1;
! }
! glEnable(GL_CULL_FACE);
! glFrontFace(value == 1 ? GL_CCW : GL_CW);
! ERROR_CHECK;
! return 1;
! case 2: /* polygon mode */
! if (value == 0) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
! else if (value == 1) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
! else if (value == 2) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
! else return 0;
! ERROR_CHECK;
! return 1;
! case 3: /* point size */
! glPointSize(value);
! ERROR_CHECK;
! return 1;
! case 4: /* line width */
! glLineWidth(value);
! ERROR_CHECK;
! return 1;
! }
return 0;
}
! /* GLX_CONFIG_CAVEAT might not be supported */
! /* but the test below is worded so it does not matter */
! #ifndef GLX_CONFIG_CAVEAT
! # define GLX_CONFIG_CAVEAT 0x20
! # define GLX_SLOW_CONFIG 0x8001
! #endif
!
! static void printVisual(XVisualInfo* visinfo)
! {
! int isOpenGL;
! glXGetConfig(stDisplay, visinfo, GLX_USE_GL, &isOpenGL);
! if (isOpenGL)
! {
! int slow= 0;
! int red, green, blue, alpha, stencil, depth;
! glXGetConfig(stDisplay, visinfo, GLX_CONFIG_CAVEAT, &slow);
! glXGetConfig(stDisplay, visinfo, GLX_RED_SIZE, &red);
! glXGetConfig(stDisplay, visinfo, GLX_GREEN_SIZE, &green);
! glXGetConfig(stDisplay, visinfo, GLX_BLUE_SIZE, &blue);
! glXGetConfig(stDisplay, visinfo, GLX_ALPHA_SIZE, &alpha);
! glXGetConfig(stDisplay, visinfo, GLX_STENCIL_SIZE, &stencil);
! glXGetConfig(stDisplay, visinfo, GLX_DEPTH_SIZE, &depth);
!
! if (slow != GLX_SLOW_CONFIG)
! DPRINTF(3, (fp,"===> OpenGL visual\r"))
! else
! DPRINTF(3, (fp,"---> slow OpenGL visual\r"));
!
! DPRINTF(3, (fp,"rgbaBits = %i+%i+%i+%i\r", red, green, blue, alpha));
! DPRINTF(3, (fp,"stencilBits = %i\r", stencil));
! DPRINTF(3, (fp,"depthBits = %i\r", depth));
! }
! }
!
! static void listVisuals()
! {
! XVisualInfo* visinfo;
! int nvisuals, i;
!
! visinfo= XGetVisualInfo(stDisplay, VisualNoMask, NULL, &nvisuals);
!
! for (i= 0; i < nvisuals; i++)
! {
! DPRINTF(3, (fp,"#### Checking pixel format (visual ID 0x%lx)\r", visinfo[i].visualid));
! printVisual(&visinfo[i]);
! }
! XFree(visinfo);
! }
!
!
! /*** Module initializers ***/
!
!
!
! int glInitialize(void)
{
! int i, p;
! int fn;
!
! fn= interpreterProxy->ioLoadFunctionFrom("ioGetDisplay", NULL);
! stDisplay= (fn ? ((Display *(*)(void))fn)() : 0);
! if (!stDisplay)
! {
! DPRINTF(1,(fp,"ERROR: Failed to look up stDisplay\r"));
! return 0;
! }
!
! fn= interpreterProxy->ioLoadFunctionFrom("ioGetWindow", NULL);
! stWindow= (fn ? ((Window (*)(void))fn)() : 0);
! if (!stWindow)
! {
! DPRINTF(1,(fp,"ERROR: Failed to look up stWindow\r"));
! return 0;
! }
!
! for (i= 0; i < MAX_RENDERER; i++)
! {
! allRenderer[i].used= False;
! }
!
! return 1;
! }
! int glShutdown(void)
! {
! int i;
! for (i=0; i< MAX_RENDERER; i++)
! {
! if (allRenderer[i].used)
! {
! glDestroyRenderer(i);
! }
! }
! return 1;
}
-
- #endif /* defined(B3DX_GL) */
--- 256,332 ----
GLint v;
glRenderer *renderer= glRendererFromHandle(handle);
! if (renderer && glMakeCurrentRenderer(renderer))
! switch (prop)
! {
! case 1: /* backface culling */
! if (!glIsEnabled(GL_CULL_FACE))
! return 0;
! glGetIntegerv(GL_FRONT_FACE, &v);
! switch (v)
! {
! case GL_CW: return 1;
! case GL_CCW: return -1;
! }
! break;
+ case 2: /* polygon mode */
+ glGetIntegerv(GL_POLYGON_MODE, &v);
+ glErrorCheck();
+ return v;
! case 3: /* point size */
! glGetIntegerv(GL_POINT_SIZE, &v);
! glErrorCheck();
! return v;
! case 4: /* line width */
! glGetIntegerv(GL_LINE_WIDTH, &v);
! glErrorCheck();
! return v;
! }
return 0;
}
! int glSetIntPropertyOS(int handle, int prop, int value)
{
! glRenderer *renderer= glRendererFromHandle(handle);
+ if (renderer && glMakeCurrentRenderer(renderer))
+ switch (prop)
+ {
+ case 1: /* backface culling */
+ if (!value)
+ glDisable(GL_CULL_FACE);
+ else
+ {
+ glEnable(GL_CULL_FACE);
+ glFrontFace((value == 1) ? GL_CCW : GL_CW);
+ }
+ glErrorCheck();
+ return 1;
! case 2: /* polygon mode */
! switch (value)
! {
! case 0: glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); break;
! case 1: glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); break;
! case 2: glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); break;
! default: return 0;
! }
! glErrorCheck();
! return 1;
! case 3: /* point size */
! glPointSize(value);
! glErrorCheck();
! return 1;
! case 4: /* line width */
! glLineWidth(value);
! glErrorCheck();
! return 1;
! }
! return 0;
}
Index: sqUnixOpenGL.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sqUnixOpenGL.h 28 May 2002 20:16:54 -0000 1.1
--- sqUnixOpenGL.h 13 May 2003 22:27:09 -0000 1.2
***************
*** 1,17 ****
! #ifndef SQ_UNIX_OPENGL_H
! #define SQ_UNIX_OPENGL_H
!
! #define MAX_RENDERER 16
! typedef struct glRenderer {
! GLint bufferRect[4];
! GLint viewport[4];
! Bool used;
! Window window;
! GLXContext context;
} glRenderer;
! #define GL_RENDERER_DEFINED 1
! #endif /* SQ_UNIX_OPENGL_H */
--- 1,38 ----
! #ifndef __sqUnixOpenGL_h
! #define __sqUnixOpenGL_h
! #include "config.h"
! typedef struct glRenderer
! {
! int bufferRect[4];
! int viewport[4];
! int used;
! void *drawable;
! void *context;
} glRenderer;
! #define GL_RENDERER_DEFINED 1
! #define MAX_RENDERER 16
! #if defined(HAVE_GL_GL_H)
! # include <GL/gl.h>
! #else
! # if defined(HAVE_OPENGL_GL_H)
! # include <OpenGL/gl.h>
! # else
! # error *** cannot find gl.h
! # endif
! #endif
!
! extern int ioGLinitialise(void);
! extern int ioGLcreateRenderer(glRenderer *r, int x, int y, int w, int h, int flags);
! extern void ioGLdestroyRenderer(glRenderer *r);
! extern int ioGLmakeCurrentRenderer(glRenderer *r);
! extern void ioGLswapBuffers(glRenderer *r);
! extern void ioGLsetBufferRect(glRenderer *r, int x, int y, int w, int h);
!
! #define glErrorCheck() ERROR_CHECK
!
!
! #endif /* __sqUnixOpenGL_h */
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:27:14
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/DropPlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv21322/DropPlugin
Modified Files:
sqUnixDragDrop.c
Log Message:
Ian Piumarta's release 3.5-1devel
Index: sqUnixDragDrop.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sqUnixDragDrop.c 12 May 2003 07:26:19 -0000 1.1
--- sqUnixDragDrop.c 13 May 2003 22:27:09 -0000 1.2
***************
*** 1,2 ****
--- 1,52 ----
+ /* sqUnixDragDrop.c -- support for drag and drop, for those UIs that have it
+ *
+ * Author: Ian Piumarta <ian...@in...>
+ *
+ * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
+ * as listed elsewhere in this file.
+ * All rights reserved.
+ *
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
+ * This file is part of Unix Squeak.
+ *
+ * This file 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.
+ *
+ * You may use and/or distribute this file ONLY as part of Squeak, under
+ * the terms of the Squeak License as described in `LICENSE' in the base of
+ * this distribution, subject to the following additional restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment to the original author(s) (and any
+ * other contributors mentioned herein) in the product documentation
+ * would be appreciated but is not required.
+ *
+ * 2. You must not distribute (or make publicly available by any
+ * means) a modified copy of this file unless you first rename it.
+ *
+ * 3. This notice must not be removed or altered in any source distribution.
+ *
+ * Using (or modifying this file for use) in any context other than Squeak
+ * changes these copyright conditions. Read the file `COPYING' in the
+ * directory `platforms/unix/doc' before proceeding with any such use.
+ *
+ * Last edited: 2002-12-06 11:07:42 by piumarta on calvin.local.
+ */
+
+ /* Why on earth does this plugin exist at all? Brain death strikes
+ * again. And why are half the functions never called from the VM?
+ * Could it be that they are only there for certain ports (we'll
+ * mention no names) in which the core support needs to grub around in
+ * this plugin via ioLoadFunctionFromModule (and, putting disbelief
+ * aside for a moment, maybe even VICE-VERSA)? It seems to me that
+ * truth is very definitely not beauty today. Sigh...
+ */
+
+
#include "sq.h"
#include "sqVirtualMachine.h"
***************
*** 4,45 ****
#include "DropPlugin.h"
!
! extern struct VirtualMachine *interpreterProxy;
! int dropInit(void)
! {
! return 0; /* fail */
! }
! int dropShutdown()
! {
! return 1;
! }
!
! char *dropRequestFileName(int dropIndex)
{
! return NULL;
}
-
int dropRequestFileHandle(int dropIndex)
{
return interpreterProxy->nilObject();
}
!
! int sqSecFileAccessCallback(void *callback)
! {
! return 0;
! }
!
! void sqSetNumberOfDropFiles(int numberOfFiles)
! {
! }
!
! void sqSetFileInformation(int dropIndex, void *dropFile)
! {
! }
--- 54,92 ----
#include "DropPlugin.h"
! #include <assert.h>
! extern struct VirtualMachine *interpreterProxy;
! extern int uxDropFileCount;
! extern char **uxDropFileNames;
! int dropInit(void) { return 1; }
! int dropShutdown(void) { return 1; }
! char *dropRequestFileName(int dropIndex) // in st coordinates
{
! if ((dropIndex > 0) && (dropIndex <= uxDropFileCount))
! {
! assert(uxDropFileNames);
! return uxDropFileNames[dropIndex - 1];
! }
! return 0;
}
int dropRequestFileHandle(int dropIndex)
{
+ char *path= dropRequestFileName(dropIndex);
+ if (path)
+ {
+ // you cannot be serious?
+ int handle= instantiateClassindexableSize(classByteArray(), fileRecordSize());
+ sqFileOpen((SQFile *)fileValueOf(handle), (int)path, strlen(path), 0);
+ return handle;
+ }
return interpreterProxy->nilObject();
}
! int sqSecFileAccessCallback(void *callback) { return 0; }
! void sqSetNumberOfDropFiles(int numberOfFiles) { }
! void sqSetFileInformation(int dropIndex, void *dropFile) { }
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:23:13
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/zzz In directory sc8-pr-cvs1:/tmp/cvs-serv19921/zzz Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/plugins/B3DAcceleratorPlugin/zzz added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:22:40
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SoundPlugin/zzz In directory sc8-pr-cvs1:/tmp/cvs-serv19716/zzz Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/plugins/SoundPlugin/zzz added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:21:23
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/ObjectiveCPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv19323/ObjectiveCPlugin Log Message: Directory /cvsroot/squeak/squeak/platforms/unix/plugins/ObjectiveCPlugin added to the repository |
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:20:32
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv18986
Modified Files:
Tag: ian-branch
sqUnixMemory.c
Log Message:
Ian Piumarta's release 3.5-1devel; looks totally different to me
Index: sqUnixMemory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqUnixMemory.c,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -d -r1.3 -r1.3.4.1
*** sqUnixMemory.c 20 Jan 2002 20:23:32 -0000 1.3
--- sqUnixMemory.c 13 May 2003 22:20:26 -0000 1.3.4.1
***************
*** 1,261 ****
! /* sqUnixMemory -- low-level routines to obtain space for Squeak's
! object memory */
!
!
! #include <sq.h>
! #ifdef USE_MEMORY_MMAP
! /* This mmap-based allocator will initially mmap a huge region on
! /dev/zero. To free memory, it will re-mmap over the original map.
! It's a complicated hack, but sometimes it actually works. This
! allocator can handle extending and shrinking squeak's effective
! heap size at run-time.
! */
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
- #include <assert.h>
- #include <errno.h>
-
- #undef DEBUG
! /* Amount of the memory map to try reserve for Squeak. The startup
! code will try and reserve this much of the address space for
! Squeak's heap. Larger spaces mean that the maximum size of the
! heap is larger, but that less address space is available for other
! purposes such as malloc(). Also, on some OS's, allocating the
! address space may in fact allocate real swap space or memory, and
! so on such OS's the maximum should be reduced. */
!
! #ifndef MEMORY_TO_TRY
! # define MEMORY_TO_TRY (1024*1024*1024) /* 1 gig */
#endif
! static int devZeroFd = -1; /* fd for /dev/zero */
! static char *heap = NULL; /* location of the heap */
! static int heapSize = 0; /* amount of space currently mmap-ed */
! static int maxHeapSize; /* amount of address space available for the
! heap */
!
!
!
! /* return the granularity at which to run mmap() */
! static int mmapGranularity()
! {
! return getpagesize();
! }
! /* return the first byte past the end of the heap */
! static void *heapLimit()
! {
! return heap + heapSize;
! }
! /* internal routine: adjust the size of the heap to at least the
! requested size. This both shrinks and grows. When shrinking, the
! memory will attempt to be freed by re-running mmap() over the
! now-unused region
! */
! static void adjustHeapSize(int newHeapSize)
! {
! /* enforce a little sanity */
! if(newHeapSize > maxHeapSize)
! newHeapSize = maxHeapSize;
! if(newHeapSize < 0)
! newHeapSize = 0;
!
! /* first, round up newHeapSize so that the heap will end an
! mmapGranularity() boundary */
! {
! char *realEnd;
! int newHeapSizeToUse;
!
! realEnd = (char *)
! (((int)heap + newHeapSize + (mmapGranularity() - 1)) /
! mmapGranularity() * mmapGranularity());
- newHeapSizeToUse = realEnd - heap;
-
- assert(newHeapSizeToUse >= newHeapSize);
- newHeapSize = newHeapSizeToUse;
! assert(newHeapSize >= 0);
! assert(newHeapSize <= maxHeapSize);
! assert(((int)heap + newHeapSize) % mmapGranularity() == 0);
! }
!
! if(newHeapSize == heapSize) {
! /* no change in size */
! return;
! }
!
! if(newHeapSize < heapSize) {
! /* heap is shrinking */
! void *result;
!
! /* first, munmap pages past the end of the new heap */
! #if 0 /* LEX don't bother: on Linux, at least, you can mmap() on top of the region, anyway. Plus, it REALLY sucks if we munmap, some other process grabs memory, and then suddenly our mmap() fails.... */
! munmap(heap + newHeapSize, maxHeapSize - newHeapSize);
! #endif
! heapSize = newHeapSize;
!
! /* now remap them, so that the heap area remains contiguous. */
! /* (This won't actually waste memory on most Unices.) */
! result = mmap(heap+newHeapSize, maxHeapSize - newHeapSize,
! PROT_READ|PROT_WRITE, MAP_FIXED|MAP_PRIVATE,
! devZeroFd, newHeapSize);
! if(result == MAP_FAILED) {
! perror("mmap");
}
! }
! else {
! /* heap is growing. The memory is already allocated, so just
! updated the bookkeeping */
! heapSize = newHeapSize ;
! }
! }
!
!
! /* initial allocation routine */
! void * sqAllocateMemory(int minHeapSize, int desiredHeapSize) {
! /* sanity checks */
! if(heap != NULL) {
! fprintf(stderr, "sqAllocateMemory called twice!\n");
! exit(1);
! }
! if(desiredHeapSize > MEMORY_TO_TRY) {
! fprintf(stderr, "requested %d memory for heap! Giving up.\n", desiredHeapSize);
! return NULL;
! }
! /* open /dev/zero */
! devZeroFd = open("/dev/zero", O_RDWR);
! if(devZeroFd < 0) {
! perror("open(\"/dev/zero\")");
! return NULL;
! }
! /* mmap() a large chunk. If it fails, try smaller sizes */
! maxHeapSize = MEMORY_TO_TRY / mmapGranularity() * mmapGranularity();
! while(heap==NULL && maxHeapSize > (10*mmapGranularity())) {
! #ifdef DEBUG
! printf("trying size %d.\n", maxHeapSize);
! #endif
! heap = mmap(NULL, maxHeapSize,
! PROT_READ|PROT_WRITE, MAP_PRIVATE,
! devZeroFd, 0);
! if(heap == MAP_FAILED) {
! heap = NULL;
!
! /* try again with a smaller heap */
! maxHeapSize = maxHeapSize / 4 * 3;
! /* make sure we are still a multipple of mmapGranularity() */
! maxHeapSize = maxHeapSize / mmapGranularity() * mmapGranularity();
}
- }
! if(heap == NULL) {
! /* failure */
! return NULL;
! }
! /* success */
! heapSize = maxHeapSize;
! /* double check that we got enough */
! if(maxHeapSize < minHeapSize) {
! printf("could not allocate but %d for the heap, but %d was requested\n", maxHeapSize, minHeapSize);
! return NULL;
! }
!
-
- /* adjust the size of the mapping */
- adjustHeapSize(desiredHeapSize);
- if(heapSize == 0) {
- return NULL;
- }
! /* all done */
! return heap;
}
! /* external interface: increase the size of memory */
! int sqGrowMemoryBy(int oldLimit, int delta) {
! #ifdef DEBUG
! printf("growing by %d...\n", delta);
! #endif
!
!
! adjustHeapSize((char *)oldLimit - heap + delta);
! #ifdef DEBUG
! printf("new heap size is %d\n", heapSize);
! #endif
!
! return (int) heapLimit();
}
! /* external interface: decrease the size of memory */
! int sqShrinkMemoryBy(int oldLimit, int delta) {
! #ifdef DEBUG
! printf("shrinking by %d...\n", delta);
! #endif
!
! adjustHeapSize((char *)oldLimit - heap - delta);
!
! #ifdef DEBUG
! printf("new heap size is %d\n", heapSize);
! #endif
! return (int) heapLimit();
}
! /* ask how much space can possibly be allocated */
! int sqMemoryExtraBytesLeft(int includingSwap) {
! return maxHeapSize - heapSize;
! }
! #else
- /* The default memory allocator just uses malloc(), and makes no
- attempts to resize the heap */
- void * sqAllocateMemory(int minHeapSize, int desiredHeapSize) {
- return malloc(desiredHeapSize);
- }
! int sqGrowMemoryBy(int oldLimit, int delta) {
! return oldLimit;
! }
! int sqShrinkMemoryBy(int oldLimit, int delta) {
! return oldLimit;
! }
! int sqMemoryExtraBytesLeft(int includingSwap) {
return 0;
}
!
! #endif
--- 1,267 ----
! /* sqUnixMemory.c -- dynamic memory management
! *
! * Author: Ian...@IN...
! *
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
! * All rights reserved.
! *
! * You are NOT ALLOWED to distribute modified versions of this file
! * under its original name. If you want to modify it and then make
! * your modifications available publicly, rename the file first.
! *
! * This file is part of Unix Squeak.
! *
! * This file 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.
! *
! * You may use and/or distribute this file ONLY as part of Squeak, under
! * the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
! *
! * 1. The origin of this software must not be misrepresented; you must not
! * claim that you wrote the original software. If you use this software
! * in a product, an acknowledgment to the original author(s) (and any
! * other contributors mentioned herein) in the product documentation
! * would be appreciated but is not required.
! *
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
! *
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
! *
! * Last edited: 2003-02-11 14:36:21 by piumarta on emilia.inria.fr
! */
! /* Note:
! *
! * The code allows memory to be overallocated; i.e., the initial
! * block is reserved via mmap() and then the unused portion
! * munmap()ped from the top end. This is INHERENTLY DANGEROUS since
! * malloc() may randomly map new memory in the block we "reserved"
! * and subsequently unmap()ped. Enabling this causes crashes in
! * Croquet, which makes heavy use of the FFI and thus calls malloc()
! * all over the place.
! *
! * For this reason, overallocateMemory is DISABLED by default.
! *
! * The upshot of all this is that Squeak will claim (and hold on to)
! * ALL of the available virtual memory (or at least 75% of it) when
! * it starts up. If you can't live with that, use the -memory
! * option to allocate a fixed size heap.
! */
! #include "sq.h"
! #include "config.h"
! #define DEBUG 1
! #include "debug.h"
! #if defined(HAVE_MMAP)
#include <stdio.h>
+ #include <stdlib.h>
#include <unistd.h>
+ #include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
! #if !defined(MAP_ANON)
! # if defined(MAP_ANONYMOUS)
! # define MAP_ANON MAP_ANONYMOUS
! # else
! # define MAP_ANON 0
! # endif
#endif
+ #define MAP_PROT (PROT_READ | PROT_WRITE)
+ #define MAP_FLAGS (MAP_ANON | MAP_PRIVATE)
! extern int useMmap;
+ /*xxx THESE SHOULD BE COMMAND-LINE/ENVIRONMENT OPTIONS */
+ int overallocateMemory = 0; /* see notes above */
! static int devZero = -1;
! static char *heap = 0;
! static int heapSize = 0;
! static int heapLimit = 0;
+ static int pageSize = 0;
+ static unsigned int pageMask = 0;
! #define valign(x) ((x) & pageMask)
! static int min(int x, int y) { return (x < y) ? x : y; }
! static int max(int x, int y) { return (x > y) ? x : y; }
! /* answer the address of (minHeapSize <= N <= desiredHeapSize) bytes of memory. */
! void *sqAllocateMemory(int minHeapSize, int desiredHeapSize)
! {
! if (!useMmap)
! return malloc(desiredHeapSize);
! if (heap)
! {
! fprintf(stderr, "sqAllocateMemory: already called\n");
! exit(1);
}
! pageSize= getpagesize();
! pageMask= ~(pageSize - 1);
! dprintf(("sqAllocateMemory: pageSize 0x%x (%d), mask 0x%x\n", pageSize, pageSize, pageMask));
! #if (!MAP_ANON)
! if ((devZero= open("/dev/zero", O_RDWR)) < 0)
! {
! perror("sqAllocateMemory: /dev/zero");
! return 0;
! }
! #endif
! dprintf(("sqAllocateMemory: /dev/zero descriptor %d\n", devZero));
! dprintf(("sqAllocateMemory: min heap %d, desired %d\n", minHeapSize, desiredHeapSize));
! heapLimit= valign(max(desiredHeapSize, useMmap));
! while ((!heap) && (heapLimit >= minHeapSize))
! {
! dprintf(("sqAllocateMemory: mapping 0x%08x bytes (%d Mbytes)\n", heapLimit, heapLimit >> 20));
! if (MAP_FAILED == (heap= mmap(0, heapLimit, MAP_PROT, MAP_FLAGS, devZero, 0)))
! {
! heap= 0;
! heapLimit= valign(heapLimit / 4 * 3);
! }
! }
! if (!heap)
! {
! fprintf(stderr, "sqAllocateMemory: failed to allocate at least %d bytes)\n", minHeapSize);
! useMmap= 0;
! return malloc(desiredHeapSize);
}
! heapSize= heapLimit;
! if (overallocateMemory)
! sqShrinkMemoryBy(heap + heapLimit, heapLimit - desiredHeapSize);
! return heap;
! }
+ /* grow the heap by delta bytes. answer the new end of memory. */
! int sqGrowMemoryBy(int oldLimit, int delta)
! {
! if (useMmap)
! {
! int newSize= min(valign((char *)oldLimit - heap + delta), heapLimit);
! int newDelta= newSize - heapSize;
! dprintf(("sqGrowMemory: %p By: %d(%d) (%d -> %d)\n", oldLimit, newDelta, delta, heapSize, newSize));
! assert(0 == (newDelta & ~pageMask));
! assert(0 == (newSize & ~pageMask));
! assert(newDelta >= 0);
! if (newDelta)
! {
! dprintf(("was: %p %p %p = 0x%x (%d) bytes\n", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));
! if (overallocateMemory)
! {
! char *base= heap + heapSize;
! dprintf(("remap: %p + 0x%x (%d)\n", base, newDelta, newDelta));
! if (MAP_FAILED == mmap(base, newDelta, MAP_PROT, MAP_FLAGS | MAP_FIXED, devZero, heapSize))
! {
! perror("mmap");
! return oldLimit;
! }
! }
! heapSize += newDelta;
! dprintf(("now: %p %p %p = 0x%x (%d) bytes\n", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));
! assert(0 == (heapSize & ~pageMask));
! }
! return (int)heap + heapSize;
! }
! return oldLimit;
}
! /* shrink the heap by delta bytes. answer the new end of memory. */
! int sqShrinkMemoryBy(int oldLimit, int delta)
! {
! if (useMmap)
! {
! int newSize= max(0, valign((char *)oldLimit - heap - delta));
! int newDelta= heapSize - newSize;
! dprintf(("sqGrowMemory: %p By: %d(%d) (%d -> %d)\n", oldLimit, newDelta, delta, heapSize, newSize));
! assert(0 == (newDelta & ~pageMask));
! assert(0 == (newSize & ~pageMask));
! assert(newDelta >= 0);
! if (newDelta)
! {
! dprintf(("was: %p %p %p = 0x%x (%d) bytes\n", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));
! if (overallocateMemory)
! {
! char *base= heap + heapSize - newDelta;
! dprintf(("unmap: %p + 0x%x (%d)\n", base, newDelta, newDelta));
! if (munmap(base, newDelta) < 0)
! {
! perror("unmap");
! return oldLimit;
! }
! }
! heapSize -= newDelta;
! dprintf(("now: %p %p %p = 0x%x (%d) bytes\n", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));
! assert(0 == (heapSize & ~pageMask));
! }
! return (int)heap + heapSize;
! }
! return oldLimit;
}
! /* answer the number of bytes available for growing the heap. */
!
! int sqMemoryExtraBytesLeft(int includingSwap)
! {
! return useMmap ? (heapLimit - heapSize) : 0;
}
! #else /* !HAVE_MMAP */
+ void *sqAllocateMemory(int minHeapSize, int desiredHeapSize) { return malloc(desiredHeapSize); }
+ int sqGrowMemoryBy(int oldLimit, int delta) { return oldLimit; }
+ int sqShrinkMemoryBy(int oldLimit, int delta) { return oldLimit; }
+ int sqMemoryExtraBytesLeft(int includingSwap) { return 0; }
! #endif
! #if defined(TEST_MEMORY)
! #define MBytes *1024*1024
! int main()
! {
! char *mem= sqAllocateMemory(4 MBytes, 40 MBytes);
! printf("memory allocated at %p\n", mem);
! sqShrinkMemoryBy((int)heap + heapSize, 5 MBytes);
! sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);
! sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);
! sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);
! sqGrowMemoryBy((int)heap + heapSize, 100 MBytes);
! sqShrinkMemoryBy((int)heap + heapSize, 105 MBytes);
return 0;
}
! #endif /* defined(TEST_MEMORY) */
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv18302
Modified Files:
Makefile.in aio.c aio.h dlfcn-dyld.c sqPlatformSpecific.h
sqUnixExternalPrims.c
Added Files:
SqDisplay.h SqModule.h SqSound.h acinclude.m4 debug.c debug.h
feedback.h sqUnixCharConv.c sqUnixCharConv.h sqUnixEvent.c
sqUnixGL.h sqUnixGlobals.h sqUnixMain.c sqUnixMain.h
sqUnixWindow.h
Log Message:
Ian Piumarta's release 3.5-1devel
--- NEW FILE: SqDisplay.h ---
#ifndef __sq_SqDisplay_h
#define __sq_SqDisplay_h
#define USE_VM_STRUCT 1
extern int uxDropFileCount;
extern char **uxDropFileNames;
#define SqDisplayVersionMajor 1
#define SqDisplayVersionMinor 1
#define SqDisplayVersion ((SqDisplayVersionMajor << 16) | (SqDisplayVersionMinor))
#include "sqUnixOpenGL.h"
struct SqDisplay
{
int version;
/* system attributes */
char *(*winSystemName)(void);
/* window startup/shutown */
void (*winInit)(void);
void (*winOpen)(void);
void (*winSetName)(char *title);
int (*winImageFind)(char *imageName, int size);
void (*winImageNotFound)(void);
void (*winExit)(void);
/* display primitives */
int (*ioFormPrint)(int bitsAddr, int width, int height, int depth, double hScale, double vScale, int landscapeFlag);
int (*ioBeep)(void);
int (*ioRelinquishProcessorForMicroseconds)(int microSeconds);
int (*ioProcessEvents)(void);
int (*ioScreenDepth)(void);
int (*ioScreenSize)(void);
int (*ioSetCursorWithMask)(int cursorBitsIndex, int cursorMaskIndex, int offsetX, int offsetY);
int (*ioSetFullScreen)(int fullScreen);
int (*ioForceDisplayUpdate)(void);
int (*ioShowDisplay)(int dispBitsIndex, int width, int height, int depth, int l, int r, int t, int b);
int (*ioHasDisplayDepth)(int i);
int (*ioSetDisplayMode)(int width, int height, int depth, int fullscreenFlag);
int (*clipboardSize)(void);
int (*clipboardWriteFromAt)(int count, int byteArrayIndex, int startIndex);
int (*clipboardReadIntoAt)(int count, int byteArrayIndex, int startIndex);
int (*ioGetButtonState)(void);
int (*ioPeekKeystroke)(void);
int (*ioGetKeystroke)(void);
int (*ioGetNextEvent)(sqInputEvent *evt);
int (*ioMousePoint)(void);
/* OpenGL */
void *(*ioGetDisplay)(void);
void *(*ioGetWindow)(void);
int (*ioGLinitialise)(void);
int (*ioGLcreateRenderer)(glRenderer *r, int x, int y, int w, int h, int flags);
int (*ioGLmakeCurrentRenderer)(glRenderer *r);
void (*ioGLdestroyRenderer)(glRenderer *r);
void (*ioGLswapBuffers)(glRenderer *r);
void (*ioGLsetBufferRect)(glRenderer *r, int x, int y, int w, int h);
/* browser plugin */
int (*primitivePluginBrowserReady)(void);
int (*primitivePluginRequestURLStream)(void);
int (*primitivePluginRequestURL)(void);
int (*primitivePluginPostURL)(void);
int (*primitivePluginRequestFileHandle)(void);
int (*primitivePluginDestroyRequest)(void);
int (*primitivePluginRequestState)(void);
};
#define SqDisplayDefine(NAME) \
static struct SqDisplay display_##NAME##_itf= { \
SqDisplayVersion, \
display_winSystemName, \
display_winInit, \
display_winOpen, \
display_winSetName, \
display_winImageFind, \
display_winImageNotFound, \
display_winExit, \
display_ioFormPrint, \
display_ioBeep, \
display_ioRelinquishProcessorForMicroseconds, \
display_ioProcessEvents, \
display_ioScreenDepth, \
display_ioScreenSize, \
display_ioSetCursorWithMask, \
display_ioSetFullScreen, \
display_ioForceDisplayUpdate, \
display_ioShowDisplay, \
display_ioHasDisplayDepth, \
display_ioSetDisplayMode, \
display_clipboardSize, \
display_clipboardWriteFromAt, \
display_clipboardReadIntoAt, \
display_ioGetButtonState, \
display_ioPeekKeystroke, \
display_ioGetKeystroke, \
display_ioGetNextEvent, \
display_ioMousePoint, \
display_ioGetDisplay, \
display_ioGetWindow, \
display_ioGLinitialise, \
display_ioGLcreateRenderer, \
display_ioGLmakeCurrentRenderer, \
display_ioGLdestroyRenderer, \
display_ioGLswapBuffers, \
display_ioGLsetBufferRect, \
display_primitivePluginBrowserReady, \
display_primitivePluginRequestURLStream, \
display_primitivePluginRequestURL, \
display_primitivePluginPostURL, \
display_primitivePluginRequestFileHandle, \
display_primitivePluginDestroyRequest, \
display_primitivePluginRequestState \
}
extern struct SqDisplay *ioGetDisplayModule(void);
#endif /* __sq_SqDisplay_h */
--- NEW FILE: SqModule.h ---
#ifndef __sq_SqModule_h
#define __sq_SqModule_h
#define SqModuleVersionMajor 1
#define SqModuleVersionMinor 1
#define SqModuleVersion ((SqModuleVersionMajor << 16) | (SqModuleVersionMinor))
struct SqModule
{
int version;
char *name;
char *type;
int (*parseArgument)(int, char **);
void (*parseEnvironment)(void);
void (*printUsage)(void);
void (*printUsageNotes)(void);
void *(*makeInterface)(void);
struct SqModule *next;
};
#define SqModuleDefine(TYPE, NAME) \
struct SqModule TYPE##_##NAME= { \
SqModuleVersion, \
#NAME, \
#TYPE, \
TYPE##_parseArgument, \
TYPE##_parseEnvironment, \
TYPE##_printUsage, \
TYPE##_printUsageNotes, \
TYPE##_makeInterface, \
0 \
}
#endif /* __sq_SqModule_h */
--- NEW FILE: SqSound.h ---
#ifndef __sq_SqSound_h
#define __sq_SqSound_h
#define SqSoundVersionMajor 1
#define SqSoundVersionMinor 1
#define SqSoundVersion ((SqSoundVersionMajor << 16) | (SqSoundVersionMinor))
struct SqSound
{
int version;
/* output */
int (*snd_AvailableSpace)(void);
int (*snd_InsertSamplesFromLeadTime)(int frameCount, int srcBufPtr, int samplesOfLeadTime);
int (*snd_PlaySamplesFromAtLength)(int frameCount, int arrayIndex, int startIndex);
int (*snd_PlaySilence)(void);
int (*snd_Start)(int frameCount, int samplesPerSec, int stereo, int semaIndex);
int (*snd_Stop)(void);
/* input */
int (*snd_StartRecording)(int desiredSamplesPerSec, int stereo, int semaIndex);
int (*snd_StopRecording)(void);
double (*snd_GetRecordingSampleRate)(void);
int (*snd_RecordSamplesIntoAtLength)(int buf, int startSliceIndex, int bufferSizeInBytes);
/* mixer */
void (*snd_Volume)(double *left, double *right);
void (*snd_SetVolume)(double left, double right);
int (*snd_SetRecordLevel)(int level);
};
#define SqSoundDefine(NAME) \
static struct SqSound sound_##NAME##_itf= { \
SqSoundVersion, \
sound_AvailableSpace, \
sound_InsertSamplesFromLeadTime, \
sound_PlaySamplesFromAtLength, \
sound_PlaySilence, \
sound_Start, \
sound_Stop, \
sound_StartRecording, \
sound_StopRecording, \
sound_GetRecordingSampleRate, \
sound_RecordSamplesIntoAtLength, \
sound_Volume, \
sound_SetVolume, \
sound_SetRecordLevel \
}
#endif /* __sq_SqSound_h */
--- NEW FILE: acinclude.m4 ---
AC_DEFUN([AC_LANGINFO_CODESET], [
AC_CACHE_CHECK([for nl_langinfo and CODESET], ac_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>], [char *cs= nl_langinfo(CODESET);],
ac_cv_langinfo_codeset=yes,
ac_cv_langinfo_codeset=no)
])
if test $ac_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi
AC_SUBST(HAVE_LANGINFO_CODESET)
])
AC_DEFUN([AC_ICONV], [
AC_CHECK_LIB(iconv, iconv_open, ac_cv_iconv=yes, [
AC_CHECK_LIB(iconv, libiconv_open, ac_cv_iconv=yes, ac_cv_iconv=no)
])
if test $ac_cv_iconv = yes; then
LIBS="$LIBS -liconv"
fi
])
AC_CHECK_HEADERS(iconv.h)
AC_ICONV
AC_LANGINFO_CODESET
case $host_os in
darwin*) LIBS="$LIBS -framework CoreFoundation";;
*) ;;
esac
--- NEW FILE: debug.c ---
#include "debug.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
void __sq_dprintf(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
}
void __sq_assert(char *file, int line, char *func, char *expr)
{
__sq_errfile= file;
__sq_errline= line;
__sq_errfunc= func;
__sq_eprintf("assertion failed: %s\n", expr);
abort();
}
char *__sq_errfile;
int __sq_errline;
char *__sq_errfunc;
void __sq_eprintf(const char *fmt, ...)
{
va_list ap;
char *file= strrchr(__sq_errfile, '/');
file= file ? file + 1 : __sq_errfile;
va_start(ap, fmt);
fprintf(stderr, "%s(%d): %s:\n", file, __sq_errline, __sq_errfunc);
fprintf(stderr, "%s(%d): ", file, __sq_errline);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
--- NEW FILE: debug.h ---
#ifndef __sq_debug_h
#define __sq_debug_h
#ifndef DEBUG
# define DEBUG 0
#endif
#if (DEBUG)
/* the thing to use here is a variadic macro, but Apple's gcc barfs on
** them when running in precomp mode. did they _really_ have to break
** the preprocessor just to implement precomp? good _grief_.
*/
extern void __sq_dprintf(const char *fmt, ...);
# define dprintf(ARGS) __sq_dprintf ARGS
#else
# define dprintf(ARGS) ((void)0)
#endif
#undef assert
#if (DEBUG)
extern void __sq_assert(char *file, int line, char *func, char *expr);
# define assert(E) \
((void)((E) ? 0 : __sq_assert(__FILE__, __LINE__, __FUNCTION__, #E)))
#else
# define assert(E) ((void)0)
#endif
extern char *__sq_errfile;
extern int __sq_errline;
extern char *__sq_errfunc;
extern void __sq_eprintf(const char *fmt, ...);
# define eprintf \
( __sq_errfile= __FILE__, \
__sq_errline= __LINE__, \
__sq_errfunc= __FUNCTION__, \
__sq_eprintf )
#endif /* __sq_debug_h */
--- NEW FILE: feedback.h ---
--- NEW FILE: sqUnixCharConv.c ---
/* sqUnixCharConv.c -- conversion between character encodings
*
* Author: Ian...@IN...
*
* Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
* as listed elsewhere in this file.
* All rights reserved.
*
* You are NOT ALLOWED to distribute modified versions of this file
* under its original name. If you want to modify it and then make
* your modifications available publicly, rename the file first.
*
* This file is part of Unix Squeak.
*
* This file 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.
*
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
* this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment to the original author(s) (and any
* other contributors mentioned herein) in the product documentation
* would be appreciated but is not required.
*
* 2. You must not distribute (or make publicly available by any
* means) a modified copy of this file unless you first rename it.
*
* 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*
* Last edited: 2003-03-04 03:22:54 by piumarta on emilia.inria.fr
*/
#if !defined(__MACH__)
# include "config.h"
#endif
#include "sqUnixCharConv.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static inline int min(int x, int y) { return (x < y) ? x : y; }
static int convertCopy(char *from, int fromLen, char *to, int toLen, int term)
{
int len= min(toLen - term, fromLen);
strncpy(to, from, len);
if (term) to[len]= '\0';
return len;
}
#if defined(__MACH__)
// we have to do something special on MacOSX (surprise surprise) because:
// - MacOSX isn't Unix98 compliant and lacks builtin iconv functions
// - the free libiconv cannot handle the canonical decomposition used in HFS+
// ho hum dee dumb
# include <CoreFoundation/CoreFoundation.h>
typedef struct
{
char *alias;
void *encoding;
} alias;
static alias encodings[]=
{
{ "MACROMAN", (void *)kCFStringEncodingMacRoman },
{ "MAC", (void *)kCFStringEncodingMacRoman },
{ "MACINTOSH", (void *)kCFStringEncodingMacRoman },
{ "CSMACINTOSH", (void *)kCFStringEncodingMacRoman },
{ "UTF8", (void *)kCFStringEncodingUTF8 },
{ "UTF-8", (void *)kCFStringEncodingUTF8 },
{ "ISOLATIN9", (void *)kCFStringEncodingISOLatin9 },
{ "LATIN9", (void *)kCFStringEncodingISOLatin9 },
{ "ISO-8859-15", (void *)kCFStringEncodingISOLatin9 },
{ "ISOLATIN1", (void *)kCFStringEncodingISOLatin1 },
{ "LATIN1", (void *)kCFStringEncodingISOLatin1 },
{ "ISO-8859-1", (void *)kCFStringEncodingISOLatin1 },
// there are many tens of these and I can't be bothered.
{ 0, 0 }
};
// defaults
void *sqTextEncoding= ((void *)kCFStringEncodingISOLatin9); // xxxFIXME -> kCFStringEncodingISOLatin9
void *uxTextEncoding= ((void *)kCFStringEncodingISOLatin9);
void *uxPathEncoding= ((void *)kCFStringEncodingUTF8);
void *uxUTF8Encoding= ((void *)kCFStringEncodingUTF8);
void *uxXWinEncoding= ((void *)kCFStringEncodingISOLatin1);
void setEncoding(void **encoding, char *rawName)
{
char *name= strdup(rawName);
int len= strlen(name);
int i;
int utf8= 0;
for (i= 0; i < len; ++i)
name[i]= toupper(name[i]);
alias *ap= encodings;
while (ap->alias)
if (!strcmp(name, ap->alias))
{
*encoding= ap->encoding;
goto done;
}
else
++ap;
fprintf(stderr, "setEncoding: could not set encoding '%s'\n", name);
done:
free(name);
}
int convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)
{
convertCopy(from, fromLen, to, toLen, 1);
{
CFStringRef cfs= CFStringCreateWithCString(NULL, to, (CFStringEncoding)fromCode);
CFMutableStringRef str= CFStringCreateMutableCopy(NULL, 0, cfs);
CFRelease(cfs);
if (norm) // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements
CFStringNormalize(str, kCFStringNormalizationFormD); // canonical decomposition
{
CFRange rng= CFRangeMake(0, CFStringGetLength(str));
CFIndex len= 0;
CFIndex num= CFStringGetBytes(str, rng, (CFStringEncoding)toCode, '?', 0, (UInt8 *)to, toLen - term, &len);
CFRelease(str);
if (!num)
return convertCopy(from, fromLen, to, toLen, term);
if (term)
to[len]= '\0';
return len;
}
}
}
#elif defined(HAVE_ICONV_H)
#include <iconv.h>
typedef char ichar_t;
void *sqTextEncoding= (void *)"MACINTOSH"; /* xxxFIXME -> "ISO-8859-15" */
void *uxTextEncoding= (void *)"ISO-8859-15";
void *uxPathEncoding= (void *)"UTF-8";
void *uxUTF8Encoding= (void *)"UTF-8";
void *uxXWinEncoding= (void *)"ISO-8859-1";
void setEncoding(void **encoding, char *rawName)
{
char *name= strdup(rawName);
int len= strlen(name);
int i;
for (i= 0; i < len; ++i)
name[i]= toupper(name[i]);
if (!strcmp(name, "MACROMAN")) *encoding= "MACINTOSH";
else if (!strcmp(name, "MAC-ROMAN")) *encoding= "MACINTOSH";
else
*encoding= (void *)name;
}
int convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)
{
ichar_t *inbuf= from;
size_t inbytes= fromLen;
char *outbuf= to;
size_t outbytes= toLen - term;
static iconv_t cd= (iconv_t)-1;
static void *pfc= 0;
static void *ptc= 0;
if ((pfc != fromCode) || (ptc != toCode))
{
if (cd != (iconv_t)-1) iconv_close(cd);
pfc= ptc= (void *)-1;
cd= iconv_open((const char *)toCode, (const char *)fromCode);
if ((iconv_t)-1 != cd)
{
pfc= fromCode;
ptc= toCode;
}
}
if ((iconv_t)-1 != cd)
{
int n= iconv(cd, &inbuf, &inbytes, &outbuf, &outbytes);
if ((size_t)-1 != n)
{
if (term) *outbuf= '\0';
return outbuf - to;
}
else
perror("iconv");
}
else
perror("iconv_open");
return convertCopy(from, fromLen, to, toLen, term);
}
#else /* !__MACH__ && !HAVE_LIBICONV */
void *sqTextEncoding= 0;
void *uxTextEncoding= 0;
void *uxPathEncoding= 0;
void *uxUTF8Encoding= 0;
void *uxXWinEncoding= 0;
void setEncoding(void **encoding, char *name) { }
int convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)
{
return convertCopy(from, fromLen, to, toLen, term);
}
#endif
static inline void sq2uxLines(char *string, int n)
{
while (n--)
{
if ('\015' == *string) *string= '\012';
++string;
}
}
static inline void ux2sqLines(char *string, int n)
{
while (n--)
{
if ('\012' == *string) *string= '\015';
++string;
}
}
#define Convert(sq,ux, type, F, T, N, L) \
int sq##2##ux##type(char *from, int fromLen, char *to, int toLen, int term) \
{ \
int n= convertChars(from, fromLen, F, to, toLen, T, N, term); \
if (L) sq##2##ux##Lines(to, n); \
return n; \
}
Convert(sq,ux, Text, sqTextEncoding, uxTextEncoding, 0, 1);
Convert(ux,sq, Text, uxTextEncoding, sqTextEncoding, 0, 1);
#if defined(__MACH__)
Convert(sq,ux, Path, sqTextEncoding, uxPathEncoding, 1, 0); // normalised paths for HFS+
#else
Convert(sq,ux, Path, sqTextEncoding, uxPathEncoding, 0, 0); // composed paths for others
#endif
Convert(ux,sq, Path, uxPathEncoding, sqTextEncoding, 0, 0);
Convert(sq,ux, UTF8, sqTextEncoding, uxUTF8Encoding, 0, 1);
Convert(ux,sq, UTF8, uxUTF8Encoding, sqTextEncoding, 0, 1);
#undef Convert
#if defined(CONV_TEST)
#if defined(HAVE_LANGINFO_CODESET)
# include <langinfo.h>
#endif
int main()
{
#if defined(HAVE_LANGINFO_CODESET)
if (0 == strcmp(nl_langinfo(CODESET)), "UTF-8")
printf("UTF-8 codeset selected\n");
#else
{
char *s;
if ((( (s = getenv("LC_ALL")) && *s)
|| ((s = getenv("LC_CTYPE")) && *s)
|| ((s = getenv("LANG")) && *s))
&& strstr(s, "UTF-8"))
printf("UTF-8 locale selected\n");
}
#endif
{
char *in, out[256];
int n;
in= "tésté"; // UTF-8 composed Unicode
n= convertChars(in, strlen(in), uxPathEncoding, out, sizeof(out), uxTextEncoding, 0, 1);
printf("%d: %s -> %s\n", n, in, out);
in= "teÌsteÌ"; // UTF-8 decomposed Unicode (libiconv fails on this one, MacOSX passes)
n= convertChars(in, strlen(in), uxPathEncoding, out, sizeof(out), uxTextEncoding, 0, 1);
printf("%d: %s -> %s\n", n, in, out);
in= "tésté"; // ISO-8859-15
n= convertChars(in, strlen(in), uxTextEncoding, out, sizeof(out), uxPathEncoding, 0, 1);
printf("%d: %s -> %s\n", n, in, out); // default composition -- should yield "tésté"
n= convertChars(in, strlen(in), uxTextEncoding, out, sizeof(out), uxPathEncoding, 1, 1);
printf("%d: %s -> %s\n", n, in, out); // canonical decomposition -- should yield "teÌsteÌ"
}
return 0;
}
/*
cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c -framework CoreFoundation # MacOSX
cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c # glibc >= 2.2
cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c -liconv # others
*/
#endif /* defined(CONV_TEST) */
--- NEW FILE: sqUnixCharConv.h ---
/* sqUnixCharConv.h -- conversion between character encodings
*
* Author: Ian...@IN...
*
* Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
* as listed elsewhere in this file.
* All rights reserved.
*
* You are NOT ALLOWED to distribute modified versions of this file
* under its original name. If you want to modify it and then make
* your modifications available publicly, rename the file first.
*
* This file is part of Unix Squeak.
*
* This file 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.
*
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
* this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment to the original author(s) (and any
* other contributors mentioned herein) in the product documentation
* would be appreciated but is not required.
*
* 2. You must not distribute (or make publicly available by any
* means) a modified copy of this file unless you first rename it.
*
* 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*
* Last edited: 2003-03-03 03:52:52 by piumarta on emilia.inria.fr
*/
#ifndef __sqUnixCharConv_h
#define __sqUnixCharConv_h
extern void *sqTextEncoding;
extern void *uxTextEncoding;
extern void *uxPathEncoding;
extern void *uxUTF8Encoding;
extern void *uxXWinEncoding;
extern void setEncoding(void **encoding, char *name);
extern int convertChars(char *from, int fromLen, void *fromCode,
char *to, int toLen, void *toCode,
int norm, int term);
extern int sq2uxText(char *from, int fromLen, char *to, int toLen, int term);
extern int ux2sqText(char *from, int fromLen, char *to, int toLen, int term);
extern int sq2uxPath(char *from, int fromLen, char *to, int toLen, int term);
extern int ux2sqPath(char *from, int fromLen, char *to, int toLen, int term);
extern int sq2uxUTF8(char *from, int fromLen, char *to, int toLen, int term);
extern int ux2sqUTF8(char *from, int fromLen, char *to, int toLen, int term);
#endif /* __sqUnixCharConv_h */
--- NEW FILE: sqUnixEvent.c ---
/* sqUnixEvent.c -- support for window system events.
*
* Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
* as listed elsewhere in this file.
* All rights reserved.
*
* You are NOT ALLOWED to distribute modified versions of this file
* under its original name. If you want to modify it and then make
* your modifications available publicly, rename the file first.
*
* This file is part of Unix Squeak.
*
* This file 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.
*
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
* this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment to the original author(s) (and any
* other contributors mentioned herein) in the product documentation
* would be appreciated but is not required.
*
* 2. You must not distribute (or make publicly available by any
* means) a modified copy of this file unless you first rename it.
*
* 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*/
/* Author: Ian Piumarta <ian...@in...>
*
* Last edited: 2003-02-11 04:53:56 by piumarta on emilia.inria.fr
*
* NOTE: this file is included by the window support files that need it.
*/
#define IEB_SIZE 64 /* must be power of 2 */
typedef struct
{
int x, y;
} SqPoint;
SqPoint mousePosition= { 0, 0 }; /* position at last motion event */
int swapBtn= 0; /* 1 to swap yellow and blue buttons */
sqInputEvent inputEventBuffer[IEB_SIZE];
int iebIn= 0; /* next IEB location to write */
int iebOut= 0; /* next IEB location to read */
#define iebEmptyP() (iebIn == iebOut)
#define iebAdvance(P) (P= ((P + 1) & (IEB_SIZE - 1)))
int buttonState= 0; /* mouse button state or 0 if not pressed */
int modifierState= 0; /* modifier key state or 0 if none pressed */
#if defined(DEBUG_EVENTS)
#include <ctype.h>
static void printKey(int key)
{
printf(" `%c' (%d = 0x%x)", (isgraph(key) ? key : ' '), key, key);
}
static void printButtons(int buttons)
{
if (buttons & RedButtonBit) printf(" red");
if (buttons & YellowButtonBit) printf(" yellow");
if (buttons & BlueButtonBit) printf(" blue");
}
static void printModifiers(int midofiers)
{
if (midofiers & ShiftKeyBit) printf(" Shift");
if (midofiers & CtrlKeyBit) printf(" Control");
if (midofiers & CommandKeyBit) printf(" Command");
if (midofiers & OptionKeyBit) printf(" Option");
}
#endif
static sqInputEvent *allocateInputEvent(int eventType)
{
sqInputEvent *evt= &inputEventBuffer[iebIn];
iebAdvance(iebIn);
if (iebEmptyP())
{
/* overrun: discard oldest event */
iebAdvance(iebOut);
}
evt->type= eventType;
evt->timeStamp= ioMSecs();
return evt;
}
#define allocateMouseEvent() ( \
(sqMouseEvent *)allocateInputEvent(EventTypeMouse) \
)
#define allocateKeyboardEvent() ( \
(sqKeyboardEvent *)allocateInputEvent(EventTypeKeyboard) \
)
#define allocateDragEvent() ( \
(sqDragDropFilesEvent *)allocateInputEvent(EventTypeDragDropFiles) \
)
static int getButtonState(void)
{
/* red button honours the modifiers:
* red+ctrl = yellow button
* red+command = blue button
*/
int buttons= buttonState;
int modifiers= modifierState;
if ((buttons == RedButtonBit) && modifiers)
{
int yellow= swapBtn ? BlueButtonBit : YellowButtonBit;
int blue= swapBtn ? YellowButtonBit : BlueButtonBit;
switch (modifiers)
{
case CtrlKeyBit: buttons= yellow; modifiers &= ~CtrlKeyBit; break;
case CommandKeyBit: buttons= blue; modifiers &= ~CommandKeyBit; break;
}
}
#ifdef DEBUG_EVENTS
printf("BUTTONS");
printModifiers(modifiers);
printButtons(buttons);
printf("\n");
#endif
return buttons | (modifiers << 3);
}
static void signalInputEvent(void)
{
#ifdef DEBUG_EVENTS
printf("signalInputEvent\n");
#endif
if (inputEventSemaIndex > 0)
signalSemaphoreWithIndex(inputEventSemaIndex);
}
static void recordMouseEvent(void)
{
int state= getButtonState();
sqMouseEvent *evt= allocateMouseEvent();
evt->x= mousePosition.x;
evt->y= mousePosition.y;
evt->buttons= (state & 0x7);
evt->modifiers= (state >> 3);
evt->reserved1=
evt->reserved2= 0;
signalInputEvent();
#ifdef DEBUG_EVENTS
printf("EVENT: mouse (%d,%d)", mousePosition.x, mousePosition.y);
printModifiers(state >> 3);
printButtons(state & 7);
printf("\n");
#endif
}
static void recordKeyboardEvent(int keyCode, int pressCode, int modifiers)
{
sqKeyboardEvent *evt= allocateKeyboardEvent();
evt->charCode= keyCode;
evt->pressCode= pressCode;
evt->modifiers= modifiers;
evt->reserved1=
evt->reserved2=
evt->reserved3= 0;
signalInputEvent();
#ifdef DEBUG_EVENTS
printf("EVENT: key");
switch (pressCode)
{
case EventKeyDown: printf(" down "); break;
case EventKeyChar: printf(" char "); break;
case EventKeyUp: printf(" up "); break;
default: printf(" ***UNKNOWN***"); break;
}
printModifiers(modifiers);
printKey(keyCode);
printf("\n");
#endif
}
static void recordDragEvent(int dragType, int numFiles)
{
int state= getButtonState();
sqDragDropFilesEvent *evt= allocateDragEvent();
evt->dragType= dragType;
evt->x= mousePosition.x;
evt->y= mousePosition.y;
evt->modifiers= (state >> 3);
evt->numFiles= numFiles;
evt->reserved1= 0;
signalInputEvent();
#ifdef DEBUG_EVENTS
printf("EVENT: drag (%d,%d)", mousePosition.x, mousePosition.y);
printModifiers(state >> 3);
printButtons(state & 7);
printf("\n");
#endif
}
/* retrieve the next input event from the queue */
static int display_ioGetNextEvent(sqInputEvent *evt)
{
if (iebEmptyP())
ioProcessEvents();
if (iebEmptyP())
return false;
*evt= inputEventBuffer[iebOut];
iebAdvance(iebOut);
return true;
}
/*** the following are deprecated and should really go away. for now
we keep them for backwards compatibility with ancient images ***/
#define KEYBUF_SIZE 64
static int keyBuf[KEYBUF_SIZE]; /* circular buffer */
static int keyBufGet= 0; /* index of next item of keyBuf to read */
static int keyBufPut= 0; /* index of next item of keyBuf to write */
static int keyBufOverflows= 0; /* number of characters dropped */
static void recordKeystroke(int keyCode) /* DEPRECATED */
{
if (inputEventSemaIndex == 0)
{
int keystate= keyCode | (modifierState << 8);
# ifdef DEBUG_EVENTS
printf("RECORD keystroke");
printModifiers(modifierState);
printKey(keyCode);
printf(" = %d 0x%x\n", keystate, keystate);
# endif
if (keystate == getInterruptKeycode())
{
setInterruptPending(true);
setInterruptCheckCounter(0);
}
else
{
keyBuf[keyBufPut]= keystate;
keyBufPut= (keyBufPut + 1) % KEYBUF_SIZE;
if (keyBufGet == keyBufPut)
{
/* buffer overflow; drop the last character */
keyBufGet= (keyBufGet + 1) % KEYBUF_SIZE;
keyBufOverflows++;
}
}
}
}
static int display_ioPeekKeystroke(void) /* DEPRECATED */
{
int keystate;
ioProcessEvents(); /* process all pending events */
if (keyBufGet == keyBufPut)
return -1; /* keystroke buffer is empty */
keystate= keyBuf[keyBufGet];
return keystate;
}
static int display_ioGetKeystroke(void) /* DEPRECATED */
{
int keystate;
ioProcessEvents(); /* process all pending events */
if (keyBufGet == keyBufPut)
return -1; /* keystroke buffer is empty */
keystate= keyBuf[keyBufGet];
keyBufGet= (keyBufGet + 1) % KEYBUF_SIZE;
return keystate;
}
static int display_ioGetButtonState(void)
{
ioProcessEvents(); /* process all pending events */
return getButtonState();
}
static int display_ioMousePoint(void)
{
ioProcessEvents(); /* process all pending events */
/* x is high 16 bits; y is low 16 bits */
return (mousePosition.x << 16) | (mousePosition.y);
}
--- NEW FILE: sqUnixGL.h ---
extern void *ioGLcreateView(int x, int y, int w, int h, int flags);
extern void *ioGLcreateContext(void *drawable);
extern int ioGLsetCurrentContext(void *ctx);
extern int ioGLdestroyContext(void *ctx);
extern int ioGLdestroyView(void *drawable);
extern int ioGLflushBuffer(void *drawable, void *ctx);
--- NEW FILE: sqUnixGlobals.h ---
#ifndef __sqUnixGlobals_h
#define __sqUnixGlobals_h
#if 1 /* use global structure */
extern int getFullScreenFlag(void);
extern void setFullScreenFlag(int i);
extern int getInterruptCheckCounter(void);
extern void setInterruptCheckCounter(int i);
extern int getInterruptKeycode(void);
extern void setInterruptKeycode(int i);
extern int getInterruptPending(void);
extern void setInterruptPending(int i);
extern int getSavedWindowSize(void);
extern void setSavedWindowSize(int i);
#else /* ! global structure */
extern int fullScreenFlag;
extern int interruptCheckCounter;
extern int interruptKeycode;
extern int interruptPending;
extern int savedWindowSize;
# define getFullScreenFlag() (fullScreenFlag)
# define setFullScreenFlag(I) (fullScreenFlag= (I))
# define getInterruptCheckCounter() (interruptCheckCounter)
# define setInterruptCheckCounter(I) (interruptCheckCounter= (I))
# define getInterruptKeycode() (interruptKeycode)
# define setInterruptKeycode(I) (interruptKeycode= (I))
# define getInterruptPending() (interruptPending)
# define setInterruptPending(I) (interruptPending= (I))
# define getSavedWindowSize() (savedWindowSize)
# define setSavedWindowSize(I) (savedWindowSize= (I))
#endif /* !global structure */
#endif /* __sqUnixGlobals_h */
--- NEW FILE: sqUnixMain.c ---
/* sqUnixMain.c -- support for Unix.
*
* Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
* as listed elsewhere in this file.
* All rights reserved.
*
* You are NOT ALLOWED to distribute modified versions of this file
* under its original name. If you want to modify it and then make
* your modifications available publicly, rename the file first.
*
* This file is part of Unix Squeak.
*
* This file 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.
*
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
* this distribution, subject to the following additional restrictions:
[...998 lines suppressed...]
exit(1);
}
#endif
/* run Squeak */
interpret();
/* we need these, even if not referenced from main executable */
(void)sq2uxPath;
(void)ux2sqPath;
return 0;
}
int ioExit(void)
{
dpy->winExit();
exit(0);
}
--- NEW FILE: sqUnixMain.h ---
#ifndef __sqUnixMain_h
#define __sqUnixMain_h
extern char shortImageName[];
extern int inputEventSemaIndex;
extern char vmPath[];
extern char **argVec;
extern int fullScreenFlag;
extern int textEncodingUTF8;
extern void imgInit(void);
#endif /* __sqUnixMain_h */
--- NEW FILE: sqUnixWindow.h ---
Index: Makefile.in
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/Makefile.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile.in 12 May 2003 07:26:29 -0000 1.1
--- Makefile.in 13 May 2003 22:19:01 -0000 1.2
***************
*** 5,8 ****
--- 5,12 ----
# All rights reserved.
#
+ # You are NOT ALLOWED to distribute modified versions of this file
+ # under its original name. If you want to modify it and then make
+ # your modifications available publicly, rename the file first.
+ #
# This file is part of Unix Squeak.
#
***************
*** 13,17 ****
# You may use and/or distribute this file ONLY as part of Squeak, under
# the terms of the Squeak License as described in `LICENSE' in the base of
! # this distribution, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
# You may use and/or distribute this file ONLY as part of Squeak, under
# the terms of the Squeak License as described in `LICENSE' in the base of
! # this distribution, subject to the following additional restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,25 ****
# would be appreciated but is not required.
#
! # 2. This notice must not be removed or altered in any source distribution.
#
# Using (or modifying this file for use) in any context other than Squeak
--- 25,32 ----
# would be appreciated but is not required.
#
! # 2. You must not distribute (or make publicly available by any
! # means) a modified copy of this file unless you first rename it.
! #
! # 3. This notice must not be removed or altered in any source distribution.
#
# Using (or modifying this file for use) in any context other than Squeak
***************
*** 27,37 ****
# directory `platforms/unix/doc' before proceeding with any such use.
#
- # You are not allowed to distribute a modified version of this file
- # under its original name without explicit permission to do so. If
- # you change it, rename it.
- #
# Author: ian...@in...
#
! # Last edited: 2002-12-01 10:20:57 by piumarta on calvin.inria.fr
[make_cfg]
--- 34,40 ----
# directory `platforms/unix/doc' before proceeding with any such use.
#
# Author: ian...@in...
#
! # Last edited: 2003-03-01 19:19:04 by piumarta on emilia.inria.fr
[make_cfg]
***************
*** 39,46 ****
TARGET = vm$a
! OBJS = $(INTERP)$o sqNamedPrims$o sqVirtualMachine$o \
! aio$o osExports$o sqUnixExternalPrims$o sqUnixMozilla$o sqXWindow$o
! XINCLUDES = [includes] -I$(topdir)/platforms/Cross/plugins/FilePlugin
$(TARGET) : $(OBJS) Makefile
--- 42,52 ----
TARGET = vm$a
! OBJS = $(INTERP)$o sqNamedPrims$o sqVirtualMachine$o aio$o debug$o osExports$o \
! sqUnixExternalPrims$o sqUnixMemory$o sqUnixCharConv$o sqUnixMain$o
! XINCLUDES = [includes] \
! -I$(topdir)/platforms/Cross/plugins/FilePlugin \
! -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin \
! $(X_INCLUDES)
$(TARGET) : $(OBJS) Makefile
Index: aio.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/aio.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** aio.c 12 May 2003 07:26:29 -0000 1.1
--- aio.c 13 May 2003 22:19:01 -0000 1.2
***************
*** 5,8 ****
--- 5,12 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 13,17 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,38 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
- *
- * You are not allowed to distribute a modified version of this file
- * under its original name without explicit permission to do so. If
- * you change it, rename it.
*/
/* Author: Ian...@in...
*
! * Last edited: 2003-02-06 16:36:13 by piumarta on emilia.local.
*/
--- 25,41 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*/
/* Author: Ian...@in...
*
! * Last edited: 2003-02-27 19:47:59 by piumarta on emilia.inria.fr
*/
***************
*** 96,101 ****
#undef DEBUG
! #ifdef DEBUG
# define FPRINTF(X) fprintf X
static char *ticks= "-\\|/";
--- 99,105 ----
#undef DEBUG
+ #undef DEBUG_TICKER
! #if defined(DEBUG) && defined(DEBUG_TICKER)
# define FPRINTF(X) fprintf X
static char *ticks= "-\\|/";
***************
*** 230,233 ****
--- 234,238 ----
# undef _DO
}
+ return 1;
}
}
Index: aio.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/aio.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** aio.h 12 May 2003 07:26:29 -0000 1.1
--- aio.h 13 May 2003 22:19:01 -0000 1.2
***************
*** 5,8 ****
--- 5,12 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 13,17 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,38 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
- *
- * You are not allowed to distribute a modified version of this file
- * under its original name without explicit permission to do so. If
- * you change it, rename it.
*/
/* author: ian...@in...
*
! * last edited: 2003-02-06 16:34:35 by piumarta on emilia.local.
*/
--- 25,41 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*/
/* author: ian...@in...
*
! * last edited: 2002-12-02 20:20:13 by piumarta on calvin.inria.fr
*/
Index: dlfcn-dyld.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/dlfcn-dyld.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dlfcn-dyld.c 12 May 2003 07:26:29 -0000 1.1
--- dlfcn-dyld.c 13 May 2003 22:19:01 -0000 1.2
***************
*** 1,3 ****
! /* dlfcn-darwin.c -- provides dlopen() and friends as wrappers to Mach's dylib
*
* Author: Ian...@IN...
--- 1,3 ----
! /* dlfcn-dyld.c -- provides dlopen() and friends as wrappers around Mach dyld
*
* Author: Ian...@IN...
***************
*** 7,10 ****
--- 7,14 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 15,19 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 19,23 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 23,27 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
--- 27,34 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
***************
*** 29,37 ****
* directory `platforms/unix/doc' before proceeding with any such use.
*
! * You are not allowed to distribute a modified version of this file
! * under its original name without explicit permission to do so. If
! * you change it, rename it.
! *
! * Last edited: 2002-12-01 10:28:43 by piumarta on calvin.inria.fr
*/
--- 36,40 ----
* directory `platforms/unix/doc' before proceeding with any such use.
*
! * Last edited: 2002-12-01 16:06:50 by piumarta on calvin.inria.fr
*/
***************
*** 99,103 ****
! void *dlsym(void *handle, const char *symbol)
{
char _symbol[256];
--- 102,106 ----
! static void *dlsym(void *handle, const char *symbol)
{
char _symbol[256];
***************
*** 150,154 ****
! int dlclose(void *handle)
{
if (( (MH_MAGIC == ((struct mach_header *)handle)->magic)) /* ppc */
--- 153,157 ----
! static int dlclose(void *handle)
{
if (( (MH_MAGIC == ((struct mach_header *)handle)->magic)) /* ppc */
Index: sqPlatformSpecific.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqPlatformSpecific.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sqPlatformSpecific.h 12 May 2003 07:39:08 -0000 1.8
--- sqPlatformSpecific.h 13 May 2003 22:19:01 -0000 1.9
***************
*** 5,8 ****
--- 5,12 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 13,17 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,25 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
--- 25,32 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
***************
*** 27,37 ****
* directory `platforms/unix/doc' before proceeding with any such use.
*
- * You are not allowed to distribute a modified version of this file
- * under its original name without explicit permission to do so. If
- * you change it, rename it.
- *
* Author: ian...@in...
*
! * Last edited: 2002-06-08 02:34:43 by piumarta on emilia.inria.fr
*/
--- 34,40 ----
* directory `platforms/unix/doc' before proceeding with any such use.
*
* Author: ian...@in...
*
! * Last edited: 2003-03-02 21:06:24 by piumarta on emilia.inria.fr
*/
***************
*** 42,46 ****
--- 45,71 ----
#undef ioLowResMSecs
+ #undef sqAllocateMemory
+ #undef sqGrowMemoryBy
+ #undef sqShrinkMemoryBy
+ #undef sqMemoryExtraBytesLeft
+
#include <sys/types.h>
typedef off_t squeakFileOffsetType;
+
+ #define SQ_STDIO_UTF8
+
+ /* intercept stdio functions that might need UTF-8 path conversion. */
+ /* (on HFS+ we also need to perform canonical decomposition on the UTF-8 encoding.) */
+
+ #if defined(SQ_STDIO_UTF8)
+ # undef fopen
+ # undef delete
+ # undef remove
+ extern FILE *sq_fopen(char *path, const char *mode);
+ extern int sq_remove(char *path);
+ extern int sq_rename(char *from, char *to);
+ # define fopen sq_fopen
+ # define remove sq_remove
+ # define rename sq_rename
+ #endif
Index: sqUnixExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqUnixExternalPrims.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqUnixExternalPrims.c 12 May 2003 07:39:09 -0000 1.3
--- sqUnixExternalPrims.c 13 May 2003 22:19:01 -0000 1.4
***************
*** 5,8 ****
--- 5,12 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 13,17 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,44 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
- *
- * You are not allowed to distribute a modified version of this file
- * under its original name without explicit permission to do so. If
- * you change it, rename it.
*/
/* Author: Ian...@IN...
*
! * Last edited: 2003-01-29 21:51:13 by piumarta on emilia.local.
*/
- #include "sq.h" /* sqUnixConfig.h */
-
#define DEBUG 0
#if DEBUG
# define dprintf(ARGS) fprintf ARGS
--- 25,47 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*/
/* Author: Ian...@IN...
*
! * Last edited: 2003-02-21 03:48:48 by piumarta on emilia.inria.fr
*/
#define DEBUG 0
+ #include "sq.h" /* sqUnixConfig.h */
+
#if DEBUG
# define dprintf(ARGS) fprintf ARGS
***************
*** 47,51 ****
#endif
! #if defined(HAVE_DYLD)
# include "dlfcn-dyld.c"
#endif
--- 50,54 ----
#endif
! #if !defined(HAVE_LIBDL) && defined(HAVE_DYLD)
# include "dlfcn-dyld.c"
#endif
***************
*** 124,130 ****
char libName[NAME_MAX + 32]; /* headroom for prefix/suffix */
struct stat buf;
- int err;
sprintf(libName, "%s%s%s%s", dirName, *prefix, moduleName, *suffix);
! if (((err= stat(libName, &buf)) == 0) && (S_ISDIR(buf.st_mode)))
dprintf((stderr, "ignoring directory: %s\n", libName));
else
--- 127,134 ----
char libName[NAME_MAX + 32]; /* headroom for prefix/suffix */
struct stat buf;
sprintf(libName, "%s%s%s%s", dirName, *prefix, moduleName, *suffix);
! if (stat(libName, &buf))
! dprintf((stderr, "not found: %s\n", libName));
! else if (S_ISDIR(buf.st_mode))
dprintf((stderr, "ignoring directory: %s\n", libName));
else
***************
*** 133,143 ****
handle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);
if (handle == 0)
! {
! if (err == 0)
! fprintf(stderr, "ioLoadModule(%s):\n %s\n", libName, dlerror());
! }
else
{
! dprintf((stderr, "loaded: %s\n", libName));
return handle;
}
--- 137,144 ----
handle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);
if (handle == 0)
! fprintf(stderr, "ioLoadModule(%s):\n %s\n", libName, dlerror());
else
{
! printf("squeak: loaded plugin `%s'\n", libName);
return handle;
}
***************
*** 219,238 ****
}
- /* these are ordered such that a knowledgeable user can override a
- "system" library with one in the CWD */
-
if (( handle= tryLoading( "./", pluginName))
- /* this is the standard location for the plugins */
|| (handle= tryLoading(VM_LIBDIR"/", pluginName))
- /* this is the default case: when LD_LIBRARY_PATH is not
- it searches /etc/ld.so.cache, /lib and /usr/lib */
|| (handle= tryLoading( "", pluginName))
- /* try SQUEAK_PLUGIN_PATH and LD_LIBRARY_PATH if set */
|| (handle= tryLoadingPath("SQUEAK_PLUGIN_PATH", pluginName))
|| (handle= tryLoadingPath("LD_LIBRARY_PATH", pluginName)))
return (int)handle;
-
- dprintf(("ioLoadModule: could not load: %s\n", pluginName));
return 0;
}
--- 220,268 ----
}
if (( handle= tryLoading( "./", pluginName))
|| (handle= tryLoading(VM_LIBDIR"/", pluginName))
|| (handle= tryLoading( "", pluginName))
|| (handle= tryLoadingPath("SQUEAK_PLUGIN_PATH", pluginName))
|| (handle= tryLoadingPath("LD_LIBRARY_PATH", pluginName)))
return (int)handle;
+ #if defined(DARWIN)
+ // look in the bundle contents dir
+ {
+ static char *contents= 0;
+ extern char vmPath[];
+ if (!contents)
+ {
+ char *delim;
+ contents= strdup(vmPath);
+ if ((delim= strrchr(contents, '/')))
+ delim[1]= '\0';
+ }
+ if ((handle= tryLoading(contents, pluginName)))
+ return (int)handle;
+ }
+ // the following is needed so that, for example, the FFI can pick up
+ // things like <cdecl: 'xyz' module: 'CoreServices'>
+ {
+ static char *frameworks[]=
+ {
+ "/System/Library/Frameworks",
+ "/System/Library/Frameworks/CoreServices.framework/Frameworks",
+ "/System/Library/Frameworks/ApplicationServices.framework/Frameworks",
+ "/System/Library/Frameworks/Carbon.framework/Frameworks",
+ 0
+ };
+ char **framework= 0;
+ for (framework= frameworks; *framework; ++framework)
+ {
+ char path[NAME_MAX];
+ sprintf(path, "%s/%s.framework/", *framework, pluginName);
+ if ((handle= tryLoading(path, pluginName)))
+ return (int)handle;
+ }
+ }
+ #endif
+
+ fprintf(stderr, "squeak: could not load plugin `%s'\n", pluginName);
return 0;
}
***************
*** 250,257 ****
if (fn == 0)
! dprintf((stderr, "ioFindExternalFunctionIn(%s, %d):\n %s\n",
! lookupName, moduleHandle, dlerror()));
! else
! dprintf((stderr, " => %d (0x%x)\n", (int)fn, (int)fn));
return (int)fn;
--- 280,285 ----
if (fn == 0)
! fprintf(stderr, "ioFindExternalFunctionIn(%s, %d):\n %s\n",
! lookupName, moduleHandle, dlerror());
return (int)fn;
***************
*** 262,266 ****
/* Free the module with the associated handle. Answer 0 on error (do
* NOT fail the primitive!).
! */
int ioFreeModule(int moduleHandle)
{
--- 290,294 ----
/* Free the module with the associated handle. Answer 0 on error (do
* NOT fail the primitive!).
! */
int ioFreeModule(int moduleHandle)
{
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:13:05
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv15901
Modified Files:
Tag: ian-branch
sqGnu.h
Log Message:
Ian Piumarta's release 3.5-1devel
Index: sqGnu.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqGnu.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** sqGnu.h 12 May 2003 07:00:36 -0000 1.1.2.1
--- sqGnu.h 13 May 2003 22:13:02 -0000 1.1.2.2
***************
*** 5,8 ****
--- 5,12 ----
* All rights reserved.
*
+ * You are NOT ALLOWED to distribute modified versions of this file
+ * under its original name. If you want to modify it and then make
+ * your modifications available publicly, rename the file first.
+ *
* This file is part of Unix Squeak.
*
***************
*** 13,17 ****
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
--- 17,21 ----
* You may use and/or distribute this file ONLY as part of Squeak, under
* the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following additional restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
***************
*** 21,38 ****
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
- *
- * You are not allowed to distribute a modified version of this file
- * under its original name without explicit permission to do so. If
- * you change it, rename it.
*/
/* Author: Ian...@in...
*
! * Last edited: 2002-07-17 23:13:49 by piumarta on emilia.inria.fr
*
* NOTES:
--- 25,41 ----
* would be appreciated but is not required.
*
! * 2. You must not distribute (or make publicly available by any
! * means) a modified copy of this file unless you first rename it.
! *
! * 3. This notice must not be removed or altered in any source distribution.
*
* Using (or modifying this file for use) in any context other than Squeak
* changes these copyright conditions. Read the file `COPYING' in the
* directory `platforms/unix/doc' before proceeding with any such use.
*/
/* Author: Ian...@in...
*
! * Last edited: 2003-02-11 05:08:36 by piumarta on emilia.inria.fr
*
* NOTES:
***************
*** 42,48 ****
#include "sq.h"
! #define CASE(N) case N: _##N:
! #define BREAK goto *jumpTablePtr[currentBytecode]
#define PRIM_DISPATCH goto *jumpTable[primitiveIndex]
#define JUMP_TABLE \
static void *jumpTable[256]= { \
--- 45,60 ----
#include "sq.h"
! #define CASE(N) case N: _##N:
!
! #if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)
! # define JUMP_TABLE_PTR ; register void **jumpTableP JP_REG; jumpTableP= &jumpTable[0]
! # define BREAK goto *jumpTableP[currentBytecode]
! #else
! # define JUMP_TABLE_PTR
! # define BREAK goto *jumpTable[currentBytecode]
! #endif
!
#define PRIM_DISPATCH goto *jumpTable[primitiveIndex]
+
#define JUMP_TABLE \
static void *jumpTable[256]= { \
***************
*** 73,77 ****
&&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \
&&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \
! }
#define PRIM_TABLE \
--- 85,89 ----
&&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \
&&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \
! } JUMP_TABLE_PTR
#define PRIM_TABLE \
***************
*** 179,183 ****
# endif
#endif
! #if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2)
# define JP_REG asm("25")
# define IP_REG asm("26")
--- 191,196 ----
# endif
#endif
! #if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)
! # define GP_REG asm("24")
# define JP_REG asm("25")
# define IP_REG asm("26")
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 22:06:54
|
Update of /cvsroot/squeak/squeak/platforms/Cross/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv13464
Modified Files:
Tag: ian-branch
sqVirtualMachine.h
Log Message:
Ian Piumarta's release 3.5-1devel
Index: sqVirtualMachine.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/vm/sqVirtualMachine.h,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -d -r1.4 -r1.4.4.1
*** sqVirtualMachine.h 5 May 2002 18:56:07 -0000 1.4
--- sqVirtualMachine.h 13 May 2003 22:06:51 -0000 1.4.4.1
***************
*** 45,50 ****
double (*fetchFloatofObject)(int fieldIndex, int objectPointer);
int (*fetchIntegerofObject)(int fieldIndex, int objectPointer);
! int (*fetchPointerofObject)(int index, int oop);
! int (*fetchWordofObject)(int fieldIndex, int oop);
void * (*firstFixedField)(int oop);
void * (*firstIndexableField)(int oop);
--- 45,50 ----
double (*fetchFloatofObject)(int fieldIndex, int objectPointer);
int (*fetchIntegerofObject)(int fieldIndex, int objectPointer);
! int (*fetchPointerofObject)(int fieldIndex, int oop);
! int (*fetchWordofObject)(int fieldFieldIndex, int oop);
void * (*firstFixedField)(int oop);
void * (*firstIndexableField)(int oop);
***************
*** 56,64 ****
int (*sizeOfSTArrayFromCPrimitive)(void *cPtr);
int (*slotSizeOf)(int oop);
! int (*stObjectat)(int array, int index);
! int (*stObjectatput)(int array, int index, int value);
int (*stSizeOf)(int oop);
! int (*storeIntegerofObjectwithValue)(int index, int oop, int integer);
! int (*storePointerofObjectwithValue)(int index, int oop, int valuePointer);
--- 56,64 ----
int (*sizeOfSTArrayFromCPrimitive)(void *cPtr);
int (*slotSizeOf)(int oop);
! int (*stObjectat)(int array, int fieldIndex);
! int (*stObjectatput)(int array, int fieldIndex, int value);
int (*stSizeOf)(int oop);
! int (*storeIntegerofObjectwithValue)(int fieldIndex, int oop, int integer);
! int (*storePointerofObjectwithValue)(int fieldIndex, int oop, int valuePointer);
|
|
From: Brenda L. <asp...@us...> - 2003-05-13 21:53:29
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/B3DAcceleratorPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv8980 Modified Files: sqOpenGLRenderer.h Log Message: Ian Piumarta's release 3.5-1devel Index: sqOpenGLRenderer.h =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sqOpenGLRenderer.h 18 Dec 2001 22:52:56 -0000 1.2 --- sqOpenGLRenderer.h 13 May 2003 21:53:25 -0000 1.3 *************** *** 7,11 **** # include "sqWin32OpenGL.h" #elif defined(UNIX) - # include <GL/glx.h> # include "sqUnixOpenGL.h" #endif --- 7,10 ---- |