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: John M M. <jo...@us...> - 2003-10-04 04:45:55
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets In directory sc8-pr-cvs1:/tmp/cvs-serv30514/squeak/platforms/Mac OS/vm/specialChangeSets Added Files: FasterLookupMethod-JMM.1.cs Log Message: 3.6.0b2 additional changesets for Mac VM performance reasons --- NEW FILE: FasterLookupMethod-JMM.1.cs --- 'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 6 August 2003 at 12:05:30 pm'! "Change Set: FasterLookupMethod-JMM Date: 6 August 2003 Author: jo...@sm... Change lookupMethodInDictionary: to force nilObj into a local register for compare, and don't compare the selector to nilObj (the failure case) before comparing to the wanted selector. This usually removes an extra if statement check since the failure case is 1/20 of the found case"! !Interpreter methodsFor: 'message sending' stamp: 'JMM 8/5/2003 22:14'! lookupMethodInDictionary: dictionary "This method lookup tolerates integers as Dictionary keys to support execution of images in which Symbols have been compacted out" | length index mask wrapAround nextSelector methodArray nilOops| self inline: true. nilOops _ nilObj. length _ self fetchWordLengthOf: dictionary. mask _ length - SelectorStart - 1. (self isIntegerObject: messageSelector) ifTrue: [index _ (mask bitAnd: (self integerValueOf: messageSelector)) + SelectorStart] ifFalse: [index _ (mask bitAnd: (self hashBitsOf: messageSelector)) + SelectorStart]. "It is assumed that there are some nils in this dictionary, and search will stop when one is encountered. However, if there are no nils, then wrapAround will be detected the second time the loop gets to the end of the table." wrapAround _ false. [true] whileTrue: [nextSelector _ self fetchPointer: index ofObject: dictionary. nextSelector=messageSelector ifTrue: [ methodArray _ self fetchPointer: MethodArrayIndex ofObject: dictionary. newMethod _ self fetchPointer: index - SelectorStart ofObject: methodArray. "Check if newMethod is a CompiledMethod." (self formatOf: newMethod) >= 12 ifTrue:[ primitiveIndex _ self primitiveIndexOf: newMethod. primitiveIndex > MaxPrimitiveIndex ifTrue:[ "If primitiveIndex is out of range, set to zero before putting in cache. This is equiv to primFail, and avoids the need to check on every send." primitiveIndex _ 0. ]. ] ifFalse:[ "indicate that this is no compiled method" primitiveIndex := 248. ]. ^true ]. nextSelector=nilOops ifTrue: [^false]. index _ index + 1. index = length ifTrue: [wrapAround ifTrue: [^false]. wrapAround _ true. index _ SelectorStart]]! ! |
|
From: John M M. <jo...@us...> - 2003-10-04 04:45:55
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets In directory sc8-pr-cvs1:/tmp/cvs-serv30487/squeak/platforms/Mac OS/vm/specialChangeSets Added Files: FasterCopyLoopPart2-JMM.2.cs Log Message: 3.6.0b2 additional changesets for Mac VM performance reasons --- NEW FILE: FasterCopyLoopPart2-JMM.2.cs --- 'From Squeak3.6beta of ''4 July 2003'' [latest update: #5331] on 29 July 2003 at 2:36:26 pm'! !BitBltSimulation methodsFor: 'inner loop' stamp: 'jmm 7/15/2003 20:44'! copyLoopNoSource "Faster copyLoop when source not used. hDir and vDir are both positive, and perload and skew are unused" | halftoneWord mergeWord mergeFnwith destWord destIndexLocal nWordsMinusOne | self inline: false. self var: #mergeFnwith declareC: 'int (*mergeFnwith)(int, int)'. mergeFnwith _ self cCoerce: (opTable at: combinationRule + 1) to: 'int (*)(int, int)'. mergeFnwith. "null ref for compiler" destIndexLocal _ destIndex. nWordsMinusOne _ nWords - 1. 1 to: bbH do: [:i | "here is the vertical loop" noHalftone ifTrue: [halftoneWord _ AllOnes] ifFalse: [halftoneWord _ self halftoneAt: dy + i - 1]. "Note: the horizontal loop has been expanded into three parts for speed:" "This first section requires masking of the destination store..." destMask _ mask1. destWord _ self dstLongAt: destIndexLocal. mergeWord _ self mergeFn: halftoneWord with: destWord. destWord _ (destMask bitAnd: mergeWord) bitOr: (destWord bitAnd: destMask bitInvert32). self dstLongAt: destIndexLocal put: destWord. destIndexLocal _ destIndexLocal + 4. "This central horizontal loop requires no store masking" destMask _ AllOnes. combinationRule = 3 ifTrue: ["Special inner loop for STORE" destWord _ halftoneWord. 2 to: nWordsMinusOne do: [:word | self dstLongAt: destIndexLocal put: destWord. destIndexLocal _ destIndexLocal + 4]] ifFalse: ["Normal inner loop does merge" 2 to: nWordsMinusOne do: [:word | "Normal inner loop does merge" destWord _ self dstLongAt: destIndexLocal. mergeWord _ self mergeFn: halftoneWord with: destWord. self dstLongAt: destIndexLocal put: mergeWord. destIndexLocal _ destIndexLocal + 4]]. "This last section, if used, requires masking of the destination store..." nWords > 1 ifTrue: [destMask _ mask2. destWord _ self dstLongAt: destIndexLocal. mergeWord _ self mergeFn: halftoneWord with: destWord. destWord _ (destMask bitAnd: mergeWord) bitOr: (destWord bitAnd: destMask bitInvert32). self dstLongAt: destIndexLocal put: destWord. destIndexLocal _ destIndexLocal + 4]. destIndexLocal _ destIndexLocal + destDelta]! ! |
|
From: John M M. <jo...@us...> - 2003-10-04 04:45:55
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets In directory sc8-pr-cvs1:/tmp/cvs-serv30463/squeak/platforms/Mac OS/vm/specialChangeSets Added Files: FasterCopyLoop-JMM.4.cs Log Message: 3.6.0b2 additional changesets for Mac VM performance reasons |
|
From: John M M. <jo...@us...> - 2003-10-04 04:45:35
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets In directory sc8-pr-cvs1:/tmp/cvs-serv30441/squeak/platforms/Mac OS/vm/specialChangeSets Added Files: ArraysToGlobalStruct-JMM.1.cs Log Message: 3.6.0b2 additional changesets for Mac VM performance reasons --- NEW FILE: ArraysToGlobalStruct-JMM.1.cs --- 'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 8 August 2003 at 7:48:15 pm'! !CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 8/8/2003 19:08'! placeInStructure: var "See if we should put this array into a structure This has hard coded vars, should go somewhere else!! The variables listed are hardcoded as C in the interpreter thus they don't get resolved via TVariableNode logic Also Lets ignore variables that have special definitions that require initialization, and the function def which has problems" | check | check _ variableDeclarations at: var ifAbsent: ['']. (check includes: $=) ifTrue: [^false]. (check includes: $() ifTrue: [^false]. (#( 'showSurfaceFn' 'memory' 'extraVMMemory' 'interpreterProxy') includes: var) ifTrue: [^false]. ^true. ! ! |
|
From: John M M. <jo...@us...> - 2003-10-03 19:07:47
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer In directory sc8-pr-cvs1:/tmp/cvs-serv18720/squeak/platforms/Mac OS/vm/Developer Modified Files: SqueakVMForCarbon.pbproj.sit Log Message: 3.5.3b1 project update (hopefully includes logic to build browser plugin) Index: SqueakVMForCarbon.pbproj.sit =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer/SqueakVMForCarbon.pbproj.sit,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvswp8sPg and /tmp/cvsqsd3ln differ |
|
From: John M M. <jo...@us...> - 2003-10-03 19:07:11
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Documentation In directory sc8-pr-cvs1:/tmp/cvs-serv18625/squeak/platforms/Mac OS/vm/Documentation Modified Files: 3.5.2 Release Notes.rtf Log Message: 3.5.2b6 update notes Index: 3.5.2 Release Notes.rtf =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/Documentation/3.5.2 Release Notes.rtf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 3.5.2 Release Notes.rtf 31 Jul 2003 13:08:09 -0000 1.2 --- 3.5.2 Release Notes.rtf 3 Oct 2003 19:07:07 -0000 1.3 *************** *** 21,24 **** --- 21,44 ---- 3.5.0b4 seems a fine VM, from what people tell me, but now we've 3.5.2...\ \ + 3.5.3b1 (browser plugin)\ + Fixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\ + \ + 3.5.2b6\ + Fixed issues with plugin discovery for netscape plugin \ + 3.5.2b5\ + Fixed primitive dispatch to use gnuified jump table. \ + \ + 3.5.2b4 \ + Fix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\ + For os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\ + For system attribute 1003 return powerpc versus PowerPC to match unix VM\ + Start timers later in the VM startup logic, after reading the image, versus before.\ + sqMacNSPlugin.c - Look for Squeak folder in User, local, Network, System domains versus just User.\ + sqMacTime.c - Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\ + sqMacUIEvents.c - Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\ + sqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\ + BitBltPlugin.c - alphaSourceBlendBits16 Use table lookup which is 90% faster\ + - copyLoopNoSource, roll constants into register versus recalculating.\ + \ 3.5.2b2 \ Fix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\ |
|
From: John M M. <jo...@us...> - 2003-10-03 19:06:31
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv18504/squeak/platforms/Mac OS/vm
Modified Files:
sqMacMain.c
Log Message:
3.6.0.b2 Ensure aioInit gets called for browser plugin logic
Index: sqMacMain.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacMain.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** sqMacMain.c 2 Sep 2003 17:51:05 -0000 1.17
--- sqMacMain.c 3 Oct 2003 19:06:27 -0000 1.18
***************
*** 306,309 ****
--- 306,310 ----
OSErr err;
+ aioInit();
gThreadManager = false;
pthread_mutex_init(&gEventQueueLock, NULL);
|
|
From: John M M. <jo...@us...> - 2003-10-03 19:06:18
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm In directory sc8-pr-cvs1:/tmp/cvs-serv18455/squeak/platforms/Mac OS/vm Modified Files: sqMacWindow.c Log Message: 3.5.2b6 #def change for browser carbon compile Index: sqMacWindow.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacWindow.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** sqMacWindow.c 31 Jul 2003 13:03:20 -0000 1.24 --- sqMacWindow.c 3 Oct 2003 19:06:12 -0000 1.25 *************** *** 551,555 **** ! #if !I_AM_CARBON_EVENT || BROWSERPLUGIN #define rectWidth(aRect) ((aRect).right - (aRect).left) #define rectHeight(aRect) ((aRect).bottom - (aRect).top) --- 551,555 ---- ! #if !I_AM_CARBON_EVENT || defined(BROWSERPLUGIN) #define rectWidth(aRect) ((aRect).right - (aRect).left) #define rectHeight(aRect) ((aRect).bottom - (aRect).top) |
|
From: John M M. <jo...@us...> - 2003-10-03 19:05:22
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm In directory sc8-pr-cvs1:/tmp/cvs-serv18295/squeak/platforms/Mac OS/vm Modified Files: sqMacUIEvents.c Log Message: 3.6.0.b2 #def change for carbon compile for browser Index: sqMacUIEvents.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacUIEvents.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** sqMacUIEvents.c 2 Sep 2003 17:52:47 -0000 1.17 --- sqMacUIEvents.c 3 Oct 2003 19:05:19 -0000 1.18 *************** *** 137,141 **** Boolean IsKeyDown(void); ! #if !defined(I_AM_CARBON_EVENT) || BROWSERPLUGIN int HandleEvents(void); void HandleMenu(int mSelect); --- 137,141 ---- Boolean IsKeyDown(void); ! #if !defined(I_AM_CARBON_EVENT) || defined(BROWSERPLUGIN) int HandleEvents(void); void HandleMenu(int mSelect); |
|
From: John M M. <jo...@us...> - 2003-10-03 19:04:24
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv18127/squeak/platforms/Mac OS/vm
Modified Files:
sqMacTime.c
Log Message:
3.5.2b6 Nope: see comment below. This works ok on linux because thread time is long, so crummy delay timing anyways. Bad for os-x results in 10ms delay errors. Now set aioPoll(0), then relay on olde pthread_cond_timedwiait... logic
Use of aioPoll() logic. This drops the original usage of pthread_cond_timedwait_relative_np(). Will await user feedback if this change is a good thing with relationship to CPU usage.
Index: sqMacTime.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacTime.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** sqMacTime.c 20 Jun 2003 01:51:34 -0000 1.10
--- sqMacTime.c 3 Oct 2003 19:04:18 -0000 1.11
***************
*** 259,270 ****
realTimeToWait = getNextWakeupTick() - now;
! aioPoll(realTimeToWait*1000);
! /* tspec.tv_sec= realTimeToWait / 1000;
tspec.tv_nsec= (realTimeToWait % 1000)*1000000;
err = pthread_mutex_lock(&gSleepLock);
err = pthread_cond_timedwait_relative_np(&gSleepLockCondition,&gSleepLock,&tspec);
! err = pthread_mutex_unlock(&gSleepLock); */
--- 259,270 ----
realTimeToWait = getNextWakeupTick() - now;
! aioPoll(0);
! tspec.tv_sec= realTimeToWait / 1000;
tspec.tv_nsec= (realTimeToWait % 1000)*1000000;
err = pthread_mutex_lock(&gSleepLock);
err = pthread_cond_timedwait_relative_np(&gSleepLockCondition,&gSleepLock,&tspec);
! err = pthread_mutex_unlock(&gSleepLock);
|
|
From: John M M. <jo...@us...> - 2003-10-03 19:02:10
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv17699/squeak/platforms/Mac OS/vm
Modified Files:
sqMacNSPlugin.c
Log Message:
3.5.3b1 lock/unlock drawing only when browser gives us event time to avoid crash or draw failure in un-thread-safe IE. Rework how path to libraries are found, use network/system/user directories. Fix issue with disposal of memory on free, bug prevented that from happening.
Index: sqMacNSPlugin.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacNSPlugin.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** sqMacNSPlugin.c 31 Jul 2003 13:22:47 -0000 1.11
--- sqMacNSPlugin.c 3 Oct 2003 19:02:06 -0000 1.12
***************
*** 236,239 ****
--- 236,240 ----
int FindIdleURLRequest(void);
int InitFilePaths(void);
+ int InitFilePathsViaDomain(SInt16 domain);
void InitURLRequestTable(void);
int IsPrefixedBy(char *s, char *prefix);
***************
*** 252,255 ****
--- 253,257 ----
int URLPostCreate(char *url, char *buffer, char * window,int semaIndex);
NP_Port *getNP_Port(void);
+ void waitAFewMilliseconds(void);
/*** Initialize/Shutdown ***/
***************
*** 299,302 ****
--- 301,307 ----
void NPP_Shutdown(void) {
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_unlock(&gEventDrawLock);
+ #endif
ExitCleanup();
}
***************
*** 364,375 ****
long i;
ExitCleanup();
- if (pluginArgCount != 0) {
- for(i=0;i<pluginArgCount;i++) {
- NPN_MemFree(pluginArgName[i]);
- NPN_MemFree(pluginArgValue[i]);
- }
- pluginArgCount = 0;
- }
return NPERR_NO_ERROR;
}
--- 369,376 ----
long i;
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_unlock(&gEventDrawLock);
+ #endif
ExitCleanup();
return NPERR_NO_ERROR;
}
***************
*** 416,419 ****
--- 417,423 ----
gThreadManager = true;
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_lock(&gEventDrawLock);
+ #endif
err = createNewThread();
if (err != noErr)
***************
*** 582,585 ****
--- 586,593 ----
Boolean rememberWindowOnce=true;
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_unlock(&gEventDrawLock);
+ #endif
+
if (rememberWindowOnce) { //Remember who the front window is
rememberWindowOnce = false;
***************
*** 691,694 ****
--- 699,705 ----
if (ignoreFirstEvent && getFullScreenFlag()) {
ignoreFirstEvent = false;
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_lock(&gEventDrawLock);
+ #endif
return true;
}
***************
*** 700,703 ****
--- 711,718 ----
} while (getFullScreenFlag());
+
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_lock(&gEventDrawLock);
+ #endif
return true;
}
***************
*** 1072,1076 ****
oldStWindow = stWindow;
#if TARGET_API_MAC_CARBON
! GetWindowGreatestAreaDevice((GrafPtr) FrontWindow(),kWindowContentRgn,&dominantGDevice,&windRect);
#else
dominantGDevice = getDominateDevice(stWindow,&windRect);
--- 1087,1091 ----
oldStWindow = stWindow;
#if TARGET_API_MAC_CARBON
! GetWindowGreatestAreaDevice((WindowPtr) FrontWindow(),kWindowContentRgn,&dominantGDevice,&windRect);
#else
dominantGDevice = getDominateDevice(stWindow,&windRect);
***************
*** 1122,1126 ****
/*** File and Access Paths ***/
! int InitFilePaths(void) {
short vRefNum;
char imageInPreferenceFolder[256];
--- 1137,1141 ----
/*** File and Access Paths ***/
! int InitFilePathsViaDomain(SInt16 domain) {
short vRefNum;
char imageInPreferenceFolder[256];
***************
*** 1135,1141 ****
/* get the path to the sytem folder preference area*/
! err = FindFolder(kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder, &vRefNum, &dirID);
if (err != noErr) {
- strcpy(imageName,"Problems finding the System Preference folder");
return err;
}
--- 1150,1155 ----
/* get the path to the sytem folder preference area*/
! err = FindFolder(domain, kPreferencesFolderType, kDontCreateFolder, &vRefNum, &dirID);
if (err != noErr) {
return err;
}
***************
*** 1154,1160 ****
strcpy(imageName, vmPath);
strcat(imageName, shortImageName);
}
!
int IsPrefixedBy(char *s, char *prefix) {
--- 1168,1187 ----
strcpy(imageName, vmPath);
strcat(imageName, shortImageName);
+ return noErr;
}
! int InitFilePaths() {
! static const SInt16 domain[] = {kOnSystemDisk,kUserDomain, kLocalDomain, kNetworkDomain, kSystemDomain, 0};
! int error;
! SInt32 domainIndex=0;
!
! do {
! error = InitFilePathsViaDomain(domain[domainIndex]);
! if (error == noErr)
! return noErr;
! domainIndex++;
! } while (domain[domainIndex] != 0);
! return error;
! }
int IsPrefixedBy(char *s, char *prefix) {
***************
*** 1586,1589 ****
--- 1613,1623 ----
plugInShutdown();
ioSetFullScreenRestore();
+ if (pluginArgCount != 0) {
+ for(i=0;i<pluginArgCount;i++) {
+ NPN_MemFree(pluginArgName[i]);
+ NPN_MemFree(pluginArgValue[i]);
+ }
+ pluginArgCount = 0;
+ }
NPP_Initialize(); /* reset local variables */
ignoreFirstEvent=false;
***************
*** 1675,1676 ****
--- 1709,1735 ----
return !CaseInsensitiveMatch(lookFor,"file:");
}
+
+ #if defined ( __APPLE__ ) && defined ( __MACH__ )
+ pthread_mutex_t sleepLock;
+ pthread_cond_t sleepLockCondition;
+ void waitAFewMilliseconds()
+ {
+ static Boolean doInitialization=true;
+ const int realTimeToWait = 16;
+ struct timespec tspec;
+ int err;
+
+ if (doInitialization) {
+ doInitialization = false;
+ pthread_mutex_init(&sleepLock, NULL);
+ pthread_cond_init(&sleepLockCondition,NULL);
+ }
+
+ tspec.tv_sec= realTimeToWait / 1000;
+ tspec.tv_nsec= (realTimeToWait % 1000)*1000000;
+
+ err = pthread_mutex_lock(&sleepLock);
+ err = pthread_cond_timedwait_relative_np(&sleepLockCondition,&sleepLock,&tspec);
+ err = pthread_mutex_unlock(&sleepLock);
+ }
+ #endif
\ No newline at end of file
|
|
From: John M M. <jo...@us...> - 2003-10-03 18:59:12
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv16974/squeak/platforms/Mac OS/vm
Modified Files:
sqMacExternalPrims.c
Log Message:
3.5.2b6 Rework path name creation for browser plugin logic. It's busted in os-x, use different method to avoid os-x bug.
Index: sqMacExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacExternalPrims.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqMacExternalPrims.c 19 May 2003 07:19:49 -0000 1.4
--- sqMacExternalPrims.c 3 Oct 2003 18:59:08 -0000 1.5
***************
*** 11,14 ****
--- 11,15 ----
* NOTES:
* Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments
+ * Oct 2nd, 2003, JMM bug in browser file name creation in os-x, rework how path is resolved
*****************************************************************************/
***************
*** 19,22 ****
--- 20,24 ----
extern char vmPath[];
CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath);
+ void createBrowserPluginPath(char *pluginDirPath);
/*** Mac Specific External Primitive Support ***/
***************
*** 38,42 ****
#ifdef BROWSERPLUGIN
! strcat(pluginDirPath, ":Plugins");
#else
strcat(pluginDirPath, "Plugins");
--- 40,44 ----
#ifdef BROWSERPLUGIN
! createBrowserPluginPath(pluginDirPath);
#else
strcat(pluginDirPath, "Plugins");
***************
*** 308,310 ****
return libHandle;
}
! #endif
\ No newline at end of file
--- 310,330 ----
return libHandle;
}
! #endif
!
! void createBrowserPluginPath(char *pluginDirPath) {
! int lengthOfPath = strlen(pluginDirPath);
! int i;
!
! lengthOfPath--;
! pluginDirPath[lengthOfPath] = 0x00;
!
! for (i=lengthOfPath;i>=0;i--) {
! if (pluginDirPath[i] == ':') {
! pluginDirPath[i] = 0x00;
! strcat(pluginDirPath, ":Plugins");
! return;
! }
! }
! /* shouldn't ever get here, path will always contain one : */
! }
!
|
|
From: John M M. <jo...@us...> - 2003-10-03 18:57:53
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer In directory sc8-pr-cvs1:/tmp/cvs-serv16710/squeak/platforms/Mac OS/vm/Developer Modified Files: NPSqueakStub.sit Log Message: 3.5.3bC1 project updated for version information Index: NPSqueakStub.sit =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer/NPSqueakStub.sit,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs1XkYXo and /tmp/cvsMEtMHD differ |
|
From: John M M. <jo...@us...> - 2003-10-03 18:56:33
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/Developer In directory sc8-pr-cvs1:/tmp/cvs-serv16454/squeak/platforms/Mac OS/vm/Developer Added Files: NPSqueakStub.c Log Message: 3.5.1bC1 source for plugin CFM-Mach-O stub --- NEW FILE: NPSqueakStub.c --- // Stub to call mach-o plugin for better project builder debugging. // By John M McIntosh Jan 2003. (jo...@sm...) // Released under the Squeak-L license // http://www.squeak.org/download/license.html // V1.0 January 2003. // V 1.1 Sept 2003 Add looking in user/local/network/system domains #include "npapi.h" #include "npupp.h" #define EnterCodeResource() #define ExitCodeResource() #define __destroy_global_chain() #define __InitCode__() int printOnOSXPascal(unsigned char * string); int printOnOSX(char * string); int printOnOSXNumber(int number); int printOnOSXPascal(unsigned char * string); int printOnOSXFormat(char * string,char *format); OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr); CFragConnectionID LoadLibViaPath(char *libName); CFragConnectionID LoadLibViaPathInDomain(char *libName, SInt16 domain); int ioFindExternalFunctionIn(char *lookupName, int moduleHandle); int ioFreeModule(int moduleHandle); NPError Private_Initialize(void); void Private_Shutdown(void); NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); NPError Private_Destroy(NPP instance, NPSavedData** save); NPError Private_SetWindow(NPP instance, NPWindow* window); NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason); int32 Private_WriteReady(NPP instance, NPStream* stream); int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname); void Private_Print(NPP instance, NPPrint* platformPrint); int16 Private_HandleEvent(NPP instance, void* event); void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); jref Private_GetJavaClass(void); typedef short (*GetMainPtr)(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp); // Mach-O function GetMainPtr GetMain = NULL; typedef NPError (*GetPrivate_InitializePtr)(); // Mach-O function GetPrivate_InitializePtr GetPrivate_Initialize = NULL; typedef void (*GetPrivate_ShutdownPtr)(); // Mach-O function GetPrivate_ShutdownPtr GetPrivate_Shutdown = NULL; typedef NPError (*GetPrivate_NewPtr)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); // Mach-O function GetPrivate_NewPtr GetPrivate_New = NULL; typedef NPError (*GetPrivate_DestroyPtr)(NPP instance, NPSavedData** save); // Mach-O function GetPrivate_DestroyPtr GetPrivate_Destroy = NULL; typedef NPError (*GetPrivate_SetWindowPtr)(NPP instance, NPWindow* window); // Mach-O function GetPrivate_SetWindowPtr GetPrivate_SetWindow = NULL; typedef NPError (*GetPrivate_NewStreamPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); // Mach-O function GetPrivate_NewStreamPtr GetPrivate_NewStream = NULL; typedef int32 (*GetPrivate_WriteReadyPtr)(NPP instance, NPStream* stream); // Mach-O function GetPrivate_WriteReadyPtr GetPrivate_WriteReady = NULL; typedef int32 (*GetPrivate_WritePtr)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); // Mach-O function GetPrivate_WritePtr GetPrivate_Write = NULL; typedef void (*GetPrivate_StreamAsFilePtr)(NPP instance, NPStream* stream, const char* fname); // Mach-O function GetPrivate_StreamAsFilePtr GetPrivate_StreamAsFile = NULL; typedef NPError (*GetPrivate_DestroyStreamPtr)(NPP instance, NPStream* stream, NPError reason); // Mach-O function GetPrivate_DestroyStreamPtr GetPrivate_DestroyStream = NULL; typedef int16 (*GetPrivate_HandleEventPtr)(NPP instance, void* event); // Mach-O function GetPrivate_HandleEventPtr GetPrivate_HandleEvent = NULL; typedef void (*GetPrivate_PrintPtr)(NPP instance, NPPrint* platformPrint); // Mach-O function GetPrivate_PrintPtr GetPrivate_Print = NULL; typedef void (*GetPrivate_URLNotifyPtr)(NPP instance, const char* url, NPReason reason, void* notifyData); // Mach-O function GetPrivate_URLNotifyPtr GetPrivate_URLNotify = NULL; typedef jref (*GetPrivate_GetJavaClassPtr)(void); // Mach-O function GetPrivate_GetJavaClassPtr GetPrivate_GetJavaClass = NULL; static CFragConnectionID gWhere; NPNetscapeFuncs gRememberOldgNetscapeFuncsForSafariIssue; NPPluginFuncs gDummyPluginFuncsForSafariIssue; NPP_ShutdownUPP gDummyUnloadUppForSafariIssue; int main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp) { int err=noErr; int navMinorVers = nsTable->version & 0xFF; gRememberOldgNetscapeFuncsForSafariIssue = *nsTable; gWhere = LoadLibViaPath("NPSqueak.bundle"); if (gWhere == nil) return -1; GetMain = (void *) ioFindExternalFunctionIn("npmain",(int) gWhere); if (GetMain == NULL) GetMain = (void *) ioFindExternalFunctionIn("main",(int) gWhere); err = GetMain(nsTable, pluginFuncs, unloadUpp); // // Set up the plugin function table that Netscape will use to // call us. Netscape needs to know about our version and size // and have a UniversalProcPointer for every function we implement. // pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginFuncs->size = sizeof(NPPluginFuncs); pluginFuncs->newp = NewNPP_NewProc(Private_New); pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); pluginFuncs->write = NewNPP_WriteProc(Private_Write); pluginFuncs->print = NewNPP_PrintProc(Private_Print); pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) { pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); } if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) { pluginFuncs->javaClass = (JRIGlobalRef) Private_GetJavaClass(); } *unloadUpp = NewNPP_ShutdownProc(Private_Shutdown); return err; } NPError Private_Initialize(void) { NPError err; if (GetPrivate_Initialize == NULL) GetPrivate_Initialize = (void *) ioFindExternalFunctionIn("Private_Initialize",(int) gWhere); err = GetPrivate_Initialize(); return err; } void Private_Shutdown(void) { if (gWhere == NULL) return; if (GetPrivate_Shutdown == NULL) GetPrivate_Shutdown = (void *) ioFindExternalFunctionIn("Private_Shutdown",(int) gWhere); if (GetPrivate_Shutdown == NULL) return; GetPrivate_Shutdown(); ioFreeModule((int) gWhere); gWhere = 0; GetPrivate_Initialize = 0; GetPrivate_Shutdown = 0; GetPrivate_New = 0; GetPrivate_Destroy= 0; GetPrivate_SetWindow= 0; GetPrivate_NewStream= 0; GetPrivate_WriteReady= 0; GetPrivate_Write = 0; GetPrivate_StreamAsFile = 0; GetPrivate_DestroyStream = 0; GetPrivate_HandleEvent = 0; GetPrivate_Print = 0; GetPrivate_URLNotify = 0; GetPrivate_GetJavaClass = 0; } NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) { NPError err; if (gWhere == nil) { gWhere = LoadLibViaPath("NPSqueak.bundle"); if (gWhere == nil) return -1; GetMain = (void *) ioFindExternalFunctionIn("npmain",(int) gWhere); if (GetMain == NULL) GetMain = (void *) ioFindExternalFunctionIn("main",(int) gWhere); err = GetMain(&gRememberOldgNetscapeFuncsForSafariIssue, &gDummyPluginFuncsForSafariIssue, &gDummyUnloadUppForSafariIssue); } if (GetPrivate_New == NULL) GetPrivate_New = (void *) ioFindExternalFunctionIn("Private_New",(int) gWhere); if (GetPrivate_New != NULL) err = GetPrivate_New( pluginType, instance, mode, argc, argn, argv, saved); return err; } NPError Private_Destroy(NPP instance, NPSavedData** save) { NPError err; if (GetPrivate_Destroy == NULL) GetPrivate_Destroy = (void *) ioFindExternalFunctionIn("Private_Destroy",(int) gWhere); if (GetPrivate_Destroy != NULL) err = GetPrivate_Destroy( instance, save); Private_Shutdown(); return NPERR_NO_ERROR; } NPError Private_SetWindow(NPP instance, NPWindow* window) { NPError err; if (GetPrivate_SetWindow == NULL) GetPrivate_SetWindow = (void *) ioFindExternalFunctionIn("Private_SetWindow",(int) gWhere); if (GetPrivate_SetWindow != NULL) err = GetPrivate_SetWindow( instance, window); return err; } NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype) { NPError err; if (GetPrivate_NewStream == NULL) GetPrivate_NewStream = (void *) ioFindExternalFunctionIn("Private_NewStream",(int) gWhere); if (GetPrivate_NewStream != NULL) err = GetPrivate_NewStream( instance, type, stream, seekable, stype); return err; } int32 Private_WriteReady(NPP instance, NPStream* stream) { int32 length; if (GetPrivate_WriteReady == NULL) GetPrivate_WriteReady = (void *) ioFindExternalFunctionIn("Private_WriteReady",(int) gWhere); if (GetPrivate_WriteReady != NULL) length = GetPrivate_WriteReady( instance, stream); return length; } int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer) { int32 length; if (GetPrivate_Write == NULL) GetPrivate_Write = (void *) ioFindExternalFunctionIn("Private_Write",(int) gWhere); if (GetPrivate_Write != NULL) length = GetPrivate_Write( instance, stream, offset, len, buffer); return length; } void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname) { if (GetPrivate_StreamAsFile == NULL) GetPrivate_StreamAsFile = (void *) ioFindExternalFunctionIn("Private_StreamAsFile",(int) gWhere); if (GetPrivate_StreamAsFile != NULL) GetPrivate_StreamAsFile( instance, stream, fname); } NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason) { NPError err; if (GetPrivate_DestroyStream == NULL) GetPrivate_DestroyStream = (void *) ioFindExternalFunctionIn("Private_DestroyStream",(int) gWhere); if (GetPrivate_DestroyStream != NULL) err = GetPrivate_DestroyStream( instance, stream, reason); return err; } int16 Private_HandleEvent(NPP instance, void* event) { int16 err; if (GetPrivate_HandleEvent == NULL) GetPrivate_HandleEvent = (void *) ioFindExternalFunctionIn("Private_HandleEvent",(int) gWhere); if (GetPrivate_HandleEvent != NULL) err = GetPrivate_HandleEvent( instance, event); return err; } void Private_Print(NPP instance, NPPrint* platformPrint) { if (GetPrivate_Print == NULL) GetPrivate_Print = (void *) ioFindExternalFunctionIn("Private_Print",(int) gWhere); if (GetPrivate_Print != NULL) GetPrivate_Print( instance, platformPrint); } void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) { if (GetPrivate_URLNotify == NULL) GetPrivate_URLNotify = (void *) ioFindExternalFunctionIn("Private_URLNotify",(int) gWhere); if (GetPrivate_URLNotify != NULL) GetPrivate_URLNotify( instance, url, reason, notifyData); } jref Private_GetJavaClass(void) { if (GetPrivate_GetJavaClass == NULL) GetPrivate_GetJavaClass = (void *) ioFindExternalFunctionIn("Private_GetJavaClass",(int) gWhere); if (GetPrivate_GetJavaClass != NULL) return GetPrivate_GetJavaClass(); } static void* FP2TV (void * fp ) { void **newGlue = NULL ; if ( fp != NULL ) { newGlue = (void**) malloc (2 * sizeof(void *)); if (newGlue != NULL ) { newGlue[0] = fp ; newGlue[1] = NULL ; } } return newGlue; } int ioFindExternalFunctionIn(char *lookupName, int moduleHandle) { void * functionPtr = 0; CFStringRef theString; if (!moduleHandle) return nil; //printOnOSX(lookupName); theString = CFStringCreateWithCString(kCFAllocatorDefault,lookupName,kCFStringEncodingMacRoman); if (theString == nil) return nil; functionPtr = (void*)CFBundleGetFunctionPointerForName((CFBundleRef) moduleHandle,theString); CFRelease(theString); return (int) functionPtr; } /* ioFreeModule: Free the module with the associated handle. WARNING: never primitiveFail() within, just return 0. */ int ioFreeModule(int moduleHandle) { if (!moduleHandle) return 0; CFBundleUnloadExecutable((CFBundleRef) moduleHandle); CFRelease((CFBundleRef) moduleHandle); return 0; } CFragConnectionID LoadLibViaPathInDomain(char *libName,SInt16 domain) { CFragConnectionID libHandle = 0; CFURLRef theURLRef; CFBundleRef theBundle; OSStatus err; CFStringRef libNameCFString; FSRef frameworksFolderRef; CFURLRef baseURL; err = FSFindFolder(domain, kInternetPlugInFolderType, false,&frameworksFolderRef); if (err != noErr) { return nil; } baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault,&frameworksFolderRef); if (baseURL == nil) { return nil; } libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,kCFStringEncodingMacRoman); if (libNameCFString == nil) { CFRelease(baseURL); return nil; } theURLRef = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL,libNameCFString, false); CFRelease(libNameCFString); CFRelease(baseURL); if (theURLRef == nil) { return nil; } theBundle = CFBundleCreate(kCFAllocatorSystemDefault,theURLRef); CFRelease(theURLRef); if (theBundle == nil) { return nil; } if (!CFBundleLoadExecutable(theBundle)) { CFRelease(theBundle); return nil; } libHandle = (CFragConnectionID) theBundle; return libHandle; } CFragConnectionID LoadLibViaPath(char *libName) { static const SInt16 domain[] = {kUserDomain, kLocalDomain, kNetworkDomain, kSystemDomain, 0}; CFragConnectionID connectionID; SInt32 domainIndex=0; do { connectionID = LoadLibViaPathInDomain(libName,domain[domainIndex]); if (connectionID != nil) return connectionID; domainIndex++; } while (domain[domainIndex] != 0); return nil; } OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) { OSStatus err; FSRef frameworksFolderRef; CFURLRef baseURL; CFURLRef bundleURL; if ( bundlePtr == nil ) return( -1 ); *bundlePtr = nil; baseURL = nil; bundleURL = nil; err = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true, &frameworksFolderRef); if (err == noErr) { baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef); if (baseURL == nil) { err = coreFoundationUnknownErr; } } if (err == noErr) { bundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false); if (bundleURL == nil) { err = coreFoundationUnknownErr; } } if (err == noErr) { *bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL); if (*bundlePtr == nil) { err = coreFoundationUnknownErr; } } if (err == noErr) { if ( ! CFBundleLoadExecutable( *bundlePtr ) ) { err = coreFoundationUnknownErr; } } // Clean up. if (err != noErr && *bundlePtr != nil) { CFRelease(*bundlePtr); *bundlePtr = nil; } if (bundleURL != nil) { CFRelease(bundleURL); } if (baseURL != nil) { CFRelease(baseURL); } return err; } int printOnOSXFormat(char * string,char *format) { CFBundleRef bundle; int(*fprintf_ptr)(FILE *stream, const char *format, ...) = NULL; int(*fcnFlush_ptr)(FILE *stream) = NULL; void* fcn_ptr = NULL; void* fcnFlushx_ptr = NULL; OSErr err; FILE* stderr_ptr = NULL; void* __sf_ptr = NULL; err = LoadFrameworkBundle( CFSTR("System.framework"), &bundle ); fcn_ptr = CFBundleGetFunctionPointerForName(bundle, CFSTR("fprintf")); fcnFlushx_ptr = CFBundleGetFunctionPointerForName(bundle, CFSTR("fflush")); __sf_ptr = CFBundleGetDataPointerForName(bundle, CFSTR("__sF")); if(fcn_ptr) { /* cast it */ fprintf_ptr = ( int(*)(FILE *stream, const char *format, ...) ) fcn_ptr; } else { /* it failed, handle that somehow */ return; } if(fcnFlushx_ptr) { /* cast it */ fcnFlush_ptr = ( int(*)(FILE *stream) ) fcnFlushx_ptr; } else { /* it failed, handle that somehow */ return; } if(__sf_ptr) { stderr_ptr = (FILE*) ( ((char*)__sf_ptr) + 176); /* 176 = 88*2, where 88=sizeof(FILE) under BSD */ } else { /* it failed */ return; } fprintf_ptr(stderr_ptr, format,string); fcnFlush_ptr(stderr_ptr); } int printOnOSX(char * string) { return printOnOSXFormat(string,"\n+-+%s"); } int printOnOSXNumber(int number) { return printOnOSXFormat((char *) number,"\n+-+%d"); } int printOnOSXPascal(unsigned char *string) { CopyPascalStringToC((ConstStr255Param) string,(char*) string); printOnOSX((char*) string); CopyCStringToPascal((char*)string,(void *) string); } |
|
From: John M M. <jo...@us...> - 2003-10-03 18:55:30
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm/specialChangeSets
In directory sc8-pr-cvs1:/tmp/cvs-serv16201/squeak/platforms/Mac OS/vm/specialChangeSets
Added Files:
Gnuifier.5.cs
Log Message:
3.5.2b6 Added, fixed gnuifier issue in primitive dispatch
--- NEW FILE: Gnuifier.5.cs ---
'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 12 August 2003 at 10:40:14 pm'!
"Change Set: Gnuifier
Date: 1 January 2002
Author: acg
Some code to automate building a VM under GCC. To run, fileIn and execute:
(Gnuifier on: aFileDirectory) gnuify
For example, try something like the following:
(Gnuifier on:
((FileDirectory default
directoryNamed: 'src')
directoryNamed: 'vm') pathName) gnuify
"!
Object subclass: #Gnuifier
instanceVariableNames: 'directory '
classVariableNames: ''
poolDictionaries: ''
category: 'VMConstruction-Building'!
!Gnuifier commentStamp: '<historical>' prior: 0!
My instances automate the translation of a Squeak interpreter for use with GCC. In the specified FileDirectory, I copy 'interp.c' to 'interp.c.old'; translate a gnuified interpreter back into 'interp.c'; and save a working copy of sqGnu.h.
To gnuify an interpreter, try something like one of the following:
(Gnuifier on:
((FileDirectory default
directoryNamed: 'src')
directoryNamed: 'vm') pathName) gnuify
(Gnuifier on:
'powercow X:Users:werdna:Desktop:squeak:Squeak3.2a-4599 Folder:src:vm') gnuify
Structure:
directory FileDirectory -- specifying where I should do my gnuification
I can attempt to undo my damage with #deGnuify.!
!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:16'!
copyFrom: inFileStream to: outFileStream
"convert interp.c to use GNU features"
| inData |
Cursor read showWhile:
[inData := inFileStream upToEnd withSqueakLineEndings].
Cursor write showWhile:
[outFileStream nextPutAll: inData].
outFileStream close! !
!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 1/1/2002 10:10'!
deGnuify
(directory fileExists: 'interp.c.old')
ifFalse: [^Error signal: 'Cannot deGnuify. The old "interp.c" was not found.'].
(directory fileExists: 'interp.c')
ifTrue: [directory deleteFileNamed: 'interp.c'].
self
copyFrom: (directory oldFileNamed: 'interp.c.old')
to: (directory newFileNamed: 'interp.c').
(directory fileExists: 'sqGnu.h')
ifTrue: [directory deleteFileNamed: 'sqGnu.h'].
directory deleteFileNamed: 'interp.c.old'! !
!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 8/6/2002 13:52'!
gnuify
(directory fileExists: 'interp.c.old') ifTrue:
[(PopUpMenu
confirm: 'Interpreter probably guified (interp.c.old exists).
Do you want to gnuify anyway?') ifFalse: [^nil].
directory deleteFileNamed: 'interp.c.old'].
self
copyFrom: (directory oldFileNamed: 'interp.c')
to: (directory newFileNamed: 'interp.c.old').
directory deleteFileNamed: 'interp.c'.
self
gnuifyFrom:(directory oldFileNamed: 'interp.c.old')
to: (directory newFileNamed: 'interp.c').
! !
!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 8/12/2003 22:39'!
gnuifyFrom: inFileStream to: outFileStream
"convert interp.c to use GNU features"
| inData beforeInterpret inInterpret inInterpretVars beforePrimitiveResponse inPrimitiveResponse |
Cursor read showWhile:
[inData := inFileStream upToEnd withSqueakLineEndings.
inFileStream close].
Cursor write showWhile:
["print a header"
outFileStream
nextPutAll: '/* This file has been post-processed for GNU C */';
cr; cr; cr.
beforeInterpret := true. "whether we are before the beginning of interpret()"
inInterpret := false. "whether we are in the middle of interpret"
inInterpretVars := false. "whether we are in the variables of interpret"
beforePrimitiveResponse := true. "whether we are before the beginning of primitiveResponse()"
inPrimitiveResponse := false. "whether we are inside of primitiveResponse"
inData linesDo: [ :inLine |
| outLine extraOutLine |
outLine := inLine. "print out one line for each input line; by default, print out the line that was input, but some rules modify it"
extraOutLine := nil. "occasionally print a second output line..."
beforeInterpret ifTrue: [
(inLine findString: 'inline:') > 0 ifTrue: [
"oops!!!!"
outFileStream nextPutAll: '#error interp was not inlined, so cannot be gnuified'.
Smalltalk snapshot: false andQuit: true. ].
(inLine = '#include "sq.h"') ifTrue: [
outLine := '#include "sqGnu.h"'. ].
(inLine = 'int interpret(void) {') ifTrue: [
"reached the beginning of interpret"
beforeInterpret := false.
inInterpret := true.
inInterpretVars := true. ] ]
ifFalse: [
inInterpretVars ifTrue: [
(inLine findString: 'register struct foo * foo = &fum;') > 0 ifTrue: [
outLine := '#ifdef FOO_REG
register struct foo * foo FOO_REG = &fum;
#endif' ].
(inLine findString: ' localIP;') > 0 ifTrue: [
outLine := ' register char* localIP IP_REG;' ].
(inLine findString: ' localSP;') > 0 ifTrue: [
outLine := ' register char* localSP SP_REG;'. ].
(inLine findString: ' currentBytecode;') > 0 ifTrue: [
outLine := ' register int currentBytecode CB_REG;' ].
inLine isEmpty ifTrue: [
"reached end of variables"
inInterpretVars := false.
outLine := ' JUMP_TABLE;'. ] ]
ifFalse: [
inInterpret ifTrue: [
"working inside interpret(); translate the switch statement"
(inLine beginsWith: ' case ') ifTrue: [
| caseLabel |
caseLabel := (inLine findTokens: ' :') second.
outLine := ' CASE(', caseLabel, ')' ].
inLine = ' break;' ifTrue: [
outLine := ' BREAK;' ].
inLine = '}' ifTrue: [
"all finished with interpret()"
inInterpret := false. ] ]
ifFalse: [
beforePrimitiveResponse ifTrue: [
(inLine beginsWith: 'int primitiveResponse(') ifTrue: [
"into primitiveResponse we go"
beforePrimitiveResponse := false.
inPrimitiveResponse := true.
extraOutLine := ' PRIM_TABLE;'. ] ]
ifFalse: [
inPrimitiveResponse ifTrue: [
(inLine = ' switch (primitiveIndex) {') ifTrue: [
extraOutLine := outLine.
outLine := ' PRIM_DISPATCH;' ].
(inLine = ' switch (foo->primitiveIndex) {') ifTrue: [
extraOutLine := outLine.
outLine := ' PRIM_DISPATCH;' ].
(inLine beginsWith: ' case ') ifTrue: [
| caseLabel |
caseLabel := (inLine findTokens: ' :') second.
outLine := ' CASE(', caseLabel, ')' ].
inLine = '}' ifTrue: [
inPrimitiveResponse := false ] ].
] ] ] ].
outFileStream nextPutAll: outLine; cr.
extraOutLine ifNotNil: [
outFileStream nextPutAll: extraOutLine; cr ]]].
outFileStream close! !
!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:12'!
setDirectory: aFileDirectory
directory _ aFileDirectory! !
!Gnuifier class methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:13'!
on: aFilePathString
^self new setDirectory: (FileDirectory on: aFilePathString)! !
|
|
From: Ian P. <piu...@us...> - 2003-09-16 07:59:46
|
Update of /cvsroot/squeak/squeak/platforms/unix In directory sc8-pr-cvs1:/tmp/cvs-serv26237 Modified Files: ChangeLog Log Message: Latest changes. Index: ChangeLog =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/ChangeLog,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ChangeLog 3 Sep 2003 18:02:51 -0000 1.18 --- ChangeLog 16 Sep 2003 07:59:42 -0000 1.19 *************** *** 1,3 **** --- 1,29 ---- + 2003-09-16 Ian Piumarta <ian...@in...> + + * platforms/unix/doc/squeak.1: Updated for '-nointl', + SQUEAK_NOINTL, and LC_CTYPE/LC_ALL. + + * platforms/unix/vm-display-X11/sqUnixX11.c: Make x2sqKey a + function pointer. + (x2sqKeyInput): Add support for international keyboards and + diacritical marks via dead keys. + (display_parseEnvironment): Enable international support if either + LC_CTYPE or LC_ALL is set in the environment. + (display_parseEnvironment): SQUEAK_NOINTL disables international + support. + (display_parseArgument): '-nointl' disables international support. + (display_printUsage): Add help for '-nointl' option. + + 2003-09-05 Ian Piumarta <ian...@in...> + + * platforms/unix/vm-display-X11/sqUnixX11.c + (display_parseArgument): Fix browserPipes argv indices. + (display_parseArgument): Add missing comma in debug printf(). + 2003-09-03 Ian Piumarta <ian...@in...> + + * platforms/unix/vm-display-Quartz/sqUnixQuartz.m (setUpDock): + Remove warning for CPSEnableForegroundOperation, which always + fails -- even when it succeeds. * platforms/unix/config/configure.ac: Version 3.6-beta11 3.6b-5411. |
|
From: Ian P. <piu...@us...> - 2003-09-16 07:59:27
|
Update of /cvsroot/squeak/squeak/platforms/unix/config In directory sc8-pr-cvs1:/tmp/cvs-serv26161 Modified Files: configure.ac Log Message: Version is 3.6g-1 3.6g-5420. Index: configure.ac =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/config/configure.ac,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** configure.ac 3 Sep 2003 18:03:51 -0000 1.13 --- configure.ac 16 Sep 2003 07:59:23 -0000 1.14 *************** *** 38,46 **** # Author: Ian...@IN... # ! # Last edited: 2003-09-03 17:06:16 by piumarta on emilia.inria.fr AC_INIT([config.h.in]) ! AC_VM_VERSION(3,6,beta11, 3,6b,5411) topdir=`cd ${srcdir}/../../..; pwd` --- 38,46 ---- # Author: Ian...@IN... # ! # Last edited: 2003-09-16 08:10:35 by piumarta on emilia.inria.fr AC_INIT([config.h.in]) ! AC_VM_VERSION(3,6g,1, 3,6g,5420) topdir=`cd ${srcdir}/../../..; pwd` |
|
From: Ian P. <piu...@us...> - 2003-09-16 07:58:26
|
Update of /cvsroot/squeak/squeak/platforms/unix/doc In directory sc8-pr-cvs1:/tmp/cvs-serv25850 Modified Files: squeak.1 Log Message: Add -nointl, SQUEAK_NOINTL, notes on LC_ALL/LC_CTYPE and dead keys support. Index: squeak.1 =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/doc/squeak.1,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** squeak.1 3 Sep 2003 18:05:54 -0000 1.9 --- squeak.1 16 Sep 2003 07:58:22 -0000 1.10 *************** *** 34,38 **** .\" directory `platforms/unix/doc' before proceeding with any such use. .\" ! .\" Last edited: 2003-09-03 19:53:48 by piumarta on emilia.inria.fr .\" .if @@\*(lq@ \{\ --- 34,38 ---- .\" directory `platforms/unix/doc' before proceeding with any such use. .\" ! .\" Last edited: 2003-09-16 07:05:38 by piumarta on emilia.inria.fr .\" .if @@\*(lq@ \{\ *************** *** 450,453 **** --- 450,461 ---- Backspace. The behaviour of Backspace is not changed. .TP + .B \-nointl + disables the handling of dead keys on international keyboards. + Without this option, dead key handling is enabled if either + .B LC_ALL + or + .B LC_CTYPE + is set in the environment. + .TP .B \-notitle disables the title bar on the Squeak window (if the window manager supports it). *************** *** 659,662 **** --- 667,675 ---- \&'. .TP + .B SQUEAK_NOINTL + equivalent to '\c + .B \-nointl\c + \&' if set. + .TP .B SQUEAK_NOMIXER equivalent to '\c *************** *** 713,716 **** --- 726,755 ---- \&'\-vm' cannnot be used to unload a driver that was loaded while processing the contents of 'SQUEAK_VM'. + .PP + .B squeak + also checks the environment for + .B LC_ALL + and + .B LC_CTYPE\c + \&. If either of these variables is set then support for + international keyboards (including dead keys for diacritical marks) is + enabled. To prevent this support being enabled even when one or both + of these variables is set, use the '\-nointl' option (or set + .B SQUEAK_NOINTL + in the environment). For example, to start + .B squeak + with support for dead keys on Spanish keyboards, with Latin-1 encoding + of external characters and the default MacRoman internal font + encoding, run + .B squeak + like this: + .sp + .RS + .nf + export LC_CTYPE=es_ES + export SQUEAK_TEXTENC=latin1 + squeak + .fi + .RE .SH SCRIPTS Squeak can load and execute a 'script' file containing Smalltalk code at |
|
From: Ian P. <piu...@us...> - 2003-09-16 07:56:55
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv25703 Modified Files: sqUnixSocket.c Log Message: Detect other end closed in primSocketStatus. Index: sqUnixSocket.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** sqUnixSocket.c 3 Sep 2003 18:10:44 -0000 1.11 --- sqUnixSocket.c 16 Sep 2003 07:56:51 -0000 1.12 *************** *** 37,41 **** /* Author: Ian...@in... * ! * Last edited: 2003-09-01 20:26:26 by piumarta on emilia.inria.fr * * Support for BSD-style "accept" primitives contributed by: --- 37,41 ---- /* Author: Ian...@in... * ! * Last edited: 2003-09-12 21:05:50 by piumarta on emilia.inria.fr * * Support for BSD-style "accept" primitives contributed by: *************** *** 589,592 **** --- 589,603 ---- interpreterProxy->success(false); return Invalid; + } + /* check for connection closed by peer */ + if (SOCKETSTATE(s) == Connected) + { + int fd= SOCKET(s); + int n= socketReadable(fd); + if (n < 0) + { + FPRINTF((stderr, "socketStatus(%d): detected other end closed\n", fd)); + SOCKETSTATE(s)= OtherEndClosed; + } } FPRINTF((stderr, "socketStatus(%d) -> %d\n", SOCKET(s), SOCKETSTATE(s))); |
|
From: Ian P. <piu...@us...> - 2003-09-16 07:56:02
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm In directory sc8-pr-cvs1:/tmp/cvs-serv25575 Modified Files: sqGnu.h Log Message: Include foo-> prefix iff SQ_USE_GLOBAL_STRUCT. Index: sqGnu.h =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqGnu.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sqGnu.h 3 Sep 2003 18:06:53 -0000 1.7 --- sqGnu.h 16 Sep 2003 07:55:58 -0000 1.8 *************** *** 37,41 **** /* Author: Ian...@in... * ! * Last edited: 2003-09-03 00:34:59 by piumarta on emilia.inria.fr * * NOTES: --- 37,41 ---- /* Author: Ian...@in... * ! * Last edited: 2003-09-10 06:01:29 by piumarta on emilia.inria.fr * * NOTES: *************** *** 55,59 **** #endif ! #define PRIM_DISPATCH goto *jumpTable[foo->primitiveIndex] #define JUMP_TABLE \ --- 55,63 ---- #endif ! #if defined(SQ_USE_GLOBAL_STRUCT) ! # define PRIM_DISPATCH goto *jumpTable[foo->primitiveIndex] ! #else ! # define PRIM_DISPATCH goto *jumpTable[primitiveIndex] ! #endif #define JUMP_TABLE \ |
|
From: Ian P. <piu...@us...> - 2003-09-16 07:55:10
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-X11 In directory sc8-pr-cvs1:/tmp/cvs-serv25305 Modified Files: sqUnixX11.c Log Message: Fix browserPipes init. Add input method support for dead keys. Add -nointl option. Index: sqUnixX11.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/vm-display-X11/sqUnixX11.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** sqUnixX11.c 1 Sep 2003 08:13:31 -0000 1.11 --- sqUnixX11.c 16 Sep 2003 07:55:04 -0000 1.12 *************** *** 37,41 **** /* Author: Ian Piumarta <ian...@in...> * ! * Last edited: 2003-08-30 11:47:06 by piumarta on emilia.inria.fr * * Support for more intelligent CLIPBOARD selection handling contributed by: --- 37,41 ---- /* Author: Ian Piumarta <ian...@in...> * ! * Last edited: 2003-09-16 06:53:35 by piumarta on emilia.inria.fr * * Support for more intelligent CLIPBOARD selection handling contributed by: *************** *** 83,86 **** --- 83,87 ---- #undef FULL_UPDATE_ON_EXPOSE + #undef DEBUG_CONV #undef DEBUG_EVENTS #undef DEBUG_SELECTIONS *************** *** 103,106 **** --- 104,108 ---- #include <signal.h> #include <fcntl.h> + #include <locale.h> #if defined(HAVE_SYS_SELECT_H) *************** *** 215,218 **** --- 217,227 ---- int headless= 0; + typedef int (*x2sqKey_t)(XKeyEvent *xevt); + + static int x2sqKeyPlain(XKeyEvent *xevt); + static int x2sqKeyInput(XKeyEvent *xevt); + + static x2sqKey_t x2sqKey= x2sqKeyPlain; + #define inBrowser() (-1 != browserPipes[0]) *************** *** 1009,1013 **** ! static int x2sqKey(XKeyEvent *xevt) { unsigned char buf[32]; --- 1018,1150 ---- ! int recode(int charCode) ! { ! if (charCode >= 128) ! { ! unsigned char buf[32]; ! unsigned char out[32]; ! buf[0]= charCode; ! if (convertChars((char *)buf, 1, uxXWinEncoding, ! (char *)out, sizeof(out), ! sqTextEncoding, 0, 1)) ! charCode= out[0]; ! # if defined(DEBUG_EVENTS) ! fprintf(stderr, " 8-bit: %d=%02x [%c->%c]\n", charCode, charCode, ! (char *)uxXWinEncoding, (char *)sqTextEncoding); ! # endif ! } ! return charCode; ! } ! ! ! static int x2sqKeyInput(XKeyEvent *xevt) ! { ! static int initialised= 0; ! static XIM im= 0; ! static XIC ic= 0; ! static int lastKey= -1; ! ! if (!initialised) ! { ! initialised= 1; ! if (!setlocale(LC_CTYPE, "")) ! { ! fprintf(stderr, "setlocale() failed\n"); ! goto revertInput; ! } ! if (!(im= XOpenIM(stDisplay, 0, 0, 0))) ! { ! fprintf(stderr, "XOpenIM() failed\n"); ! goto revertInput; ! } ! else ! { ! if (!(ic= XCreateIC(im, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, ! XNClientWindow, stWindow, 0))) ! { ! fprintf(stderr, "XCreateIC() failed\n"); ! goto revertInput; ! } ! else ! { ! unsigned int mask; ! XWindowAttributes xwa; ! XGetWindowAttributes(stDisplay, stWindow, &xwa); ! XGetICValues(ic, XNFilterEvents, &mask, NULL); ! mask |= xwa.your_event_mask; ! XSelectInput(stDisplay, stWindow, mask); ! } ! } ! } ! ! if (KeyPress != xevt->type) ! { ! int key= lastKey; ! lastKey= -1;; ! return key; ! } ! ! #if defined(DEBUG_CONV) ! printf("keycode %u\n", xevt->keycode); ! #endif ! ! { ! unsigned char string[128]; /* way too much */ ! KeySym symbolic; ! Status status; ! int count= XmbLookupString(ic, (XKeyPressedEvent *)xevt, ! string, sizeof(string), &symbolic, &status); ! switch (status) ! { ! case XLookupNone: /* still composing */ ! # if defined(DEBUG_CONV) ! fprintf(stderr, "x2sqKey XLookupNone\n"); ! # endif ! return -1; ! ! case XLookupChars: ! # if defined(DEBUG_CONV) ! fprintf(stderr, "x2sqKey XLookupChars count %d\n", count); ! # endif ! case XLookupBoth: ! # if defined(DEBUG_CONV) ! fprintf(stderr, "x2sqKey XLookupBoth count %d\n", count); ! # endif ! lastKey= (count ? recode(string[0]) : -1); ! # if defined(DEBUG_CONV) ! fprintf(stderr, "x2sqKey == %d\n", lastKey); ! # endif ! return lastKey; ! ! case XLookupKeySym: ! # if defined(DEBUG_CONV) ! fprintf(stderr, "x2sqKey XLookupKeySym\n"); ! # endif ! { ! int charCode= translateCode(symbolic); ! # if defined(DEBUG_CONV) ! printf("SYM %d -> %d\n", symbolic, charCode); ! # endif ! if (charCode < 0) ! return -1; /* unknown key */ ! if ((charCode == 127) && mapDelBs) ! charCode= 8; ! return lastKey= charCode; ! } ! ! default: ! fprintf(stderr, "this cannot happen\n"); ! return lastKey= -1; ! } ! return lastKey= -1; ! } ! ! revertInput: ! x2sqKey= x2sqKeyPlain; ! return x2sqKey(xevt); ! } ! ! ! static int x2sqKeyPlain(XKeyEvent *xevt) { unsigned char buf[32]; *************** *** 1028,1045 **** charCode &= 0xff; } ! if (charCode >= 128) ! { ! unsigned char out[32]; ! ! buf[0]= charCode; ! if (convertChars((char *)buf, 1, uxXWinEncoding, (char *)out, sizeof(out), sqTextEncoding, 0, 1)) ! charCode= out[0]; ! # if defined(DEBUG_EVENTS) ! fprintf(stderr, " 8-bit: %d=%02x [%s->%s]\n", charCode, charCode, (char *)uxXWinEncoding, (char *)sqTextEncoding); ! # endif ! } ! return charCode; } static int x2sqButton(int button) { --- 1165,1172 ---- charCode &= 0xff; } ! return recode(charCode); } + static int x2sqButton(int button) { *************** *** 1140,1143 **** --- 1267,1273 ---- } + if (True == XFilterEvent(evt, 0)) + return; + switch (evt->type) { *************** *** 4138,4141 **** --- 4268,4272 ---- printf(" -lazy go to sleep when main window unmapped\n"); printf(" -mapdelbs map Delete key onto Backspace\n"); + printf(" -nointl disable international keyboard support\n"); printf(" -notitle disable the Squeak window title bar\n"); printf(" -optmod <n> map Mod<n> to the Option key\n"); *************** *** 4156,4161 **** --- 4287,4296 ---- char *ev= 0; + if (getenv("LC_CTYPE") || getenv("LC_ALL")) + x2sqKey= x2sqKeyInput; + if (getenv("SQUEAK_LAZY")) sleepWhenUnmapped= 1; if (getenv("SQUEAK_SPY")) withSpy= 1; + if (getenv("SQUEAK_NOINTL")) x2sqKey= x2sqKeyPlain; if (getenv("SQUEAK_NOTITLE")) noTitle= 1; if (getenv("SQUEAK_FULLSCREEN")) fullScreen= 1; *************** *** 4189,4192 **** --- 4324,4328 ---- else if (!strcmp(arg, "-fullscreen")) fullScreen= 1; else if (!strcmp(arg, "-iconic")) iconified= 1; + else if (!strcmp(arg, "-nointl")) x2sqKey= x2sqKeyPlain; else if (argv[1]) /* option requires an argument */ { *************** *** 4208,4212 **** if (!argv[2]) return 0; sscanf(argv[1], "%i", &browserPipes[0]); ! sscanf(argv[1], "%i", &browserPipes[1]); /* receive browserWindow */ # if defined(DEBUG_BROWSER) --- 4344,4348 ---- if (!argv[2]) return 0; sscanf(argv[1], "%i", &browserPipes[0]); ! sscanf(argv[2], "%i", &browserPipes[1]); /* receive browserWindow */ # if defined(DEBUG_BROWSER) *************** *** 4220,4224 **** } # if defined(DEBUG_BROWSER) ! fprintf(stderr, "browser: window = 0x%x\n" browserWindow); # endif return 3; --- 4356,4360 ---- } # if defined(DEBUG_BROWSER) ! fprintf(stderr, "browser: window = 0x%x\n", browserWindow); # endif return 3; |
|
From: Ian P. <piu...@us...> - 2003-09-03 21:22:19
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz In directory sc8-pr-cvs1:/tmp/cvs-serv5430 Modified Files: sqUnixQuartz.m Log Message: Suppress warning for CPSEnableForegroundOperation() which always fails (even when it succeeds). Index: sqUnixQuartz.m =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz/sqUnixQuartz.m,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sqUnixQuartz.m 3 Sep 2003 18:12:22 -0000 1.8 --- sqUnixQuartz.m 3 Sep 2003 21:22:16 -0000 1.9 *************** *** 36,40 **** * directory `platforms/unix/doc' before proceeding with any such use. * ! * Last edited: 2003-09-02 15:34:38 by piumarta on emilia.inria.fr */ --- 36,40 ---- * directory `platforms/unix/doc' before proceeding with any such use. * ! * Last edited: 2003-09-03 23:09:33 by piumarta on emilia.inria.fr */ *************** *** 1164,1168 **** else { ! try(CPSEnableForegroundOperation, (&psn, 0x03, 0x3c, 0x2c, 0x1103), " (ignored)"); try(CPSSetFrontProcess, (&psn), ""); } --- 1164,1168 ---- else { ! CPSEnableForegroundOperation(&psn, 0x03, 0x3c, 0x2c, 0x1103); try(CPSSetFrontProcess, (&psn), ""); } |
|
From: Ian P. <piu...@us...> - 2003-09-03 21:02:43
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/SocketPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv1278 Modified Files: SocketPlugin.h Log Message: Added declatation for sqSocketListenOnPortBacklogSizeInterface(). Index: SocketPlugin.h =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Cross/plugins/SocketPlugin/SocketPlugin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SocketPlugin.h 29 Jan 2002 05:19:04 -0000 1.2 --- SocketPlugin.h 3 Sep 2003 21:02:37 -0000 1.3 *************** *** 48,51 **** --- 48,52 ---- and the old connection style will be used */ void sqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize); + void sqSocketListenOnPortBacklogSizeInterface(SocketPtr s, int port, int backlogSize, int addr); void sqSocketAcceptFromRecvBytesSendBytesSemaID( SocketPtr s, SocketPtr serverSocket, |
|
From: Ian P. <piu...@us...> - 2003-09-03 18:12:26
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz In directory sc8-pr-cvs1:/tmp/cvs-serv32184 Modified Files: sqUnixQuartz.m Log Message: Correct modifier behaviour for mouse scroll wheel. Disable remaining debug messages. Index: sqUnixQuartz.m =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/vm-display-Quartz/sqUnixQuartz.m,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sqUnixQuartz.m 1 Sep 2003 08:11:14 -0000 1.7 --- sqUnixQuartz.m 3 Sep 2003 18:12:22 -0000 1.8 *************** *** 36,40 **** * directory `platforms/unix/doc' before proceeding with any such use. * ! * Last edited: 2003-08-31 19:40:14 by piumarta on emilia.inria.fr */ --- 36,40 ---- * directory `platforms/unix/doc' before proceeding with any such use. * ! * Last edited: 2003-09-02 15:34:38 by piumarta on emilia.inria.fr */ *************** *** 819,823 **** pixBase= 0; } ! printf("pixBase %p, width %d, height %d, depth %d, pitch %d\n", pixBase, pixWidth, pixHeight, pixDepth, pixPitch); return pixBase; } --- 819,824 ---- pixBase= 0; } ! dprintf(("pixBase %p, width %d, height %d, depth %d, pitch %d\n", ! pixBase, pixWidth, pixHeight, pixDepth, pixPitch)); return pixBase; } *************** *** 838,842 **** || (![view lockFocusIfCanDraw])) { ! printf("ioShowDisplay squashed\n"); return 0; } --- 839,843 ---- || (![view lockFocusIfCanDraw])) { ! dprintf(("ioShowDisplay squashed\n")); return 0; } *************** *** 1167,1170 **** --- 1168,1172 ---- } # undef try + # if defined(DEBUG_APP) { CPSProcessInfoRec info; *************** *** 1198,1201 **** --- 1200,1204 ---- printf("\n"); } + #endif } *************** *** 1238,1242 **** dpyPitch = CGDisplayBytesPerRow(dpy); ! printf("display is %dx%dx%d at %p pitch %d\n", dpyWidth, dpyHeight, dpyDepth, dpyPixels, dpyPitch); } --- 1241,1245 ---- dpyPitch = CGDisplayBytesPerRow(dpy); ! dprintf(("display is %dx%dx%d at %p pitch %d\n", dpyWidth, dpyHeight, dpyDepth, dpyPixels, dpyPitch)); } *************** *** 1443,1447 **** SqueakWindow *old; ! printf("ioSetFullScreen(%d)\n", flag); if (headless || (fullscreen == flag)) --- 1446,1450 ---- SqueakWindow *old; ! dprintf(("ioSetFullScreen(%d)\n", flag)); if (headless || (fullscreen == flag)) *************** *** 1466,1470 **** static int originalWindowSize= (800 << 16) | 600; ! printf("ioSetFullScreen(%d)\n", flag); if (headless || (fullscreen == flag) || glActive) --- 1469,1473 ---- static int originalWindowSize= (800 << 16) | 600; ! dprintf(("ioSetFullScreen(%d)\n", flag)); if (headless || (fullscreen == flag) || glActive) *************** *** 1883,1890 **** case NSScrollWheel: { ! int keyCode= ([event deltaY] >= 0.0) ? 30 : 31; ! noteKeyboardEvent(keyCode, EventKeyDown, modifierState); ! noteKeyboardEvent(keyCode, EventKeyChar, modifierState); ! noteKeyboardEvent(keyCode, EventKeyUp, modifierState); } break; --- 1886,1896 ---- case NSScrollWheel: { ! int keyCode, modifiers; ! keyCode= ([event deltaY] >= 0.0) ? 30 : 31; ! modifierState= qz2sqModifiers([event modifierFlags]); ! modifiers= modifierState ^ CtrlKeyBit; ! noteKeyboardEvent(keyCode, EventKeyDown, modifiers); ! noteKeyboardEvent(keyCode, EventKeyChar, modifiers); ! noteKeyboardEvent(keyCode, EventKeyUp, modifiers); } break; |
|
From: Ian P. <piu...@us...> - 2003-09-03 18:10:47
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv31708 Modified Files: sqUnixSocket.c Log Message: sqSocketListenOnPortBacklogSizeInterface() added. sqSocketListenOnPortBacklogSize() defaults to INADDR_ANY. Index: sqUnixSocket.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sqUnixSocket.c 1 Sep 2003 08:05:50 -0000 1.10 --- sqUnixSocket.c 3 Sep 2003 18:10:44 -0000 1.11 *************** *** 37,41 **** /* Author: Ian...@in... * ! * Last edited: 2003-08-30 13:01:29 by piumarta on emilia.inria.fr * * Support for BSD-style "accept" primitives contributed by: --- 37,41 ---- /* Author: Ian...@in... * ! * Last edited: 2003-09-01 20:26:26 by piumarta on emilia.inria.fr * * Support for BSD-style "accept" primitives contributed by: *************** *** 604,608 **** } ! void sqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize) { struct sockaddr_in saddr; --- 604,608 ---- } ! void sqSocketListenOnPortBacklogSizeInterface(SocketPtr s, int port, int backlogSize, int addr) { struct sockaddr_in saddr; *************** *** 623,627 **** saddr.sin_family= AF_INET; saddr.sin_port= htons((short)port); ! saddr.sin_addr.s_addr= INADDR_ANY; bind(SOCKET(s), (struct sockaddr*) &saddr, sizeof(saddr)); if (TCPSocketType == s->socketType) --- 623,627 ---- saddr.sin_family= AF_INET; saddr.sin_port= htons((short)port); ! saddr.sin_addr.s_addr= htonl(addr); bind(SOCKET(s), (struct sockaddr*) &saddr, sizeof(saddr)); if (TCPSocketType == s->socketType) *************** *** 639,642 **** --- 639,646 ---- } + void sqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize) + { + sqSocketListenOnPortBacklogSizeInterface(s, port, backlogSize, INADDR_ANY); + } /* TCP => open a connection. |